Added FireEffect. Its values still need a bit of tweaking to look right...

This commit is contained in:
2019-06-04 05:58:23 +02:00
parent 96442b48cc
commit f95589763e
4 changed files with 79 additions and 0 deletions

View File

@ -57,6 +57,9 @@
#define EFFECT_SNAKE_DIRECTION_CHANGE 10
#define EFFECT_SNAKE_SLOWDOWN 2
#define EFFECT_FIRE_COOLDOWN 192
#define EFFECT_FIRE_SPARK_CHANCE 5
#ifdef DEBUG
#define LOG(x) mqtt_log(x); Serial.print(x);
#define LOGln(x) mqtt_log_ln(x); Serial.println(x);

19
include/effect_fire.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#include "Effect.h"
#include "my_fastled.h"
class FireEffect : public Effect {
private:
uint8_t* data;
uint8_t spark_temp();
void cooldown();
void spark();
void propagate();
void draw();
static CRGBPalette16 palette;
public:
void start();
void stop();
void loop();
};