diff options
author | Julian Oes <joes@student.ethz.ch> | 2013-02-21 13:06:56 -0800 |
---|---|---|
committer | Julian Oes <joes@student.ethz.ch> | 2013-02-21 13:06:56 -0800 |
commit | ebe0285ce7964ac1a81a65bae417e978cf366466 (patch) | |
tree | 4ed1344991cee2e50906df7023c4440378d23b65 /apps/controllib/fixedwing.cpp | |
parent | 0e29f2505a599d473244b0bb7e4b309d392ebb3c (diff) | |
download | px4-firmware-ebe0285ce7964ac1a81a65bae417e978cf366466.tar.gz px4-firmware-ebe0285ce7964ac1a81a65bae417e978cf366466.tar.bz2 px4-firmware-ebe0285ce7964ac1a81a65bae417e978cf366466.zip |
Checkpoint: navigation state machine as discussed with Lorenz
Diffstat (limited to 'apps/controllib/fixedwing.cpp')
-rw-r--r-- | apps/controllib/fixedwing.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/controllib/fixedwing.cpp b/apps/controllib/fixedwing.cpp index 9a6919535..584ca2306 100644 --- a/apps/controllib/fixedwing.cpp +++ b/apps/controllib/fixedwing.cpp @@ -294,8 +294,9 @@ void BlockMultiModeBacksideAutopilot::update() for (unsigned i = 4; i < NUM_ACTUATOR_CONTROLS; i++) _actuators.control[i] = 0.0f; +#warning this if is incomplete, should be based on flags // only update guidance in auto mode - if (_status.navigation_state == NAVIGATION_STATE_MISSION) { + if (_status.navigation_state == NAVIGATION_STATE_AUTO_MISSION) { // update guidance _guide.update(_pos, _att, _posCmd, _lastPosCmd); } @@ -304,8 +305,9 @@ void BlockMultiModeBacksideAutopilot::update() // once the system switches from manual or auto to stabilized // the setpoint should update to loitering around this position +#warning should be base on flags // handle autopilot modes - if (_status.navigation_state == NAVIGATION_STATE_MISSION || + if (_status.navigation_state == NAVIGATION_STATE_AUTO_MISSION || _status.navigation_state == NAVIGATION_STATE_MANUAL) { // update guidance @@ -340,7 +342,7 @@ void BlockMultiModeBacksideAutopilot::update() _actuators.control[CH_THR] : _manual.throttle; } - +#warning should be base on flags } else if (_status.navigation_state == NAVIGATION_STATE_MANUAL) { // if (_status.manual_control_mode == VEHICLE_MANUAL_CONTROL_MODE_DIRECT) { |