mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 17:48:35 -04:00
AP_BattMonitor: Maxell driver inherits from SMBus_Generic
This commit is contained in:
parent
f869cd9aa6
commit
4ea565e4ed
@ -121,6 +121,12 @@ AP_BattMonitor::init()
|
|||||||
hal.i2c_mgr->get_device(_params[instance]._i2c_bus, AP_BATTMONITOR_SMBUS_I2C_ADDR,
|
hal.i2c_mgr->get_device(_params[instance]._i2c_bus, AP_BATTMONITOR_SMBUS_I2C_ADDR,
|
||||||
100000, true, 20));
|
100000, true, 20));
|
||||||
break;
|
break;
|
||||||
|
case AP_BattMonitor_Params::BattMonitor_TYPE_MAXELL:
|
||||||
|
_params[instance]._i2c_bus.set_default(AP_BATTMONITOR_SMBUS_BUS_EXTERNAL);
|
||||||
|
drivers[instance] = new AP_BattMonitor_SMBus_Maxell(*this, state[instance], _params[instance],
|
||||||
|
hal.i2c_mgr->get_device(_params[instance]._i2c_bus, AP_BATTMONITOR_SMBUS_I2C_ADDR,
|
||||||
|
100000, true, 20));
|
||||||
|
break;
|
||||||
case AP_BattMonitor_Params::BattMonitor_TYPE_SUI3:
|
case AP_BattMonitor_Params::BattMonitor_TYPE_SUI3:
|
||||||
_params[instance]._i2c_bus.set_default(AP_BATTMONITOR_SMBUS_BUS_INTERNAL),
|
_params[instance]._i2c_bus.set_default(AP_BATTMONITOR_SMBUS_BUS_INTERNAL),
|
||||||
drivers[instance] = new AP_BattMonitor_SMBus_SUI(*this, state[instance], _params[instance],
|
drivers[instance] = new AP_BattMonitor_SMBus_SUI(*this, state[instance], _params[instance],
|
||||||
|
@ -33,6 +33,7 @@ class AP_BattMonitor_Analog;
|
|||||||
class AP_BattMonitor_SMBus;
|
class AP_BattMonitor_SMBus;
|
||||||
class AP_BattMonitor_SMBus_Solo;
|
class AP_BattMonitor_SMBus_Solo;
|
||||||
class AP_BattMonitor_SMBus_Generic;
|
class AP_BattMonitor_SMBus_Generic;
|
||||||
|
class AP_BattMonitor_SMBus_Maxell;
|
||||||
class AP_BattMonitor_UAVCAN;
|
class AP_BattMonitor_UAVCAN;
|
||||||
|
|
||||||
class AP_BattMonitor
|
class AP_BattMonitor
|
||||||
@ -42,6 +43,7 @@ class AP_BattMonitor
|
|||||||
friend class AP_BattMonitor_SMBus;
|
friend class AP_BattMonitor_SMBus;
|
||||||
friend class AP_BattMonitor_SMBus_Solo;
|
friend class AP_BattMonitor_SMBus_Solo;
|
||||||
friend class AP_BattMonitor_SMBus_Generic;
|
friend class AP_BattMonitor_SMBus_Generic;
|
||||||
|
friend class AP_BattMonitor_SMBus_Maxell;
|
||||||
friend class AP_BattMonitor_UAVCAN;
|
friend class AP_BattMonitor_UAVCAN;
|
||||||
friend class AP_BattMonitor_Sum;
|
friend class AP_BattMonitor_Sum;
|
||||||
friend class AP_BattMonitor_FuelFlow;
|
friend class AP_BattMonitor_FuelFlow;
|
||||||
|
@ -100,3 +100,4 @@ protected:
|
|||||||
// include specific implementations
|
// include specific implementations
|
||||||
#include "AP_BattMonitor_SMBus_Solo.h"
|
#include "AP_BattMonitor_SMBus_Solo.h"
|
||||||
#include "AP_BattMonitor_SMBus_Generic.h"
|
#include "AP_BattMonitor_SMBus_Generic.h"
|
||||||
|
#include "AP_BattMonitor_SMBus_Maxell.h"
|
||||||
|
9
libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Maxell.h
Normal file
9
libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Maxell.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AP_BattMonitor_SMBus_Generic.h"
|
||||||
|
|
||||||
|
class AP_BattMonitor_SMBus_Maxell : public AP_BattMonitor_SMBus_Generic
|
||||||
|
{
|
||||||
|
using AP_BattMonitor_SMBus_Generic::AP_BattMonitor_SMBus_Generic;
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user