|
NinjaFlight
|
#include <stdbool.h>#include <stdlib.h>#include <stdint.h>#include <string.h>#include <stdarg.h>#include <platform.h>#include <build_config.h>#include <common/color.h>#include <common/maths.h>#include <common/typeconversion.h>#include <common/printf.h>#include <common/axis.h>#include <common/utils.h>#include "drivers/light_ws2811strip.h"#include "drivers/system.h"#include "drivers/serial.h"#include "io/ledstrip.h"#include "config/config.h"#include "config/feature.h"#include "rx/rx.h"
Macros | |
| #define | LED_STRIP_HZ(hz) ((int32_t)((1000 * 1000) / (hz))) |
| #define | LED_STRIP_MS(ms) ((int32_t)(1000 * (ms))) |
| #define | HSV(color) (hsv[COLOR_ ## color]) |
| #define | INDICATOR_DEADBAND 25 |
| #define | ROTATION_SEQUENCE_LED_COUNT 6 |
| #define | ROTATION_SEQUENCE_LED_WIDTH 2 |
Typedefs | |
| typedef void | applyLayerFn_timed (struct ledstrip *self, bool updateNow, uint32_t *timer) |
| typedef void | applyLayerFn (struct ledstrip *self) |
Enumerations | |
| enum | quadrant_e { QUADRANT_NORTH = 1 << 0, QUADRANT_SOUTH = 1 << 1, QUADRANT_EAST = 1 << 2, QUADRANT_WEST = 1 << 3, QUADRANT_NORTH_EAST = 1 << 4, QUADRANT_SOUTH_EAST = 1 << 5, QUADRANT_NORTH_WEST = 1 << 6, QUADRANT_SOUTH_WEST = 1 << 7, QUADRANT_NONE = 1 << 8, QUADRANT_NOTDIAG = 1 << 9, QUADRANT_ANY = QUADRANT_NORTH | QUADRANT_SOUTH | QUADRANT_EAST | QUADRANT_WEST | QUADRANT_NONE } |
| enum | warningFlags_e { WARNING_ARMING_DISABLED, WARNING_LOW_BATTERY, WARNING_FAILSAFE } |
| enum | timId_e { timIndicator, timBlink, timWarning, timRotation, timTimerCount } |
Functions | |
| void | ledstrip_reload_config (struct ledstrip *self) |
| Currently reloads config from the global store TODO: pass config to init! More... | |
| void | ledstrip_update (struct ledstrip *self) |
| void | ledstrip_init (struct ledstrip *self, const struct config const *config, const struct system_calls *system, struct rx *rx, struct failsafe *failsafe) |
| void | ledstrip_enable (struct ledstrip *self) |
| void | ledstrip_disable (struct ledstrip *self) |
Variables | |
| const hsvColor_t | hsv [] |
| #define INDICATOR_DEADBAND 25 |
| #define LED_STRIP_HZ | ( | hz | ) | ((int32_t)((1000 * 1000) / (hz))) |
| #define LED_STRIP_MS | ( | ms | ) | ((int32_t)(1000 * (ms))) |
| #define ROTATION_SEQUENCE_LED_COUNT 6 |
| #define ROTATION_SEQUENCE_LED_WIDTH 2 |
| typedef void applyLayerFn(struct ledstrip *self) |
| typedef void applyLayerFn_timed(struct ledstrip *self, bool updateNow, uint32_t *timer) |
| enum quadrant_e |
| enum timId_e |
| enum warningFlags_e |
| void ledstrip_disable | ( | struct ledstrip * | self | ) |

| void ledstrip_enable | ( | struct ledstrip * | self | ) |

| void ledstrip_init | ( | struct ledstrip * | self, |
| const struct config const * | config, | ||
| const struct system_calls * | system, | ||
| struct rx * | rx, | ||
| struct failsafe * | failsafe | ||
| ) |
| void ledstrip_reload_config | ( | struct ledstrip * | self | ) |
Currently reloads config from the global store TODO: pass config to init!
| void ledstrip_update | ( | struct ledstrip * | self | ) |

| applyLayerFn* apply |
| applyLayerFn_timed* applyTimed |
| uint8_t dir |
| union { ... } f |
| const hsvColor_t hsv[] |
| uint16_t quadrantMask |
| int8_t timId |