Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rotorcraft] RC commands set when not in nav
Rotorcraft commands are set with a specific macro
- Loading branch information
1 parent
4ed232b
commit 1cfdb7a
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,9 +114,8 @@ void autopilot_periodic(void) { | |
else { | ||
guidance_v_run( autopilot_in_flight ); | ||
guidance_h_run( autopilot_in_flight ); | ||
SetCommands(stabilization_cmd); | ||
SetRotorcraftCommands(stabilization_cmd, autopilot_in_flight, autopilot_motors_on); | ||
} | ||
RotorcraftCommandsTest(commands, autopilot_in_flight, autopilot_motors_on); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
} | ||
|
||
|
@@ -268,9 +267,9 @@ void autopilot_on_rc_frame(void) { | |
SetAutoCommandsFromRC(commands, radio_control.values); | ||
#endif | ||
|
||
/* if in "MANUAL" set commands from the rc */ | ||
/* if not in NAV_MODE set commands from the rc */ | ||
#ifdef SetCommandsFromRC | ||
if (autopilot_mode == MODE_MANUAL) { | ||
if (autopilot_mode != AP_MODE_NAV) { | ||
SetCommandsFromRC(commands, radio_control.values); | ||
This comment has been minimized.
Sorry, something went wrong.
flixr
Member
|
||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now it won't turn of the motors anymore if FAILSAFE_GROUND_DETECT is used and throttle is killed (e.g. via GCS).
Maybe better to just also apply the rc commands to stabilization_cmd instead of to commands directly?