forked from Archive/PX4-Autopilot
rc_input: move to uORB::PublicationMulti<>
This commit is contained in:
parent
6941077218
commit
2989ce981c
|
@ -71,8 +71,6 @@ RCInput::RCInput(bool run_as_task, char *device) :
|
|||
|
||||
RCInput::~RCInput()
|
||||
{
|
||||
orb_unadvertise(_to_input_rc);
|
||||
|
||||
#ifdef RC_SERIAL_PORT
|
||||
dsm_deinit();
|
||||
#endif
|
||||
|
@ -674,8 +672,7 @@ RCInput::cycle()
|
|||
if (rc_updated) {
|
||||
perf_count(_publish_interval_perf);
|
||||
|
||||
int instance;
|
||||
orb_publish_auto(ORB_ID(input_rc), &_to_input_rc, &_rc_in, &instance, ORB_PRIO_DEFAULT);
|
||||
_to_input_rc.publish(_rc_in);
|
||||
|
||||
} else if (!rc_updated && ((hrt_absolute_time() - _rc_in.timestamp_last_signal) > 1_s)) {
|
||||
_rc_scan_locked = false;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
#include <px4_log.h>
|
||||
#include <px4_module.h>
|
||||
#include <px4_workqueue.h>
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/PublicationMulti.hpp>
|
||||
#include <uORB/topics/adc_report.h>
|
||||
#include <uORB/topics/input_rc.h>
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
|
@ -129,7 +131,7 @@ private:
|
|||
float _analog_rc_rssi_volt{-1.0f};
|
||||
bool _analog_rc_rssi_stable{false};
|
||||
|
||||
orb_advert_t _to_input_rc{nullptr};
|
||||
uORB::PublicationMulti<input_rc_s> _to_input_rc{ORB_ID(input_rc)};
|
||||
|
||||
int _rcs_fd{-1};
|
||||
char _device[20] {}; ///< device / serial port path
|
||||
|
|
Loading…
Reference in New Issue