mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
As per @martinbudden suggestion including io_types.h only, and fixed osd.c master config changes
This commit is contained in:
parent
e56f915018
commit
a01a71cddb
3 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "io.h"
|
#include "io_types.h"
|
||||||
|
|
||||||
#define WS2811_LED_STRIP_LENGTH 32
|
#define WS2811_LED_STRIP_LENGTH 32
|
||||||
#define WS2811_BITS_PER_LED 24
|
#define WS2811_BITS_PER_LED 24
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/color.h"
|
#include "common/color.h"
|
||||||
#include "drivers/io.h"
|
#include "drivers/io_types.h"
|
||||||
|
|
||||||
#define LED_MAX_STRIP_LENGTH 32
|
#define LED_MAX_STRIP_LENGTH 32
|
||||||
#define LED_CONFIGURABLE_COLOR_COUNT 16
|
#define LED_CONFIGURABLE_COLOR_COUNT 16
|
||||||
|
|
|
@ -305,7 +305,7 @@ static const char * const LED_COLOR_NAMES[] = {
|
||||||
void getLedColor(void)
|
void getLedColor(void)
|
||||||
{
|
{
|
||||||
for (int ledIndex = 0; ledIndex < LED_MAX_STRIP_LENGTH; ledIndex++) {
|
for (int ledIndex = 0; ledIndex < LED_MAX_STRIP_LENGTH; ledIndex++) {
|
||||||
const ledConfig_t *ledConfig = &masterConfig.ledConfigs[ledIndex];
|
const ledConfig_t *ledConfig = &masterConfig.ledStripConfig.ledConfigs[ledIndex];
|
||||||
|
|
||||||
int fn = ledGetFunction(ledConfig);
|
int fn = ledGetFunction(ledConfig);
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ void applyLedColor(void * ptr)
|
||||||
{
|
{
|
||||||
UNUSED(ptr);
|
UNUSED(ptr);
|
||||||
for (int ledIndex = 0; ledIndex < LED_MAX_STRIP_LENGTH; ledIndex++) {
|
for (int ledIndex = 0; ledIndex < LED_MAX_STRIP_LENGTH; ledIndex++) {
|
||||||
ledConfig_t *ledConfig = &masterConfig.ledConfigs[ledIndex];
|
ledConfig_t *ledConfig = &masterConfig.ledStripConfig.ledConfigs[ledIndex];
|
||||||
if (ledGetFunction(ledConfig) == LED_FUNCTION_COLOR)
|
if (ledGetFunction(ledConfig) == LED_FUNCTION_COLOR)
|
||||||
*ledConfig = DEFINE_LED(ledGetX(ledConfig), ledGetY(ledConfig), ledColor, ledGetDirection(ledConfig), ledGetFunction(ledConfig), ledGetOverlay(ledConfig), 0);
|
*ledConfig = DEFINE_LED(ledGetX(ledConfig), ledGetY(ledConfig), ledColor, ledGetDirection(ledConfig), ledGetFunction(ledConfig), ledGetOverlay(ledConfig), 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue