AP_BattMonitor: move defines around battery types for consistency

This commit is contained in:
Peter Barker 2023-03-14 10:30:23 +11:00 committed by Andrew Tridgell
parent 8c326bc6fb
commit 795bb19cb9

View File

@ -305,21 +305,21 @@ AP_BattMonitor::init()
drivers[instance] = new AP_BattMonitor_SMBus_NeoDesign(*this, state[instance], _params[instance]); drivers[instance] = new AP_BattMonitor_SMBus_NeoDesign(*this, state[instance], _params[instance]);
break; break;
#endif #endif
case Type::BEBOP:
#if AP_BATTERY_BEBOP_ENABLED #if AP_BATTERY_BEBOP_ENABLED
case Type::BEBOP:
drivers[instance] = new AP_BattMonitor_Bebop(*this, state[instance], _params[instance]); drivers[instance] = new AP_BattMonitor_Bebop(*this, state[instance], _params[instance]);
#endif
break; break;
case Type::UAVCAN_BatteryInfo: #endif
#if AP_BATTERY_UAVCAN_BATTERYINFO_ENABLED #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]); drivers[instance] = new AP_BattMonitor_DroneCAN(*this, state[instance], AP_BattMonitor_DroneCAN::UAVCAN_BATTERY_INFO, _params[instance]);
#endif
break; break;
case Type::BLHeliESC: #endif
#if AP_BATTERY_ESC_ENABLED #if AP_BATTERY_ESC_ENABLED
case Type::BLHeliESC:
drivers[instance] = new AP_BattMonitor_ESC(*this, state[instance], _params[instance]); drivers[instance] = new AP_BattMonitor_ESC(*this, state[instance], _params[instance]);
#endif
break; break;
#endif
#if AP_BATTERY_SUM_ENABLED #if AP_BATTERY_SUM_ENABLED
case Type::Sum: case Type::Sum:
drivers[instance] = new AP_BattMonitor_Sum(*this, state[instance], _params[instance], instance); drivers[instance] = new AP_BattMonitor_Sum(*this, state[instance], _params[instance], instance);