mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 00:51:36 +08:00
fmu & px4io:Use uORB Publish Auto
This commit is contained in:
committed by
Lorenz Meier
parent
33c9459ebe
commit
a7a1607689
@@ -1870,14 +1870,8 @@ PX4IO::io_publish_raw_rc()
|
||||
}
|
||||
}
|
||||
|
||||
/* lazily advertise on first publication */
|
||||
if (_to_input_rc == nullptr) {
|
||||
_to_input_rc = orb_advertise(ORB_ID(input_rc), &rc_val);
|
||||
|
||||
} else {
|
||||
orb_publish(ORB_ID(input_rc), _to_input_rc, &rc_val);
|
||||
}
|
||||
|
||||
int instance = 0;
|
||||
orb_publish_auto(ORB_ID(input_rc), &_to_input_rc, &rc_val, &instance, ORB_PRIO_HIGH);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user