Skip to content

Commit 4a03bf6

Browse files
committed
Fix boolean config parsing in LinuxBoard (#6)
1 parent 32e1b4a commit 4a03bf6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

variants/linux/LinuxBoard.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ int LinuxConfig::load(const char *filename) {
126126
else if (strcmp(key, "lora_tcxo") == 0) lora_tcxo = atof(value);
127127
else if (strcmp(key, "lora_tx_power") == 0) lora_tx_power = atoi(value);
128128
else if (strcmp(key, "current_limit") == 0) current_limit = atof(value);
129-
else if (strcmp(key, "dio2_as_rf_switch") == 0) dio2_as_rf_switch = value != 0;
130-
else if (strcmp(key, "rx_boosted_gain") == 0) rx_boosted_gain = value != 0;
129+
else if (strcmp(key, "dio2_as_rf_switch") == 0) dio2_as_rf_switch = atoi(value) != 0;
130+
else if (strcmp(key, "rx_boosted_gain") == 0) rx_boosted_gain = atoi(value) != 0;
131131

132132
else if (strcmp(key, "lora_irq_pin") == 0) lora_irq_pin = atoi(value);
133133
else if (strcmp(key, "lora_reset_pin") == 0) lora_reset_pin = atoi(value);

0 commit comments

Comments
 (0)