ghst_telemetry: send battery status

Send battery status (ghst_telemetry). Apply factors to show correct values of volts, amps and mAh. Change ghost protocol code to follow more MISRA C++ guidelines.
This commit is contained in:
jciberlin
2021-03-15 09:42:53 +01:00
committed by Lorenz Meier
parent af3573e464
commit 6f5efbeab5
8 changed files with 157 additions and 132 deletions
+2 -4
View File
@@ -654,16 +654,14 @@ void RCInput::Run()
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_GHST;
fill_rc_in(_raw_rc_count, _raw_rc_values, cycle_timestamp, false, false, 0, ghst_rssi);
// Enable GHST Telemetry only on the Omnibus, because on Pixhawk (-related) boards
// ghst telemetry works on fmu-v5
// on other Pixhawk (-related) boards it does not work because
// we cannot write to the RC UART
// It might work on FMU-v5. Or another option is to use a different UART port
#ifdef CONFIG_ARCH_BOARD_OMNIBUS_F4SD
if (!_rc_scan_locked && !_ghst_telemetry) {
_ghst_telemetry = new GHSTTelemetry(_rcs_fd);
}
#endif /* CONFIG_ARCH_BOARD_OMNIBUS_F4SD */
_rc_scan_locked = true;