rc: enable crsf and ghst telemetry on supported boards

Co-authored-by: Benjamin Linne <benjamin.linne.civ@mail.mil>
This commit is contained in:
benjinne
2021-04-07 08:51:49 +02:00
committed by GitHub
co-authored by Benjamin Linne
parent 6fbb409e43
commit 9b7eae4043
4 changed files with 11 additions and 7 deletions
+8 -7
View File
@@ -621,16 +621,15 @@ void RCInput::Run()
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_CRSF;
fill_rc_in(_raw_rc_count, _raw_rc_values, cycle_timestamp, false, false, 0);
// Enable CRSF Telemetry only on the Omnibus, because on Pixhawk (-related) boards
// 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
// on Pixhawk (-related) boards we cannot write to the RC UART
// another option is to use a different UART port
#ifdef BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT
if (!_rc_scan_locked && !_crsf_telemetry) {
_crsf_telemetry = new CRSFTelemetry(_rcs_fd);
}
#endif /* CONFIG_ARCH_BOARD_OMNIBUS_F4SD */
#endif /* BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT */
_rc_scan_locked = true;
@@ -669,13 +668,15 @@ void RCInput::Run()
fill_rc_in(_raw_rc_count, _raw_rc_values, cycle_timestamp, false, false, 0, ghst_rssi);
// ghst telemetry works on fmu-v5
// on other Pixhawk (-related) boards it does not work because
// we cannot write to the RC UART
// on other Pixhawk (-related) boards we cannot write to the RC UART
// another option is to use a different UART port
#ifdef BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT
if (!_rc_scan_locked && !_ghst_telemetry) {
_ghst_telemetry = new GHSTTelemetry(_rcs_fd);
}
#endif /* BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT */
_rc_scan_locked = true;