mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +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:
committed by
Beat Küng
parent
1d89351149
commit
0ac300f77a
@@ -2267,7 +2267,7 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
/* switch HIL mode if required */
|
/* switch HIL mode if required */
|
||||||
set_hil_enabled(status.hil_state == vehicle_status_s::HIL_STATE_ON);
|
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) {
|
if (_mode == MAVLINK_MODE_IRIDIUM) {
|
||||||
|
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param generation_enabled If set to true, generate RC_INPUT messages
|
* @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
|
* Set communication protocol for this mavlink instance
|
||||||
@@ -314,7 +314,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @return true if manual inputs should generate RC data
|
* @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
|
* 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_mavlink->get_manual_input_mode_generation()) {
|
if (_mavlink->should_generate_virtual_rc_input()) {
|
||||||
|
|
||||||
input_rc_s rc{};
|
input_rc_s rc{};
|
||||||
rc.timestamp = hrt_absolute_time();
|
rc.timestamp = hrt_absolute_time();
|
||||||
|
|||||||
Reference in New Issue
Block a user