mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 03:43:35 +08:00
BatteryStatus: remove voltage_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Matthias Grob
parent
c2ae6a7e24
commit
33701aa3d5
@@ -241,7 +241,7 @@ OSDatxxxx::add_battery_info(uint8_t pos_x, uint8_t pos_y)
|
||||
int ret = PX4_OK;
|
||||
|
||||
// TODO: show battery symbol based on battery fill level
|
||||
snprintf(buf, sizeof(buf), "%c%5.2f", OSD_SYMBOL_BATT_3, (double)_battery_voltage_filtered_v);
|
||||
snprintf(buf, sizeof(buf), "%c%5.2f", OSD_SYMBOL_BATT_3, (double)_battery_voltage_v);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
|
||||
for (int i = 0; buf[i] != '\0'; i++) {
|
||||
@@ -330,7 +330,7 @@ OSDatxxxx::update_topics()
|
||||
_battery_sub.copy(&battery);
|
||||
|
||||
if (battery.connected) {
|
||||
_battery_voltage_filtered_v = battery.voltage_filtered_v;
|
||||
_battery_voltage_v = battery.voltage_v;
|
||||
_battery_discharge_mah = battery.discharged_mah;
|
||||
_battery_valid = true;
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
uORB::Subscription _vehicle_status_sub{ORB_ID(vehicle_status)};
|
||||
|
||||
// battery
|
||||
float _battery_voltage_filtered_v{0.f};
|
||||
float _battery_voltage_v{0.f};
|
||||
float _battery_discharge_mah{0.f};
|
||||
bool _battery_valid{false};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user