🕊️ Makes task manager global

This commit is contained in:
Rune Harlyk
2024-11-08 13:34:44 +01:00
committed by Rune Harlyk
parent a3fc3eca2e
commit 698b7fbba9
11 changed files with 37 additions and 79 deletions
+2 -6
View File
@@ -2,7 +2,7 @@
#define LEDService_h
#include <FastLED.h>
#include <TaskManager.h>
#include <task_manager.h>
#ifndef WS2812_PIN
#define WS2812_PIN 12
@@ -17,8 +17,6 @@
class LEDService {
private:
TaskManager *_taskManager;
CRGB leds[WS2812_NUM_LEDS];
CRGBPalette16 currentPalette;
TBlendType currentBlending;
@@ -27,15 +25,13 @@ class LEDService {
int direction = 1;
public:
LEDService(TaskManager *taskManager) : _taskManager(taskManager) {
LEDService() {
FastLED.addLeds<CHIPSET, WS2812_PIN, COLOR_ORDER>(leds, WS2812_NUM_LEDS).setCorrection(TypicalLEDStrip);
currentPalette = OceanColors_p;
currentBlending = LINEARBLEND;
}
~LEDService() {}
void begin() {}
void loop() {
EXECUTE_EVERY_N_MS(1000 / 60, {
if (_brightness >= 200) direction = -5;