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:
Morten Fyhn Amundsen 2020-02-20 12:52:20 +01:00 committed by Beat Küng
parent 1d89351149
commit 0ac300f77a
3 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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();