mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
lib/rc/dsm: update proto init to have reset incorporated as well (#22995)
* update voxl2-slpi spektrum_rc driver
This commit is contained in:
parent
0f665f2772
commit
d908b68c78
@ -46,7 +46,7 @@ add_library(drivers_board
|
||||
# Add custom drivers for SLPI
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/rc_controller)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/mavlink_rc_in)
|
||||
# add_subdirectory(${PX4_BOARD_DIR}/src/drivers/spektrum_rc)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/spektrum_rc)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/ghst_rc)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/dsp_hitl)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/dsp_sbus)
|
||||
|
||||
@ -110,16 +110,18 @@ void task_main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
int uart_fd = dsm_init(device_path);
|
||||
int uart_fd = qurt_uart_open(device_path, 115200);
|
||||
|
||||
if (uart_fd < 0) {
|
||||
PX4_ERR("dsm init failed");
|
||||
PX4_ERR("uart open failed");
|
||||
return;
|
||||
|
||||
} else if (verbose) {
|
||||
PX4_INFO("Spektrum RC: dsm_init succeeded");
|
||||
PX4_INFO("Spektrum RC: uart open succeeded");
|
||||
}
|
||||
|
||||
dsm_proto_init();
|
||||
|
||||
orb_advert_t rc_pub = nullptr;
|
||||
|
||||
// Use a buffer size of the double of the minimum, just to be safe.
|
||||
|
||||
@ -481,6 +481,9 @@ void dsm_proto_init()
|
||||
channel_buffer[i].last_seen = 0;
|
||||
channel_buffer[i].value = 0;
|
||||
}
|
||||
|
||||
/* reset the format detector */
|
||||
dsm_guess_format(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user