build for esp32 mask project
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#pragma once
|
||||
#include <FastLED.h>
|
||||
#include <Figments.h>
|
||||
#include "BootOptions.h"
|
||||
|
||||
class Platform {
|
||||
class Platform : public Task {
|
||||
static int s_timezone;
|
||||
static char s_deviceID[15];
|
||||
public:
|
||||
Platform() : Task("Platform") {}
|
||||
static BootOptions bootopts;
|
||||
static void setTimezone(int tz) { s_timezone = tz; }
|
||||
static int getTimezone() { return s_timezone; }
|
||||
@@ -14,18 +16,28 @@ class Platform {
|
||||
#ifdef PLATFORM_PHOTON
|
||||
FastLED.addLeds<NEOPIXEL, 6>(leds, ledCount);
|
||||
#elif defined(BOARD_ESP32)
|
||||
FastLED.addLeds<WS2812B, 13, RGB>(leds, ledCount);
|
||||
FastLED.addLeds<WS2812B, 13, GRB>(leds, ledCount);
|
||||
#else
|
||||
FastLED.addLeds<WS2812B, 14, GRB>(leds, ledCount);
|
||||
//FastLED.addLeds<WS2812B, 14, GRB>(leds, ledCount);
|
||||
FastLED.addLeds<WS2812B, 14, RGB>(leds, ledCount);
|
||||
#endif
|
||||
}
|
||||
|
||||
static const char* name();
|
||||
static const char* version();
|
||||
static const String model() {
|
||||
static String modelName = String("Renderbug " ) + Platform::name();
|
||||
return modelName;
|
||||
}
|
||||
static const String deviceName() {
|
||||
static String devName = model() + " " + Platform::deviceID();
|
||||
return devName;
|
||||
}
|
||||
static void preSetup();
|
||||
static void bootSplash();
|
||||
static void setup();
|
||||
static void loop();
|
||||
void loop() override;
|
||||
static bool getLocalTime(struct tm* timedata);
|
||||
static const char* deviceID();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user