mavlink and commander app: Add support for manual input, either directly or via remote control

This commit is contained in:
Lorenz Meier
2015-05-24 17:40:06 +02:00
parent af546def91
commit 01fd84e4dc
8 changed files with 87 additions and 27 deletions
+2 -2
View File
@@ -828,7 +828,7 @@ int commander_thread_main(int argc, char *argv[])
param_t _param_ef_time_thres = param_find("COM_EF_TIME");
param_t _param_autostart_id = param_find("SYS_AUTOSTART");
param_t _param_autosave_params = param_find("COM_AUTOS_PAR");
param_t _param_rc_in_off = param_find("COM_RC_IN_OFF");
param_t _param_rc_in_off = param_find("COM_RC_IN_MODE");
const char *main_states_str[vehicle_status_s::MAIN_STATE_MAX];
main_states_str[vehicle_status_s::MAIN_STATE_MANUAL] = "MANUAL";
@@ -1237,7 +1237,7 @@ int commander_thread_main(int argc, char *argv[])
param_get(_param_datalink_loss_timeout, &datalink_loss_timeout);
param_get(_param_rc_loss_timeout, &rc_loss_timeout);
param_get(_param_rc_in_off, &rc_in_off);
status.rc_input_off = rc_in_off;
status.rc_input_off = (rc_in_off == vehicle_status_s::RC_IN_MODE_OFF);
param_get(_param_datalink_regain_timeout, &datalink_regain_timeout);
param_get(_param_ef_throttle_thres, &ef_throttle_thres);
param_get(_param_ef_current2throttle_thres, &ef_current2throttle_thres);
+6 -4
View File
@@ -199,11 +199,13 @@ PARAM_DEFINE_INT32(COM_AUTOS_PAR, 1);
/**
* Disable RC control input
*
* Setting this to 1 disables RC input handling and the associated checks. This is
* mainly inteded for pure offboard control or tablet control use.
* The default value of 0 requires a valid RC transmitter setup.
* Setting this to 1 disables RC input handling and the associated checks. A value of
* 2 will generate RC control data from manual input received via MAVLink instead
* of directly forwarding the manual input data.
*
* @group Commander
* @min 0
* @max 1
* @max 2
*/
PARAM_DEFINE_INT32(COM_RC_IN_OFF, 0);
PARAM_DEFINE_INT32(COM_RC_IN_MODE, 0);