mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
IO: Cleanup DSM input routine
This commit is contained in:
@@ -73,16 +73,15 @@ static unsigned _rssi_adc_counts = 0;
|
||||
|
||||
bool dsm_port_input(uint16_t *rssi, bool *dsm_updated, bool *st24_updated, bool *sumd_updated)
|
||||
{
|
||||
perf_begin(c_gather_dsm);
|
||||
uint16_t temp_count = r_raw_rc_count;
|
||||
perf_begin(c_gather_dsm);
|
||||
uint8_t n_bytes = 0;
|
||||
uint8_t *bytes;
|
||||
*dsm_updated = dsm_input(r_raw_rc_values, &temp_count, &n_bytes, &bytes, PX4IO_RC_INPUT_CHANNELS);
|
||||
bool dsm_11_bit;
|
||||
*dsm_updated = dsm_input(_dsm_fd, r_raw_rc_values, &r_raw_rc_count, &dsm_11_bit, &n_bytes, &bytes, PX4IO_RC_INPUT_CHANNELS);
|
||||
|
||||
if (*dsm_updated) {
|
||||
r_raw_rc_count = temp_count & 0x7fff;
|
||||
if (*dsm_updated) {
|
||||
|
||||
if (temp_count & 0x8000) {
|
||||
if (dsm_11_bit) {
|
||||
r_raw_rc_flags |= PX4IO_P_RAW_RC_FLAGS_RC_DSM11;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user