mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Narrow LED strip indicator deadband so that indicators are displayed for
smaller pitch/roll input movements.
This commit is contained in:
parent
d76a414985
commit
45218357fa
1 changed files with 6 additions and 4 deletions
|
@ -603,6 +603,8 @@ void applyLedWarningLayer(uint8_t warningState, uint8_t warningFlags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define INDICATOR_DEADBAND 25
|
||||||
|
|
||||||
void applyLedIndicatorLayer(uint8_t indicatorFlashState)
|
void applyLedIndicatorLayer(uint8_t indicatorFlashState)
|
||||||
{
|
{
|
||||||
const ledConfig_t *ledConfig;
|
const ledConfig_t *ledConfig;
|
||||||
|
@ -625,22 +627,22 @@ void applyLedIndicatorLayer(uint8_t indicatorFlashState)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcCommand[ROLL] > 50) {
|
if (rcCommand[ROLL] > INDICATOR_DEADBAND) {
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_EAST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_EAST, flashColor);
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_EAST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_EAST, flashColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcCommand[ROLL] < -50) {
|
if (rcCommand[ROLL] < -INDICATOR_DEADBAND) {
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_WEST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_WEST, flashColor);
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_WEST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_WEST, flashColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcCommand[PITCH] > 50) {
|
if (rcCommand[PITCH] > INDICATOR_DEADBAND) {
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_EAST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_EAST, flashColor);
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_WEST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_WEST, flashColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcCommand[PITCH] < -50) {
|
if (rcCommand[PITCH] < -INDICATOR_DEADBAND) {
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_EAST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_EAST, flashColor);
|
||||||
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_WEST, flashColor);
|
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_SOUTH_WEST, flashColor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue