mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Work around orb_check fail in sensors app
This commit is contained in:
@@ -1141,10 +1141,13 @@ Sensors::ppm_poll()
|
||||
{
|
||||
|
||||
/* read low-level values from FMU or IO RC inputs (PPM, Spektrum, S.Bus) */
|
||||
bool rc_updated;
|
||||
orb_check(_rc_sub, &rc_updated);
|
||||
struct pollfd fds[1];
|
||||
fds[0].fd = _rc_sub;
|
||||
fds[0].events = POLLIN;
|
||||
/* check non-blocking for new data */
|
||||
int poll_ret = poll(fds, 1, 0);
|
||||
|
||||
if (rc_updated) {
|
||||
if (poll_ret > 0) {
|
||||
struct rc_input_values rc_input;
|
||||
|
||||
orb_copy(ORB_ID(input_rc), _rc_sub, &rc_input);
|
||||
|
||||
Reference in New Issue
Block a user