mavlink app: Improved mapping to RC input

This commit is contained in:
Lorenz Meier
2015-05-24 18:21:28 +02:00
parent 01fd84e4dc
commit 2bb655c46c
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ struct rc_input_values {
/** number of channels actually being seen */
uint32_t channel_count;
/** receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 255: full reception */
/** receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 100: full reception */
int32_t rssi;
/**
+2 -1
View File
@@ -926,8 +926,9 @@ MavlinkReceiver::handle_message_manual_control(mavlink_message_t *msg)
rc.rc_lost = false;
rc.rc_lost_frame_count = 0;
rc.rc_total_frame_count = 1;
rc.rc_ppm_frame_length = (2 * rc.channel_count + 4) * 1000;
rc.rc_ppm_frame_length = 0;
rc.input_source = RC_INPUT_SOURCE_MAVLINK;
rc.rssi = RC_INPUT_RSSI_MAX;
rc.values[0] = man.x * 500 + 1500;
rc.values[1] = man.y * 500 + 1500;
rc.values[2] = man.r / 2.0f + 1500;