change to expected!

This commit is contained in:
Daniël Koek 2024-04-25 16:15:41 +01:00
parent 077d45aee6
commit abca903491
2 changed files with 11 additions and 11 deletions

View file

@ -10,7 +10,7 @@ namespace ebyte_lora {
enum EnableByte : uint8_t { EBYTE_ENABLED = 0b1, EBYTE_DISABLED = 0b0 }; enum EnableByte : uint8_t { EBYTE_ENABLED = 0b1, EBYTE_DISABLED = 0b0 };
enum AirDataRate : uint8_t { enum AirDataRate : uint8_t {
AIR_2_4KB = 0b000, AIR_2_4KB = 0b010,
AIR_4_8KB = 0b011, AIR_4_8KB = 0b011,
AIR_9_6KB = 0b100, AIR_9_6KB = 0b100,
AIR_19_2KB = 0b101, AIR_19_2KB = 0b101,

View file

@ -171,7 +171,7 @@ void EbyteLoraComponent::setup_wait_response_(uint32_t timeout) {
} }
void EbyteLoraComponent::dump_config() { void EbyteLoraComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Ebyte Lora E220"); ESP_LOGCONFIG(TAG, "Ebyte Lora E220");
switch (this->current_config_.air_data_rate) { switch (this->expected_config_.air_data_rate) {
case AIR_2_4KB: case AIR_2_4KB:
ESP_LOGD(TAG, "air_data_rate: 2.4kb"); ESP_LOGD(TAG, "air_data_rate: 2.4kb");
break; break;
@ -191,7 +191,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "air_data_rate: 62.5kb"); ESP_LOGD(TAG, "air_data_rate: 62.5kb");
break; break;
} }
switch (this->current_config_.uart_baud) { switch (this->expected_config_.uart_baud) {
case UART_1200: case UART_1200:
ESP_LOGD(TAG, "uart_baud: 1200"); ESP_LOGD(TAG, "uart_baud: 1200");
break; break;
@ -217,7 +217,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "uart_baud: 115200"); ESP_LOGD(TAG, "uart_baud: 115200");
break; break;
} }
switch (this->current_config_.parity) { switch (this->expected_config_.parity) {
case EBYTE_UART_8N1: case EBYTE_UART_8N1:
ESP_LOGD(TAG, "uart_parity: 8N1"); ESP_LOGD(TAG, "uart_parity: 8N1");
break; break;
@ -228,7 +228,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "uart_parity: 8E1"); ESP_LOGD(TAG, "uart_parity: 8E1");
break; break;
} }
switch (this->current_config_.rssi_noise) { switch (this->expected_config_.rssi_noise) {
case EBYTE_ENABLED: case EBYTE_ENABLED:
ESP_LOGD(TAG, "rssi_noise: ENABLED"); ESP_LOGD(TAG, "rssi_noise: ENABLED");
break; break;
@ -236,7 +236,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "rssi_noise: DISABLED"); ESP_LOGD(TAG, "rssi_noise: DISABLED");
break; break;
} }
switch (this->current_config_.sub_packet) { switch (this->expected_config_.sub_packet) {
case SUB_200B: case SUB_200B:
ESP_LOGD(TAG, "sub_packet: 200 bytes"); ESP_LOGD(TAG, "sub_packet: 200 bytes");
break; break;
@ -250,7 +250,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "sub_packet: 32 bytes"); ESP_LOGD(TAG, "sub_packet: 32 bytes");
break; break;
} }
switch (this->current_config_.transmission_power) { switch (this->expected_config_.transmission_power) {
case TX_DEFAULT_MAX: case TX_DEFAULT_MAX:
ESP_LOGD(TAG, "transmission_power: default or max"); ESP_LOGD(TAG, "transmission_power: default or max");
break; break;
@ -264,7 +264,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "transmission_power: Lowest"); ESP_LOGD(TAG, "transmission_power: Lowest");
break; break;
} }
ESP_LOGD(TAG, "channel: %u", this->current_config_.channel); ESP_LOGD(TAG, "channel: %u", this->expected_config_.channel);
switch (this->current_config_.enable_lbt) { switch (this->current_config_.enable_lbt) {
case EBYTE_ENABLED: case EBYTE_ENABLED:
ESP_LOGD(TAG, "enable_lbt: ENABLED"); ESP_LOGD(TAG, "enable_lbt: ENABLED");
@ -273,7 +273,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "enable_lbt: DISABLED"); ESP_LOGD(TAG, "enable_lbt: DISABLED");
break; break;
} }
switch (this->current_config_.transmission_mode) { switch (this->expected_config_.transmission_mode) {
case TRANSPARENT: case TRANSPARENT:
ESP_LOGD(TAG, "transmission_type: TRANSPARENT"); ESP_LOGD(TAG, "transmission_type: TRANSPARENT");
break; break;
@ -281,7 +281,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "transmission_type: FIXED"); ESP_LOGD(TAG, "transmission_type: FIXED");
break; break;
} }
switch (this->current_config_.enable_rssi) { switch (this->expected_config_.enable_rssi) {
case EBYTE_ENABLED: case EBYTE_ENABLED:
ESP_LOGD(TAG, "enable_rssi: ENABLED"); ESP_LOGD(TAG, "enable_rssi: ENABLED");
break; break;
@ -289,7 +289,7 @@ void EbyteLoraComponent::dump_config() {
ESP_LOGD(TAG, "enable_rssi: DISABLED"); ESP_LOGD(TAG, "enable_rssi: DISABLED");
break; break;
} }
switch (this->current_config_.wor_period) { switch (this->expected_config_.wor_period) {
case WOR_500: case WOR_500:
ESP_LOGD(TAG, "wor_period: 500"); ESP_LOGD(TAG, "wor_period: 500");
break; break;