@@ -50,14 +50,14 @@ ao_pa_get(void)
50
50
51
51
ao_ms5607_sample (& ao_ms5607_current );
52
52
ao_ms5607_convert (& ao_ms5607_current , & value );
53
- pa = value .pres ;
53
+ pa = ( uint32_t ) value .pres ;
54
54
}
55
55
56
56
static void
57
57
ao_compute_height (void )
58
58
{
59
- ground_alt = ao_pa_to_altitude (pa_ground );
60
- max_alt = ao_pa_to_altitude (pa_min );
59
+ ground_alt = ao_pa_to_altitude (( pres_t ) pa_ground );
60
+ max_alt = ao_pa_to_altitude (( pres_t ) pa_min );
61
61
ao_max_height = max_alt - ground_alt ;
62
62
}
63
63
@@ -91,7 +91,7 @@ power_down(void)
91
91
stm_scb .scr |= ((1 << STM_SCB_SCR_SLEEPDEEP ) |
92
92
(1 << STM_SCB_SCR_SLEEPONEXIT ));
93
93
stm_pwr .cr |= (1 << STM_PWR_CR_PDDS );
94
- stm_pwr .csr &= ~(1 << STM_PWR_CSR_WUF );
94
+ stm_pwr .csr &= ~(1UL << STM_PWR_CSR_WUF );
95
95
ao_arch_wait_interrupt ();
96
96
}
97
97
}
@@ -144,7 +144,7 @@ flight_mode(void)
144
144
ao_report_altitude ();
145
145
ao_pips ();
146
146
log_micro_dump ();
147
- #if BOOST_DELAY
147
+ #ifdef BOOST_DELAY
148
148
ao_delay (BOOST_DELAY );
149
149
#endif
150
150
log_erase ();
@@ -212,7 +212,7 @@ main(void)
212
212
*/
213
213
uint16_t vref = ao_adc_read_vref ();
214
214
215
- uint32_t vdda = 3 * stm_vrefint_cal .vrefint_cal * 1000 / vref ;
215
+ uint32_t vdda = 3UL * stm_vrefint_cal .vrefint_cal * 1000 / vref ;
216
216
217
217
/* Power supply > 3.25V means we're on USB power */
218
218
if (vdda > 3250 ) {
0 commit comments