1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 01:05:21 +03:00

Merge pull request #4649 from iNavFlight/de_mc_motor_stop

[FC] Add back MOTOR_STOP for multirotors
This commit is contained in:
Konstantin Sharlaimov 2019-04-30 15:40:41 +02:00 committed by GitHub
commit 822a8f524d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View file

@ -305,16 +305,6 @@ void validateAndFixConfig(void)
gyroConfigMutable()->gyroSync = false;
#endif
/*
* MOTOR_STOP is no longer allowed on Multirotors and Tricopters
*/
if (
feature(FEATURE_MOTOR_STOP) &&
(mixerConfig()->platformType == PLATFORM_MULTIROTOR || mixerConfig()->platformType == PLATFORM_TRICOPTER)
) {
featureClear(FEATURE_MOTOR_STOP);
}
// Call target-specific validation function
validateAndFixTargetConfig();

View file

@ -445,6 +445,19 @@ void processRx(timeUs_t currentTimeUs)
const throttleStatus_e throttleStatus = calculateThrottleStatus();
// When armed and motors aren't spinning, do beeps periodically
if (ARMING_FLAG(ARMED) && feature(FEATURE_MOTOR_STOP) && !STATE(FIXED_WING)) {
static bool armedBeeperOn = false;
if (throttleStatus == THROTTLE_LOW) {
beeper(BEEPER_ARMED);
armedBeeperOn = true;
} else if (armedBeeperOn) {
beeperSilence();
armedBeeperOn = false;
}
}
processRcStickPositions(throttleStatus);
processAirmode();
updateActivatedModes();