Changeset - 38f0f2457409
[Not reviewed]
default
0 3 0
Ethan Zonca - 9 years ago 2016-10-13 20:21:04
ez@ethanzonca.com
Fix issue where code would constantly enter gpsacq state because of last wspr timeout expiring
3 files changed with 18 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/gps.c
Show inline comments
 
@@ -234,6 +234,20 @@ void gps_poweron(void)
 
void gps_poweroff(void)
 
{
 
    // NOTE: pchannel
 
	position.hour = 0;
 
	position.minute = 0;
 
	position.second = 0;
 
	position.altitude = 0;
 
	position.latitude = 0;
 
	position.longitude = 0;
 
	position.day = 0;
 
	position.month = 0;
 
	position.fixtype = 0;
 
	position.valid = 0;
 
	position.pdop = 0;
 
	position.sats_in_solution = 0;
 
	position.speed = 0;
 

	
 
    uart_deinit();
 
    HAL_GPIO_WritePin(GPS_NOTEN, 1);
 
    gpson = 0;
src/main.c
Show inline comments
 
@@ -140,6 +140,8 @@ int main(void)
 
                	// Flash error code and go to idle, try again next time
 
                	led_blink(4);
 
                    gps_poweroff();
 
                    fix_acq_starttime = 0;
 
                    last_wspr_tx_time = HAL_GetTick(); // repeat acq/tx cycle after big time delay
 
                	state = SYSTEM_IDLE;
 
                }
 
            } break;
src/uart.c
Show inline comments
 
@@ -93,6 +93,8 @@ void uart_deinit(void)
 
        //HAL_DMA_DeInit(&hdma_usart1_rx);
 
        //HAL_DMA_DeInit(&hdma_usart1_tx);
 
        HAL_UART_DeInit(&huart1);
 
        __HAL_RCC_USART1_CLK_DISABLE();
 
 
        uart_initted = 0;
 
    }
 
}
0 comments (0 inline, 0 general)