Changeset - 2fa25ca2db21
[Not reviewed]
default
0 2 0
Ethan Zonca - 9 years ago 2016-10-13 22:08:54
ez@ethanzonca.com
Don't zero out everything in position, because we need some of that data; fix timer clocking
2 files changed with 12 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/gps.c
Show inline comments
 
@@ -231,25 +231,25 @@ void gps_poweron(void)
 

	
 

	
 
// Power off GPS module
 
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.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;
 
//	position.speed = 0;
 

	
 
    uart_deinit();
 
    HAL_GPIO_WritePin(GPS_NOTEN, 1);
 
    gpson = 0;
 
}
 

	
src/wspr.c
Show inline comments
 
@@ -56,13 +56,13 @@ void wspr_transmit(uint8_t* grid_locator
 
	loc[4] = '\0';
 

	
 

	
 
    // Start timer for WSPR
 
    __TIM1_CLK_ENABLE();
 
    htim1.Instance = TIM1;
 
    htim1.Init.Prescaler = 512; // gives 64uS ticks from 8MHz ahbclk
 
    htim1.Init.Prescaler = 512 / 4; // FIXED gives 64us ticks from 2mhz clock // gives 64uS ticks from 8MHz ahbclk
 
    htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
 
    htim1.Init.Period = ctc; // Count up to this value (how many 64uS ticks per symbol)
 
    htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
 
    htim1.Init.RepetitionCounter = 0;
 
    HAL_TIM_Base_Init(&htim1);
 
    HAL_TIM_Base_Start_IT(&htim1);
0 comments (0 inline, 0 general)