mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
separate function for only roll/pitch stick deflection
This commit is contained in:
parent
dac60f7a73
commit
156c947d3c
4 changed files with 9 additions and 3 deletions
|
@ -251,7 +251,7 @@ static inline bool isLaunchMaxAltitudeReached(void)
|
|||
|
||||
static inline bool areSticksMoved(timeMs_t initialTime, timeUs_t currentTimeUs)
|
||||
{
|
||||
return (initialTime + currentStateElapsedMs(currentTimeUs)) > navConfig()->fw.launch_min_time && areSticksDeflected();
|
||||
return (initialTime + currentStateElapsedMs(currentTimeUs)) > navConfig()->fw.launch_min_time && isRollPitchStickDeflected();
|
||||
}
|
||||
|
||||
static void resetPidsIfNeeded(void) {
|
||||
|
@ -435,7 +435,7 @@ static fixedWingLaunchEvent_t fwLaunchState_FW_LAUNCH_STATE_FINISH(timeUs_t curr
|
|||
const timeMs_t elapsedTimeMs = currentStateElapsedMs(currentTimeUs);
|
||||
const timeMs_t endTimeMs = navConfig()->fw.launch_end_time;
|
||||
|
||||
if (areSticksDeflected()) {
|
||||
if (isRollPitchStickDeflected()) {
|
||||
return FW_LAUNCH_EVENT_ABORT; // cancel the launch and do the FW_LAUNCH_STATE_IDLE state
|
||||
}
|
||||
if (elapsedTimeMs > endTimeMs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue