Changeset - 639ea4c6e941
[Not reviewed]
default
0 1 0
Ethan Zonca - 8 years ago 2017-09-24 16:58:46
ez@ethanzonca.com
Altitude seems to work correctly now!
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/wspr.c
Show inline comments
 
@@ -72,8 +72,9 @@ void wspr_transmit(uint8_t* grid_locator
 
        /////////////////////////////////////////////////
 
        // Composite altitude and sub-maidenhead locator
 
        ///////////////////////////////////////////////// 
 
        uint16_t maiden_ext = (loc[4] - 'A') + ((loc[5] - 'A') * 24); // 0-575
 
        uint16_t altitude_mod = gps_getdata()->altitude / 20;   
 
        // Use untrimmed locator
 
        uint32_t maiden_ext = (grid_locator[4] - 'A') + ((grid_locator[5] - 'A') * 24); // 0-575
 
        uint32_t altitude_mod = gps_getdata()->altitude / 20;   
 

	
 
        // Ciel at 21,340 meters
 
        if(altitude_mod > 1067)
 
@@ -231,6 +232,9 @@ void wspr_transmit(uint8_t* grid_locator
 
    HAL_NVIC_EnableIRQ(TIM1_BRK_UP_TRG_COM_IRQn);
 

	
 

	
 

	
 
    // TODO: Bring up TCXO sooner! Gotta let it warm up or something
 

	
 
    HAL_GPIO_WritePin(OSC_NOTEN, 0);
 
    HAL_GPIO_WritePin(TCXO_EN, 1);
 
    HAL_Delay(100);
0 comments (0 inline, 0 general)