1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Fix building of targets that don't define LED_STRIP.

This commit is contained in:
Dominic Clifton 2014-09-15 03:27:37 +01:00
parent 043ed0f0bc
commit 94623289fd
3 changed files with 9 additions and 1 deletions

View file

@ -375,7 +375,9 @@ static void resetConf(void)
for (i = 0; i < MAX_SUPPORTED_MOTORS; i++)
masterConfig.customMixer[i].throttle = 0.0f;
#ifdef LED_STRIP
applyDefaultLedStripConfig(masterConfig.ledConfigs);
#endif
// copy first profile into remaining profile
for (i = 1; i < 3; i++)

View file

@ -18,6 +18,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "platform.h"

View file

@ -500,6 +500,9 @@ static void cliCMix(char *cmdline)
static void cliLed(char *cmdline)
{
#ifndef LED_STRIP
UNUSED(cmdline);
#else
int i;
uint8_t len;
char *ptr;
@ -523,6 +526,7 @@ static void cliLed(char *cmdline)
printf("Invalid led index: must be < %u\r\n", MAX_LED_STRIP_LENGTH);
}
}
#endif
}
static void dumpValues(uint8_t mask)
@ -622,9 +626,10 @@ static void cliDump(char *cmdline)
buf[i] = '\0';
printf("map %s\r\n", buf);
#ifdef LED_STRIP
printf("\r\n\r\n# led\r\n");
cliLed("");
#endif
printSectionBreak();
dumpValues(MASTER_VALUE);
}