mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Merge branch 'master' into beta
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!nsh
|
#!nsh
|
||||||
#
|
#
|
||||||
# Initialise logging services.
|
# Initialize logging services.
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -d /fs/microsd ]
|
if [ -d /fs/microsd ]
|
||||||
|
|||||||
@@ -1302,6 +1302,7 @@ PX4IO::io_handle_battery(uint16_t vbatt, uint16_t ibatt)
|
|||||||
|
|
||||||
/* voltage is scaled to mV */
|
/* voltage is scaled to mV */
|
||||||
battery_status.voltage_v = vbatt / 1000.0f;
|
battery_status.voltage_v = vbatt / 1000.0f;
|
||||||
|
battery_status.voltage_filtered_v = vbatt / 1000.0f;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ibatt contains the raw ADC count, as 12 bit ADC
|
ibatt contains the raw ADC count, as 12 bit ADC
|
||||||
|
|||||||
@@ -1546,8 +1546,8 @@ Sensors::task_main()
|
|||||||
raw.adc_voltage_v[3] = 0.0f;
|
raw.adc_voltage_v[3] = 0.0f;
|
||||||
|
|
||||||
memset(&_battery_status, 0, sizeof(_battery_status));
|
memset(&_battery_status, 0, sizeof(_battery_status));
|
||||||
_battery_status.voltage_v = 0.0f;
|
_battery_status.voltage_v = -1.0f;
|
||||||
_battery_status.voltage_filtered_v = 0.0f;
|
_battery_status.voltage_filtered_v = -1.0f;
|
||||||
_battery_status.current_a = -1.0f;
|
_battery_status.current_a = -1.0f;
|
||||||
_battery_status.discharged_mah = -1.0f;
|
_battery_status.discharged_mah = -1.0f;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user