Merge branch 'master' of https://git.schle.nz/fabian/pitrix
This commit is contained in:
@ -36,6 +36,7 @@
|
||||
#define MQTT_TOPIC "pitrix/" // MQTT topic to listen to. Must not start with a slash, but must end with one.
|
||||
#define MQTT_REPORT_METRICS // Whether to report metrics via MQTT. Disable if unwanted.
|
||||
#define MQTT_TOPIC_WEATHER "accuweather/pitrix/" // MQTT topic to listen for weather data. Must not start with a slash, but must end with one.
|
||||
#define MQTT_TOPIC_TIMER "alexa/timer"
|
||||
|
||||
#define HOSTNAME "pitrix-%08X" // Hostname of the ESP to use for OTA and MQTT client id. %08X will be replaced by the chip id.
|
||||
#define OTA_STARTUP_DELAY 10 // How many seconds to wait at startup. This is useful to prevent being unable to flash OTA by a bug in the code. Set to 0 to disable.
|
||||
|
16
include/effect_timer.h
Normal file
16
include/effect_timer.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Effect.h"
|
||||
#include "prototypes.h"
|
||||
#include "my_fastled.h"
|
||||
#include "Window.h"
|
||||
|
||||
class TimerEffect : public Effect {
|
||||
protected:
|
||||
Window* window = new Window(0, 0, LED_WIDTH, 6);
|
||||
|
||||
public:
|
||||
~TimerEffect();
|
||||
void loop(uint16_t ms);
|
||||
String get_name() override { return "timer"; }
|
||||
};
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "Effect.h"
|
||||
#include "effect_clock.h"
|
||||
#include "effect_timer.h"
|
||||
|
||||
struct EffectEntry {
|
||||
const char* name;
|
||||
@ -13,6 +14,7 @@ extern const uint8_t effects_size;
|
||||
|
||||
extern Effect* current_effect;
|
||||
extern ClockEffect effect_clock;
|
||||
extern TimerEffect effect_timer;
|
||||
|
||||
Effect* select_effect(char* name);
|
||||
Effect* select_effect(uint8_t id);
|
||||
|
@ -5,6 +5,7 @@
|
||||
extern uint8_t baseHue;
|
||||
extern char hostname[30];
|
||||
extern uint16_t frame;
|
||||
extern unsigned long timer;
|
||||
|
||||
typedef struct {
|
||||
uint8_t width;
|
||||
|
Reference in New Issue
Block a user