diff --git a/sw/airborne/gps_ubx.h b/sw/airborne/gps_ubx.h index 0aac3eb91c..7b40bc636f 100644 --- a/sw/airborne/gps_ubx.h +++ b/sw/airborne/gps_ubx.h @@ -69,8 +69,13 @@ extern void parse_ubx( uint8_t c ); #define NAV_DYN_AIRBORNE_2G 6 #define NAV_DYN_AIRBORNE_4G 7 -void ubxsend_cfg_rst(uint16_t, uint8_t); +extern void ubxsend_cfg_rst(uint16_t, uint8_t); -#define gps_ubx_Reset(_val) { gps_reset = _val; if (gps_reset > CFG_RST_BBR_Warmstart) gps_reset = CFG_RST_BBR_Coldstart; ubxsend_cfg_rst(gps_reset, CFG_RST_Reset_Controlled); } +#define gps_ubx_Reset(_val) { \ + gps_reset = _val; \ + if (gps_reset > CFG_RST_BBR_Warmstart) \ + gps_reset = CFG_RST_BBR_Coldstart; \ + ubxsend_cfg_rst(gps_reset, CFG_RST_Reset_Controlled); \ +} #endif /* UBX_H */