mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 06:43:35 +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)
|
||||
|
||||
Reference in New Issue
Block a user