Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t candle_mode_state(Event event, uint16_t arg) {
- static int8_t ramp_direction = 1;
- #define MAX_CANDLE_LEVEL (MAX_LEVEL-CANDLE_AMPLITUDE-15)
- static uint8_t candle_wave1 = 0;
- static uint8_t candle_wave2 = 0;
- static uint8_t candle_wave3 = 0;
- static uint8_t candle_wave2_speed = 0;
- // these should add up to 100
- #define CANDLE_WAVE1_MAXDEPTH 20 // was 30
- #define CANDLE_WAVE2_MAXDEPTH 25 // was 45
- #define CANDLE_WAVE3_MAXDEPTH 15 // was 25
- static const uint8_t candle_wave1_depth = CANDLE_WAVE1_MAXDEPTH * CANDLE_AMPLITUDE / 100;
- static uint8_t candle_wave2_depth = CANDLE_WAVE2_MAXDEPTH * CANDLE_AMPLITUDE / 100;
- static uint8_t candle_wave3_depth = CANDLE_WAVE3_MAXDEPTH * CANDLE_AMPLITUDE / 100;
- static uint8_t candle_mode_brightness = 24;
Advertisement
Add Comment
Please, Sign In to add comment