1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

BEEPER: Bugfix for cliPrintf

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-03-18 11:39:01 +10:00
parent e85bd4a716
commit 0d041950e8

View file

@ -1762,9 +1762,9 @@ static void cliDump(char *cmdline)
mask = getBeeperOffMask(); mask = getBeeperOffMask();
for (int i = 0; i < (beeperCount-2); i++) { for (int i = 0; i < (beeperCount-2); i++) {
if (mask & (1 << i)) if (mask & (1 << i))
printf("beeper -%s\r\n", beeperNameForTableIndex(i)); cliPrintf("beeper -%s\r\n", beeperNameForTableIndex(i));
else else
printf("beeper %s\r\n", beeperNameForTableIndex(i)); cliPrintf("beeper %s\r\n", beeperNameForTableIndex(i));
} }
#endif #endif
@ -1955,7 +1955,7 @@ static void cliBeeper(char *cmdline)
uint32_t mask = getBeeperOffMask(); uint32_t mask = getBeeperOffMask();
if (len == 0) { if (len == 0) {
printf("Disabled:"); cliPrintf("Disabled:");
for (int i = 0; ; i++) { for (int i = 0; ; i++) {
if (i == beeperCount-2){ if (i == beeperCount-2){
if (mask == 0) if (mask == 0)
@ -1963,13 +1963,13 @@ static void cliBeeper(char *cmdline)
break; break;
} }
if (mask & (1 << i)) if (mask & (1 << i))
printf(" %s", beeperNameForTableIndex(i)); cliPrintf(" %s", beeperNameForTableIndex(i));
} }
cliPrint("\r\n"); cliPrint("\r\n");
} else if (strncasecmp(cmdline, "list", len) == 0) { } else if (strncasecmp(cmdline, "list", len) == 0) {
cliPrint("Available:"); cliPrint("Available:");
for (i = 0; i < beeperCount; i++) for (i = 0; i < beeperCount; i++)
printf(" %s", beeperNameForTableIndex(i)); cliPrintf(" %s", beeperNameForTableIndex(i));
cliPrint("\r\n"); cliPrint("\r\n");
return; return;
} else { } else {
@ -2010,7 +2010,7 @@ static void cliBeeper(char *cmdline)
} }
cliPrint("Enabled"); cliPrint("Enabled");
} }
printf(" %s\r\n", beeperNameForTableIndex(i)); cliPrintf(" %s\r\n", beeperNameForTableIndex(i));
break; break;
} }
} }