diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-11 07:35:40 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-11 07:35:40 +0100 |
commit | 65c802862979041efc6014f8c6fac240d49a806b (patch) | |
tree | 0c7c51baf52c1e74fef15d574fe70c0524fa041d | |
parent | 1d4feb690512fbb5e0ae3399c1b1595ca8ddb79a (diff) | |
download | px4-firmware-65c802862979041efc6014f8c6fac240d49a806b.tar.gz px4-firmware-65c802862979041efc6014f8c6fac240d49a806b.tar.bz2 px4-firmware-65c802862979041efc6014f8c6fac240d49a806b.zip |
Working on override channel mapping, allowed trim cal only with RC on
-rw-r--r-- | apps/commander/commander.c | 5 | ||||
-rw-r--r-- | apps/px4io/mixer.cpp | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c index 8323932c7..c39c3d6db 100644 --- a/apps/commander/commander.c +++ b/apps/commander/commander.c @@ -277,6 +277,11 @@ void tune_error(void) { void do_rc_calibration(int status_pub, struct vehicle_status_s *status) { + if (current_status.offboard_control_signal_lost) { + mavlink_log_critical(mavlink_fd, "TRIM CAL: ABORT. No RC signal."); + return; + } + int sub_man = orb_subscribe(ORB_ID(manual_control_setpoint)); struct manual_control_setpoint_s sp; orb_copy(ORB_ID(manual_control_setpoint), sub_man, &sp); diff --git a/apps/px4io/mixer.cpp b/apps/px4io/mixer.cpp index 93fe93b39..ed7d684b6 100644 --- a/apps/px4io/mixer.cpp +++ b/apps/px4io/mixer.cpp @@ -72,6 +72,7 @@ extern "C" { #define PITCH 1 #define YAW 2 #define THROTTLE 3 +#define OVERRIDE 4 /* current servo arm/disarm state */ bool mixer_servos_armed = false; @@ -125,6 +126,7 @@ mixer_tick(void) rc_channel_data[PITCH] = system_state.rc_channel_data[system_state.rc_map[PITCH] - 1]; rc_channel_data[YAW] = system_state.rc_channel_data[system_state.rc_map[YAW] - 1]; rc_channel_data[THROTTLE] = system_state.rc_channel_data[system_state.rc_map[THROTTLE] - 1]; + //rc_channel_data[OVERRIDE] = system_state.rc_channel_data[system_state.rc_map[OVERRIDE] - 1]; /* get the remaining channels, no remapping needed */ for (unsigned i = 4; i < system_state.rc_channels; i++) { |