mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_BattMonitor: add and use AP_BATTMON_SMBUS_SOLO_ENABLED
This commit is contained in:
parent
6b088c6a83
commit
eab6ef72e1
@ -265,10 +265,12 @@ AP_BattMonitor::init()
|
||||
case Type::ANALOG_VOLTAGE_AND_CURRENT:
|
||||
drivers[instance] = new AP_BattMonitor_Analog(*this, state[instance], _params[instance]);
|
||||
break;
|
||||
#if AP_BATTMON_SMBUS_ENABLE
|
||||
#if AP_BATTMON_SMBUS_SOLO_ENABLED
|
||||
case Type::SOLO:
|
||||
drivers[instance] = new AP_BattMonitor_SMBus_Solo(*this, state[instance], _params[instance]);
|
||||
break;
|
||||
#endif
|
||||
#if AP_BATTMON_SMBUS_ENABLE
|
||||
case Type::SMBus_Generic:
|
||||
drivers[instance] = new AP_BattMonitor_SMBus_Generic(*this, state[instance], _params[instance]);
|
||||
break;
|
||||
|
@ -20,3 +20,6 @@
|
||||
#define AP_BATTMON_SYNTHETIC_CURRENT_ENABLED 1
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_SMBUS_SOLO_ENABLED
|
||||
#define AP_BATTMON_SMBUS_SOLO_ENABLED 0 // turned on in hwdefs
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user