mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Fix building of targets that don't define LED_STRIP.
This commit is contained in:
parent
043ed0f0bc
commit
94623289fd
3 changed files with 9 additions and 1 deletions
|
@ -375,7 +375,9 @@ static void resetConf(void)
|
||||||
for (i = 0; i < MAX_SUPPORTED_MOTORS; i++)
|
for (i = 0; i < MAX_SUPPORTED_MOTORS; i++)
|
||||||
masterConfig.customMixer[i].throttle = 0.0f;
|
masterConfig.customMixer[i].throttle = 0.0f;
|
||||||
|
|
||||||
|
#ifdef LED_STRIP
|
||||||
applyDefaultLedStripConfig(masterConfig.ledConfigs);
|
applyDefaultLedStripConfig(masterConfig.ledConfigs);
|
||||||
|
#endif
|
||||||
|
|
||||||
// copy first profile into remaining profile
|
// copy first profile into remaining profile
|
||||||
for (i = 1; i < 3; i++)
|
for (i = 1; i < 3; i++)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
|
|
|
@ -500,6 +500,9 @@ static void cliCMix(char *cmdline)
|
||||||
|
|
||||||
static void cliLed(char *cmdline)
|
static void cliLed(char *cmdline)
|
||||||
{
|
{
|
||||||
|
#ifndef LED_STRIP
|
||||||
|
UNUSED(cmdline);
|
||||||
|
#else
|
||||||
int i;
|
int i;
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
@ -523,6 +526,7 @@ static void cliLed(char *cmdline)
|
||||||
printf("Invalid led index: must be < %u\r\n", MAX_LED_STRIP_LENGTH);
|
printf("Invalid led index: must be < %u\r\n", MAX_LED_STRIP_LENGTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dumpValues(uint8_t mask)
|
static void dumpValues(uint8_t mask)
|
||||||
|
@ -622,9 +626,10 @@ static void cliDump(char *cmdline)
|
||||||
buf[i] = '\0';
|
buf[i] = '\0';
|
||||||
printf("map %s\r\n", buf);
|
printf("map %s\r\n", buf);
|
||||||
|
|
||||||
|
#ifdef LED_STRIP
|
||||||
printf("\r\n\r\n# led\r\n");
|
printf("\r\n\r\n# led\r\n");
|
||||||
cliLed("");
|
cliLed("");
|
||||||
|
#endif
|
||||||
printSectionBreak();
|
printSectionBreak();
|
||||||
dumpValues(MASTER_VALUE);
|
dumpValues(MASTER_VALUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue