diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -61,9 +61,6 @@ int main(void) uint8_t nextwspr_time_valid = 0; uint32_t last_wspr_tx_time = 0; - uint8_t fix_ok = 0; - uint8_t numsats = 0; - uint8_t packet_type = 0; while (1) @@ -158,6 +155,7 @@ int main(void) // TODO: Set wspr countdown timer for this transmission! fix_acq_starttime = 0; state = SYSTEM_WSPRTX; + adc_start(); } // If no decent fix in 3 minutes else if(HAL_GetTick() - fix_acq_starttime > 60000 * 3) @@ -196,12 +194,14 @@ int main(void) packet_type = !packet_type; // alternate packet type last_wspr_tx_time = HAL_GetTick(); state = SYSTEM_IDLE; + adc_stop(); } else { // Window was missed, go back to idle, and try again after time delay last_wspr_tx_time = HAL_GetTick(); state = SYSTEM_IDLE; + adc_stop(); } nextwspr_time_valid = 0; // invalidate wspr time }