mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
assign timestamp
This commit is contained in:
committed by
Lorenz Meier
parent
91133021d6
commit
f097e118df
@@ -79,6 +79,7 @@ void
|
|||||||
Battery::updateBatteryStatus(hrt_abstime timestamp, float voltage_v, float current_a, float throttle_normalized,
|
Battery::updateBatteryStatus(hrt_abstime timestamp, float voltage_v, float current_a, float throttle_normalized,
|
||||||
battery_status_s *battery_status)
|
battery_status_s *battery_status)
|
||||||
{
|
{
|
||||||
|
battery_status->timestamp = timestamp;
|
||||||
filterVoltage(voltage_v);
|
filterVoltage(voltage_v);
|
||||||
sumDischarged(timestamp, current_a);
|
sumDischarged(timestamp, current_a);
|
||||||
estimateRemaining(voltage_v, throttle_normalized);
|
estimateRemaining(voltage_v, throttle_normalized);
|
||||||
|
|||||||
Reference in New Issue
Block a user