set header mode during init based on lora32_cfg_t->implicitHeader state

This commit is contained in:
Morgan 'ARR\!' Allen 2021-11-19 10:53:01 -08:00
parent 7ec011f15a
commit c8beb458f6

View file

@ -515,6 +515,11 @@ uint8_t lora32_init(lora32_cfg_t *lora) {
lora32_standby(lora); lora32_standby(lora);
ESP_LOGI(TAG, "lora32_standby"); ESP_LOGI(TAG, "lora32_standby");
if(lora->implicitHeader)
lora23_set_implicit_header(lora);
else
lora23_set_explicit_header(lora);
// TODO setup shouldn't be based on just receive callback // TODO setup shouldn't be based on just receive callback
if(lora->receive != NULL) { if(lora->receive != NULL) {
ESP_LOGI(TAG, "Setting GPIO Interrupt"); ESP_LOGI(TAG, "Setting GPIO Interrupt");