Fix DCD bug

This commit is contained in:
Mark Qvist 2019-01-06 12:55:08 +01:00
parent cec3cda7c9
commit 1275c5876d
3 changed files with 1321 additions and 1319 deletions

View File

@ -4,7 +4,7 @@
#define CONFIG_H #define CONFIG_H
#define MAJ_VERS 0x01 #define MAJ_VERS 0x01
#define MIN_VERS 0x09 #define MIN_VERS 0x0A
#define MCU_328P 0x90 #define MCU_328P 0x90
#define MCU_1284P 0x91 #define MCU_1284P 0x91

File diff suppressed because it is too large Load Diff

View File

@ -502,9 +502,9 @@ void serialCallback(uint8_t sbyte) {
void updateModemStatus() { void updateModemStatus() {
uint8_t status = LoRa.modemStatus(); uint8_t status = LoRa.modemStatus();
last_status_update = millis(); last_status_update = millis();
if (status & SIG_DETECT == 0x01) { stat_signal_detected = true; } else { stat_signal_detected = false; } if (status & SIG_DETECT == SIG_DETECT) { stat_signal_detected = true; } else { stat_signal_detected = false; }
if (status & SIG_SYNCED == 0x01) { stat_signal_synced = true; } else { stat_signal_synced = false; } if (status & SIG_SYNCED == SIG_SYNCED) { stat_signal_synced = true; } else { stat_signal_synced = false; }
if (status & RX_ONGOING == 0x01) { stat_rx_ongoing = true; } else { stat_rx_ongoing = false; } if (status & RX_ONGOING == RX_ONGOING) { stat_rx_ongoing = true; } else { stat_rx_ongoing = false; }
if (stat_signal_detected || stat_signal_synced || stat_rx_ongoing) { if (stat_signal_detected || stat_signal_synced || stat_rx_ongoing) {
if (dcd_count < dcd_threshold) { if (dcd_count < dcd_threshold) {