VOXL Inspect Battery
This tool subscribes to the /run/mpa/mavlink_sys_status pipe published by voxl-vision-hub which provides a copy of all SYS_STATUS mavlink messages received from a PX4 flight controller. Among other things, this packet contains battery status information which can be viewed here.
Also note that voxl-portal subscribes to the same pipe and also shows battery percentage in the top right corner of the webpage.
Arguments
voxl2:/$ voxl-inspect-battery --help
Tool to print battery data from autopilot to the screen for inspection.
If no data comes through then either:
1. the voxl-vision-hub service isn't running
2. autopilot isn't connected
-h, --help print this help message
-n, --newline print newline between each sample
Use
voxl2:/$ voxl-inspect-battery
Voltage | Charge | Current | Power |
12.22V | 89% | 0.49A | 5.99W |
Troubleshooting
If no data is displayed, then either voxl-vision-hub is not running or PX4 is not connected or operating. Individual fields print N/A when the autopilot reports invalid values.
Source
Source code available on Gitlab.