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:
commit
822a8f524d
2 changed files with 13 additions and 10 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue