mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
BattMon: correct typo in monitor type enum
This commit is contained in:
parent
4521d8169b
commit
aecc8aac1f
@ -143,7 +143,7 @@ AP_BattMonitor::init()
|
||||
_num_instances++;
|
||||
|
||||
// check for SMBus
|
||||
} else if (monitor_type == RangeFinder_TYPE_SMBUS) {
|
||||
} else if (monitor_type == BattMonitor_TYPE_SMBUS) {
|
||||
state[instance].instance = instance;
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
drivers[instance] = new AP_BattMonitor_SMBus_PX4(*this, instance, state[instance]);
|
||||
@ -182,7 +182,7 @@ bool AP_BattMonitor::has_current(uint8_t instance) const
|
||||
// check for analog voltage and current monitor or smbus monitor
|
||||
if (instance < AP_BATT_MONITOR_MAX_INSTANCES) {
|
||||
if (drivers[instance] != NULL) {
|
||||
return (_monitoring[instance] == BattMonitor_TYPE_ANALOG_VOLTAGE_AND_CURRENT || _monitoring[instance] == RangeFinder_TYPE_SMBUS);
|
||||
return (_monitoring[instance] == BattMonitor_TYPE_ANALOG_VOLTAGE_AND_CURRENT || _monitoring[instance] == BattMonitor_TYPE_SMBUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
BattMonitor_TYPE_NONE = 0,
|
||||
BattMonitor_TYPE_ANALOG_VOLTAGE_ONLY = 3,
|
||||
BattMonitor_TYPE_ANALOG_VOLTAGE_AND_CURRENT = 4,
|
||||
RangeFinder_TYPE_SMBUS = 5
|
||||
BattMonitor_TYPE_SMBUS = 5
|
||||
};
|
||||
|
||||
// The BattMonitor_State structure is filled in by the backend driver
|
||||
|
Loading…
Reference in New Issue
Block a user