mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 13:20:34 +08:00
fix EscBattery: remove _battery.publish();
updateBatteryStatus() already publishes
This commit is contained in:
@@ -100,11 +100,6 @@ public:
|
||||
void updateBatteryStatus(const hrt_abstime ×tamp, float voltage_v, float current_a, bool connected,
|
||||
int source, int priority, float throttle_normalized);
|
||||
|
||||
/**
|
||||
* Publishes the uORB battery_status message with the most recently-updated data.
|
||||
*/
|
||||
void publish();
|
||||
|
||||
protected:
|
||||
struct {
|
||||
param_t v_empty;
|
||||
@@ -159,6 +154,11 @@ protected:
|
||||
bool _first_parameter_update{true};
|
||||
void updateParams() override;
|
||||
|
||||
/**
|
||||
* Publishes the uORB battery_status message with the most recently-updated data.
|
||||
*/
|
||||
void publish();
|
||||
|
||||
/**
|
||||
* This function helps migrating and syncing from/to deprecated parameters. BAT_* BAT1_*
|
||||
* @tparam T Type of the parameter (int or float)
|
||||
|
||||
@@ -113,7 +113,6 @@ EscBattery::Run()
|
||||
battery_status_s::BATTERY_SOURCE_ESCS,
|
||||
priority,
|
||||
ctrl.control[actuator_controls_s::INDEX_THROTTLE]);
|
||||
_battery.publish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user