mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 09:03:35 +08:00
Adding BatMon smart battery as a module and refactoring SMBUS based SBS 1.1 spec to a library
This commit is contained in:
@@ -47,8 +47,8 @@
|
||||
#include "SMBus.hpp"
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
SMBus::SMBus(int bus_num, uint16_t address) :
|
||||
I2C(DRV_BAT_DEVTYPE_SMBUS, MODULE_NAME, bus_num, address, 100000)
|
||||
SMBus::SMBus(uint8_t device_id, int bus_num, uint16_t address) :
|
||||
I2C(device_id, MODULE_NAME, bus_num, address, 100000)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class SMBus : public device::I2C
|
||||
public:
|
||||
static constexpr uint8_t MAX_BLOCK_LEN = 34;
|
||||
|
||||
SMBus(int bus_num, uint16_t address);
|
||||
SMBus(uint8_t device_id, int bus_num, uint16_t address);
|
||||
~SMBus() override;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user