mirror of https://github.com/ArduPilot/ardupilot
tridge: report mode switch changes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1801 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
7c4b7cba0a
commit
966cacf906
|
@ -6,12 +6,14 @@ void read_control_switch()
|
||||||
//motor_armed = (switchPosition < 5);
|
//motor_armed = (switchPosition < 5);
|
||||||
|
|
||||||
if (oldSwitchPosition != switchPosition){
|
if (oldSwitchPosition != switchPosition){
|
||||||
|
|
||||||
set_mode(g.flight_modes[switchPosition]);
|
set_mode(g.flight_modes[switchPosition]);
|
||||||
|
|
||||||
oldSwitchPosition = switchPosition;
|
oldSwitchPosition = switchPosition;
|
||||||
prev_WP = current_loc;
|
prev_WP = current_loc;
|
||||||
|
|
||||||
|
Serial.print("Changed to flight mode: ");
|
||||||
|
Serial.println(flight_mode_strings[g.flight_modes[switchPosition]]);
|
||||||
|
|
||||||
// reset navigation integrators
|
// reset navigation integrators
|
||||||
// -------------------------
|
// -------------------------
|
||||||
reset_I();
|
reset_I();
|
||||||
|
|
Loading…
Reference in New Issue