mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-08 13:31:35 +08:00
rc_input: Add SINGLEWIRE_MANUAL_DUPLEX for manually changing TXDIR
Fixes telemetry on fmu-v6xrt
This commit is contained in:
@@ -734,7 +734,15 @@ void RCInput::Run()
|
||||
}
|
||||
|
||||
if (_crsf_telemetry) {
|
||||
#if defined(RC_SERIAL_SINGLEWIRE_MANUAL_DUPLEX)
|
||||
ioctl(_rcs_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED | SER_SINGLEWIRE_DIR_TX);
|
||||
#endif
|
||||
_crsf_telemetry->update(cycle_timestamp);
|
||||
#if defined(RC_SERIAL_SINGLEWIRE_MANUAL_DUPLEX)
|
||||
tcflush(_rcs_fd, TCIOFLUSH);
|
||||
tcdrain(_rcs_fd); // Ensure TX FIFO is empty before swapping
|
||||
ioctl(_rcs_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED | SER_SINGLEWIRE_DIR_RX);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -787,7 +795,15 @@ void RCInput::Run()
|
||||
}
|
||||
|
||||
if (_ghst_telemetry) {
|
||||
#if defined(RC_SERIAL_SINGLEWIRE_MANUAL_DUPLEX)
|
||||
ioctl(_rcs_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED | SER_SINGLEWIRE_DIR_TX);
|
||||
#endif
|
||||
_ghst_telemetry->update(cycle_timestamp);
|
||||
#if defined(RC_SERIAL_SINGLEWIRE_MANUAL_DUPLEX)
|
||||
tcflush(_rcs_fd, TCIOFLUSH);
|
||||
tcdrain(_rcs_fd); // Ensure TX FIFO is empty before swapping
|
||||
ioctl(_rcs_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED | SER_SINGLEWIRE_DIR_RX);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user