mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 08:45:36 +03:00
Add parenthesis to expressions to imrove code clarity and remove IDE
warning.
This commit is contained in:
parent
5718dd61a5
commit
7d4abb8a4a
1 changed files with 6 additions and 6 deletions
|
@ -580,23 +580,23 @@ void applyLedWarningLayer(uint8_t warningState, uint8_t warningFlags)
|
|||
}
|
||||
|
||||
if (warningState == 0) {
|
||||
if (warningFlashCounter == 0 && warningFlags & WARNING_FLAG_ARMING_DISABLED) {
|
||||
if (warningFlashCounter == 0 && (warningFlags & WARNING_FLAG_ARMING_DISABLED)) {
|
||||
setLedHsv(ledIndex, &hsv_yellow);
|
||||
}
|
||||
if (warningFlashCounter == 1 && warningFlags & WARNING_FLAG_LOW_BATTERY) {
|
||||
if (warningFlashCounter == 1 && (warningFlags & WARNING_FLAG_LOW_BATTERY)) {
|
||||
setLedHsv(ledIndex, &hsv_red);
|
||||
}
|
||||
if (warningFlashCounter > 1 && warningFlags & WARNING_FLAG_FAILSAFE) {
|
||||
if (warningFlashCounter > 1 && (warningFlags & WARNING_FLAG_FAILSAFE)) {
|
||||
setLedHsv(ledIndex, &hsv_lightBlue);
|
||||
}
|
||||
} else {
|
||||
if (warningFlashCounter == 0 && warningFlags & WARNING_FLAG_ARMING_DISABLED) {
|
||||
if (warningFlashCounter == 0 && (warningFlags & WARNING_FLAG_ARMING_DISABLED)) {
|
||||
setLedHsv(ledIndex, &hsv_black);
|
||||
}
|
||||
if (warningFlashCounter == 1 && warningFlags & WARNING_FLAG_LOW_BATTERY) {
|
||||
if (warningFlashCounter == 1 && (warningFlags & WARNING_FLAG_LOW_BATTERY)) {
|
||||
setLedHsv(ledIndex, &hsv_black);
|
||||
}
|
||||
if (warningFlashCounter > 1 && warningFlags & WARNING_FLAG_FAILSAFE) {
|
||||
if (warningFlashCounter > 1 && (warningFlags & WARNING_FLAG_FAILSAFE)) {
|
||||
setLedHsv(ledIndex, &hsv_limeGreen);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue