diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index b02628b1bd..86fc3b0e61 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -583,9 +583,11 @@ void Copter::ten_hz_logging_loop() } if (should_log(MASK_LOG_RCIN)) { logger.Write_RCIN(); +#if AP_RSSI_ENABLED if (rssi.enabled()) { logger.Write_RSSI(); } +#endif } if (should_log(MASK_LOG_RCOUT)) { logger.Write_RCOUT(); diff --git a/ArduCopter/Parameters.cpp b/ArduCopter/Parameters.cpp index a1dd234b0c..105b660a8e 100644 --- a/ArduCopter/Parameters.cpp +++ b/ArduCopter/Parameters.cpp @@ -634,10 +634,12 @@ const AP_Param::Info Copter::var_info[] = { GOBJECTN(mode_auto.mission, mission, "MIS_", AP_Mission), #endif +#if AP_RSSI_ENABLED // @Group: RSSI_ // @Path: ../libraries/AP_RSSI/AP_RSSI.cpp GOBJECT(rssi, "RSSI_", AP_RSSI), - +#endif + #if AP_RANGEFINDER_ENABLED // @Group: RNGFND // @Path: ../libraries/AP_RangeFinder/AP_RangeFinder.cpp diff --git a/ArduCopter/system.cpp b/ArduCopter/system.cpp index 864b1569f8..1d133932fa 100644 --- a/ArduCopter/system.cpp +++ b/ArduCopter/system.cpp @@ -27,9 +27,11 @@ void Copter::init_ardupilot() // initialise battery monitor battery.init(); +#if AP_RSSI_ENABLED // Init RSSI rssi.init(); - +#endif + barometer.init(); // setup telem slots with serial ports