Narrow LED strip indicator deadband so that indicators are displayed for

smaller pitch/roll input movements.
This commit is contained in:
Dominic Clifton 2014-10-29 01:05:01 +00:00
parent d76a414985
commit 45218357fa
1 changed files with 6 additions and 4 deletions

View File

@ -603,6 +603,8 @@ void applyLedWarningLayer(uint8_t warningState, uint8_t warningFlags)
}
}
#define INDICATOR_DEADBAND 25
void applyLedIndicatorLayer(uint8_t indicatorFlashState)
{
const ledConfig_t *ledConfig;
@ -625,22 +627,22 @@ void applyLedIndicatorLayer(uint8_t indicatorFlashState)
continue;
}
if (rcCommand[ROLL] > 50) {
if (rcCommand[ROLL] > INDICATOR_DEADBAND) {
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_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_SOUTH_WEST, flashColor);
}
if (rcCommand[PITCH] > 50) {
if (rcCommand[PITCH] > INDICATOR_DEADBAND) {
applyQuadrantColor(ledIndex, ledConfig, QUADRANT_NORTH_EAST, 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_WEST, flashColor);
}