mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:03:34 +08:00
battery: fix parameter migration and clarify
This commit is contained in:
@@ -107,7 +107,7 @@ Battery::Battery(int index, ModuleParams *parent, const int sample_interval_us)
|
||||
|
||||
Battery::~Battery()
|
||||
{
|
||||
orb_unadvertise(_orb_advert);
|
||||
orb_unadvertise(_battery_status_pub);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -186,7 +186,8 @@ Battery::updateBatteryStatus(hrt_abstime timestamp, float voltage_v, float curre
|
||||
void
|
||||
Battery::publish()
|
||||
{
|
||||
orb_publish_auto(ORB_ID(battery_status), &_orb_advert, &_battery_status, &_orb_instance);
|
||||
int dummy; // We're not interested in the instance ID we get
|
||||
orb_publish_auto(ORB_ID(battery_status), &_battery_status_pub, &_battery_status, &dummy);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user