mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 02:23:35 +08:00
INA226: Integrate with PX4 (#12673)
* Publish I2C battery data as battery_status
This commit is contained in:
committed by
Daniel Agar
parent
574b482fdb
commit
fc1341208f
@@ -98,6 +98,11 @@ Battery::Battery(int index, ModuleParams *parent) :
|
||||
updateParams();
|
||||
}
|
||||
|
||||
Battery::~Battery()
|
||||
{
|
||||
orb_unadvertise(_orb_advert);
|
||||
}
|
||||
|
||||
void
|
||||
Battery::reset()
|
||||
{
|
||||
|
||||
@@ -65,6 +65,8 @@ class Battery : public ModuleParams
|
||||
public:
|
||||
Battery(int index, ModuleParams *parent);
|
||||
|
||||
~Battery();
|
||||
|
||||
/**
|
||||
* Reset all battery stats and report invalid/nothing.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user