Skip to content

Commit

Permalink
sensors: split out analog battery handling to new standalone battery_…
Browse files Browse the repository at this point in the history
…status module
dagar authored Oct 21, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f956baf commit 6a0f524
Showing 53 changed files with 800 additions and 293 deletions.
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
@@ -340,6 +340,7 @@ else
fi
unset BOARD_RC_SENSORS

battery_status start

sh /etc/init.d/rc.sensors
commander start
1 change: 1 addition & 0 deletions boards/aerotenna/ocpoc/ubuntu.cmake
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
#simulator
1 change: 1 addition & 0 deletions boards/airmind/mindpx-v2/default.cmake
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/auav/x21/default.cmake
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/av/x-v1/default.cmake
Original file line number Diff line number Diff line change
@@ -71,6 +71,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/beaglebone/blue/cross.cmake
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/beaglebone/blue/native.cmake
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
6 changes: 0 additions & 6 deletions boards/bitcraze/crazyflie/src/board_config.h
Original file line number Diff line number Diff line change
@@ -153,12 +153,6 @@
*/
#define ADC_CHANNELS 0

// ADC defines to be used in sensors.cpp to read from a particular channel
// Crazyflie 2 performs battery sensing via the NRF module
#define ADC_BATTERY_VOLTAGE_CHANNEL ((uint8_t)(-1))
#define ADC_BATTERY_CURRENT_CHANNEL ((uint8_t)(-1))
#define ADC_AIRSPEED_VOLTAGE_CHANNEL ((uint8_t)(-1))

/* Tone alarm output : These are only applicable when the buzzer deck is attached */
#define TONE_ALARM_TIMER 5 /* timer 5 */
#define TONE_ALARM_CHANNEL 3 /* channel 3 */
2 changes: 2 additions & 0 deletions boards/bitcraze/crazyflie/syslink/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -42,4 +42,6 @@ px4_add_module(
syslink_memory.cpp
syslink_params.c
syslink.c
DEPENDS
battery
)
1 change: 1 addition & 0 deletions boards/emlid/navio2/cross.cmake
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
#simulator
1 change: 1 addition & 0 deletions boards/emlid/navio2/native.cmake
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
#simulator
1 change: 1 addition & 0 deletions boards/holybro/kakutef7/default.cmake
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors

SYSTEMCMDS
1 change: 1 addition & 0 deletions boards/intel/aerofc-v1/default.cmake
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
#sih
vmount
1 change: 1 addition & 0 deletions boards/intel/aerofc-v1/rtps.cmake
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ px4_add_board(
mc_pos_control
micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/mro/ctrl-zero-f7/default.cmake
Original file line number Diff line number Diff line change
@@ -73,6 +73,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/nxp/fmuk66-v3/default.cmake
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/omnibus/f4sd/default.cmake
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
#vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v2/default.cmake
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
vmount
vtol_att_control
1 change: 1 addition & 0 deletions boards/px4/fmu-v2/fixedwing.cmake
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ px4_add_board(
logger
mavlink
navigator
battery_status
sensors
vmount
airspeed_selector
1 change: 1 addition & 0 deletions boards/px4/fmu-v2/lpe.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
vmount
#vtol_att_control
1 change: 1 addition & 0 deletions boards/px4/fmu-v2/multicopter.cmake
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
vmount

1 change: 1 addition & 0 deletions boards/px4/fmu-v2/rover.cmake
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ px4_add_board(
logger
mavlink
navigator
battery_status
sensors
vmount

1 change: 1 addition & 0 deletions boards/px4/fmu-v2/test.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
vmount
vtol_att_control
1 change: 1 addition & 0 deletions boards/px4/fmu-v3/default.cmake
Original file line number Diff line number Diff line change
@@ -79,6 +79,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v3/rtps.cmake
Original file line number Diff line number Diff line change
@@ -78,6 +78,7 @@ px4_add_board(
mc_pos_control
micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v3/stackcheck.cmake
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
5 changes: 3 additions & 2 deletions boards/px4/fmu-v4/default.cmake
Original file line number Diff line number Diff line change
@@ -47,15 +47,16 @@ px4_add_board(
uavcan

MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
events
fw_att_control
fw_pos_control_l1
rover_pos_control
land_detector
landing_target_estimator
load_mon
@@ -65,11 +66,11 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
rover_pos_control
sensors
sih
vmount
vtol_att_control
airspeed_selector

SYSTEMCMDS
bl_update
1 change: 1 addition & 0 deletions boards/px4/fmu-v4/rtps.cmake
Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ px4_add_board(
mc_pos_control
micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v4/stackcheck.cmake
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v4pro/default.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v4pro/rtps.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_pos_control
micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/critmonitor.cmake
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/default.cmake
Original file line number Diff line number Diff line change
@@ -78,6 +78,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/fixedwing.cmake
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@ px4_add_board(
logger
mavlink
navigator
battery_status
sensors
vmount
airspeed_selector
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/irqmonitor.cmake
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/multicopter.cmake
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/rover.cmake
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ px4_add_board(
logger
mavlink
navigator
battery_status
sensors
vmount

1 change: 1 addition & 0 deletions boards/px4/fmu-v5/rtps.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_pos_control
micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/stackcheck.cmake
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ px4_add_board(
mc_pos_control
#micrortps_bridge
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/raspberrypi/cross.cmake
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
1 change: 1 addition & 0 deletions boards/px4/raspberrypi/native.cmake
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
#simulator
1 change: 1 addition & 0 deletions boards/uvify/core/default.cmake
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ px4_add_board(
mc_att_control
mc_pos_control
navigator
battery_status
sensors
sih
vmount
Original file line number Diff line number Diff line change
@@ -42,4 +42,5 @@ px4_add_module(
git_driverframework
df_driver_framework
df_bebop_bus
battery
)
1 change: 1 addition & 0 deletions src/drivers/power_monitor/voxlpm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -39,5 +39,6 @@ px4_add_module(
voxlpm.cpp
voxlpm_main.cpp
DEPENDS
battery
px4_work_queue
)
Loading

0 comments on commit 6a0f524

Please sign in to comment.