diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -8,6 +8,7 @@ #include "i2c.h" #include "uart.h" #include "gpio.h" +#include "wspr.h" #include "gps.h" @@ -65,16 +66,17 @@ int main(void) break; } + uint8_t hour, minute, second; + gps_update_time(&hour, &minute, &second); + // EMZ TODO: this needs to trigger off of RTC minute, not GPS minute - volatile uint8_t minute = get_timestamp()[3] - 0x30; - // If last minute was odd and this minute is even (transition) - if(lastMinute%2 == 1 && minute%2 == 0) - { - // Wait until the first second of the minute - HAL_Delay(1000); - wspr_transmit(); - } +// if(lastMinute%2 == 1 && minute%2 == 0) +// { +// // Wait until the first second of the minute +// HAL_Delay(1000); +// wspr_transmit(); +// } lastMinute = minute; last_wspr = HAL_GetTick(); @@ -82,12 +84,13 @@ int main(void) if(HAL_GetTick() - led_timer > blink_rate) { - // HAL_GPIO_TogglePin(LED_BLUE); + HAL_GPIO_TogglePin(LED_BLUE); led_timer = HAL_GetTick(); } if(HAL_GetTick() - last_gps > 10) { - gps_process(); + //gps_process(); + gps_update_position(); last_gps = HAL_GetTick(); }