1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Remove unused vario feature and option. Move warning led code into

statusindicator.c/h
This commit is contained in:
Dominic Clifton 2014-06-01 17:20:01 +01:00
parent 4b437e8e08
commit fd0b7cdf80
7 changed files with 37 additions and 57 deletions

View file

@ -127,32 +127,6 @@ bool isCalibrating()
return (!isAccelerationCalibrationComplete() && sensors(SENSOR_ACC)) || (!isGyroCalibrationComplete());
}
static uint32_t warningLedTimer = 0;
void enableWarningLed(uint32_t currentTime)
{
if (warningLedTimer != 0) {
return; // already enabled
}
warningLedTimer = currentTime + 500000;
LED0_ON;
}
void disableWarningLed(void)
{
warningLedTimer = 0;
LED0_OFF;
}
void updateWarningLed(uint32_t currentTime)
{
if (warningLedTimer && (int32_t)(currentTime - warningLedTimer) >= 0) {
LED0_TOGGLE;
warningLedTimer = warningLedTimer + 500000;
}
}
void annexCode(void)
{
int32_t tmp, tmp2;
@ -317,12 +291,6 @@ void mwArm(void)
}
}
static void mwVario(void)
{
}
void loop(void)
{
static uint8_t rcDelayCommand; // this indicates the number of time (multiple of RC measurement at 50Hz) the sticks must be maintained to run or switch off motors
@ -547,16 +515,6 @@ void loop(void)
} else {
f.BARO_MODE = 0;
}
// Vario signalling activate
if (feature(FEATURE_VARIO)) {
if (rcOptions[BOXVARIO]) {
if (!f.VARIO_MODE) {
f.VARIO_MODE = 1;
}
} else {
f.VARIO_MODE = 0;
}
}
}
#endif
@ -633,9 +591,6 @@ void loop(void)
Sonar_update();
}
#endif
if (feature(FEATURE_VARIO) && f.VARIO_MODE)
mwVario();
break;
}
}