fix EscBattery: remove _battery.publish();

updateBatteryStatus() already publishes
This commit is contained in:
Beat Küng
2020-10-16 15:05:52 +02:00
parent be0f884dde
commit 6ae17eb13c
2 changed files with 5 additions and 6 deletions
+5 -5
View File
@@ -100,11 +100,6 @@ public:
void updateBatteryStatus(const hrt_abstime &timestamp, 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)
-1
View File
@@ -113,7 +113,6 @@ EscBattery::Run()
battery_status_s::BATTERY_SOURCE_ESCS,
priority,
ctrl.control[actuator_controls_s::INDEX_THROTTLE]);
_battery.publish();
}
}