mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Rename generate virtual RC setter/getter
The old names were unclear to me, especially when used in the mavlink_receiver.
This commit is contained in:
parent
1d89351149
commit
0ac300f77a
@ -2267,7 +2267,7 @@ Mavlink::task_main(int argc, char *argv[])
|
||||
/* switch HIL mode if required */
|
||||
set_hil_enabled(status.hil_state == vehicle_status_s::HIL_STATE_ON);
|
||||
|
||||
set_manual_input_mode_generation(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_GENERATED);
|
||||
set_generate_virtual_rc_input(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_GENERATED);
|
||||
|
||||
if (_mode == MAVLINK_MODE_IRIDIUM) {
|
||||
|
||||
|
||||
@ -302,7 +302,7 @@ public:
|
||||
*
|
||||
* @param generation_enabled If set to true, generate RC_INPUT messages
|
||||
*/
|
||||
void set_manual_input_mode_generation(bool generation_enabled) { _generate_rc = generation_enabled; }
|
||||
void set_generate_virtual_rc_input(bool generation_enabled) { _generate_rc = generation_enabled; }
|
||||
|
||||
/**
|
||||
* Set communication protocol for this mavlink instance
|
||||
@ -314,7 +314,7 @@ public:
|
||||
*
|
||||
* @return true if manual inputs should generate RC data
|
||||
*/
|
||||
bool get_manual_input_mode_generation() { return _generate_rc; }
|
||||
bool should_generate_virtual_rc_input() { return _generate_rc; }
|
||||
|
||||
/**
|
||||
* This is the beginning of a MAVLINK_START_UART_SEND/MAVLINK_END_UART_SEND transaction
|
||||
|
||||
@ -1936,7 +1936,7 @@ MavlinkReceiver::handle_message_manual_control(mavlink_message_t *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mavlink->get_manual_input_mode_generation()) {
|
||||
if (_mavlink->should_generate_virtual_rc_input()) {
|
||||
|
||||
input_rc_s rc{};
|
||||
rc.timestamp = hrt_absolute_time();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user