From 795bb19cb99b32973584cdd354a514b3c39847c2 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 14 Mar 2023 10:30:23 +1100 Subject: [PATCH] AP_BattMonitor: move defines around battery types for consistency --- libraries/AP_BattMonitor/AP_BattMonitor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor.cpp b/libraries/AP_BattMonitor/AP_BattMonitor.cpp index c2880d24e6eb7..6e3dc4fa8b1ed 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor.cpp @@ -305,21 +305,21 @@ AP_BattMonitor::init() drivers[instance] = new AP_BattMonitor_SMBus_NeoDesign(*this, state[instance], _params[instance]); break; #endif - case Type::BEBOP: #if AP_BATTERY_BEBOP_ENABLED + case Type::BEBOP: drivers[instance] = new AP_BattMonitor_Bebop(*this, state[instance], _params[instance]); -#endif break; - case Type::UAVCAN_BatteryInfo: +#endif #if AP_BATTERY_UAVCAN_BATTERYINFO_ENABLED + case Type::UAVCAN_BatteryInfo: drivers[instance] = new AP_BattMonitor_DroneCAN(*this, state[instance], AP_BattMonitor_DroneCAN::UAVCAN_BATTERY_INFO, _params[instance]); -#endif break; - case Type::BLHeliESC: +#endif #if AP_BATTERY_ESC_ENABLED + case Type::BLHeliESC: drivers[instance] = new AP_BattMonitor_ESC(*this, state[instance], _params[instance]); -#endif break; +#endif #if AP_BATTERY_SUM_ENABLED case Type::Sum: drivers[instance] = new AP_BattMonitor_Sum(*this, state[instance], _params[instance], instance);