mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
made sim compile again with new gps code
This commit is contained in:
@@ -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
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user