made sim compile again with new gps code

This commit is contained in:
Antoine Drouin
2010-08-15 15:55:22 +00:00
parent d35d9b8bbb
commit 3a7c725cbe
2 changed files with 15 additions and 11 deletions
+2 -1
View File
@@ -41,8 +41,9 @@ void booz_gps_init(void) {
#ifdef GPS_LED
LED_OFF(GPS_LED);
#endif
#ifdef BOOZ_GPS_TYPE_H
booz_gps_impl_init();
#endif
}
+13 -10
View File
@@ -94,7 +94,7 @@ static inline void booz_gps_feed_value() {
#define BoozGpsEvent(_sol_available_callback) { \
if (booz_gps_available) { \
if (booz_gps_state.fix == BOOZ2_GPS_FIX_3D) \
booz_gps_lost_counter = 0; \
booz_gps_state.lost_counter = 0; \
_sol_available_callback(); \
booz_gps_available = FALSE; \
} \
@@ -106,15 +106,6 @@ static inline void booz_gps_feed_value() {
*/
extern void booz_gps_init(void);
static inline void booz_gps_periodic( void ) {
RunOnceEvery(128, booz_gps_state.lost_counter++; );
}
#define GpsIsLost() (booz_gps_state.lost_counter > 20) /* 4Hz -> 5s */
#define __GpsLink(dev, _x) dev##_x
#define _GpsLink(dev, _x) __GpsLink(dev, _x)
#define GpsLink(_x) _GpsLink(GPS_LINK, _x)
@@ -126,4 +117,16 @@ static inline void booz_gps_periodic( void ) {
#endif /* !SITL */
extern void booz_gps_init(void);
static inline void booz_gps_periodic( void ) {
RunOnceEvery(128, booz_gps_state.lost_counter++; );
}
#define GpsIsLost() (booz_gps_state.lost_counter > 20) /* 4Hz -> 5s */
#endif /* BOOZ2_GPS_H */