From fa2e841387cc6007d6ba54e3b946d97170ab1481 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 26 Jan 2022 13:19:01 +1100 Subject: [PATCH] AP_HAL: honour HAL_SIM_GPS_ENABLED --- libraries/AP_HAL/SIMState.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL/SIMState.h b/libraries/AP_HAL/SIMState.h index af572105e0..118d27baf0 100644 --- a/libraries/AP_HAL/SIMState.h +++ b/libraries/AP_HAL/SIMState.h @@ -60,7 +60,9 @@ public: void update(); +#if HAL_SIM_GPS_ENABLED void set_gps0(SITL::GPS *_gps) { gps[0] = _gps; } +#endif uint16_t pwm_output[16]; // was SITL_NUM_CHANNELS @@ -227,8 +229,10 @@ private: const char *_home_str; +#if HAL_SIM_GPS_ENABLED // simulated GPS devices SITL::GPS *gps[2]; // constrained by # of parameter sets +#endif }; #endif // AP_SIM_ENABLED