mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 19:13:33 +08:00
drivers/rc_input: don't accept RX_PAIR cmd when armed
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
#include <uORB/topics/input_rc.h>
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
|
||||
#include "crsf_telemetry.h"
|
||||
#include "ghst_telemetry.hpp"
|
||||
@@ -125,14 +126,6 @@ private:
|
||||
|
||||
void rc_io_invert(bool invert);
|
||||
|
||||
/**
|
||||
* Respond to a vehicle command with an ACK message
|
||||
*
|
||||
* @param cmd The command that was executed or denied (inbound)
|
||||
* @param result The command result
|
||||
*/
|
||||
void answer_command(const vehicle_command_s &cmd, uint8_t result);
|
||||
|
||||
hrt_abstime _rc_scan_begin{0};
|
||||
|
||||
bool _initialized{false};
|
||||
@@ -143,14 +136,17 @@ private:
|
||||
|
||||
uORB::SubscriptionInterval _parameter_update_sub{ORB_ID(parameter_update), 1_s};
|
||||
|
||||
uORB::Subscription _adc_report_sub{ORB_ID(adc_report)};
|
||||
uORB::Subscription _vehicle_cmd_sub{ORB_ID(vehicle_command)};
|
||||
uORB::Subscription _adc_sub{ORB_ID(adc_report)};
|
||||
uORB::Subscription _vehicle_status_sub{ORB_ID(vehicle_status)};
|
||||
|
||||
input_rc_s _rc_in{};
|
||||
|
||||
float _analog_rc_rssi_volt{-1.0f};
|
||||
bool _analog_rc_rssi_stable{false};
|
||||
|
||||
bool _armed{false};
|
||||
|
||||
|
||||
uORB::PublicationMulti<input_rc_s> _to_input_rc{ORB_ID(input_rc)};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user