whycomeimsocool

Untitled

Jan 6th, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. uint8_t candle_mode_state(Event event, uint16_t arg) {
  2. static int8_t ramp_direction = 1;
  3. #define MAX_CANDLE_LEVEL (MAX_LEVEL-CANDLE_AMPLITUDE-15)
  4. static uint8_t candle_wave1 = 0;
  5. static uint8_t candle_wave2 = 0;
  6. static uint8_t candle_wave3 = 0;
  7. static uint8_t candle_wave2_speed = 0;
  8. // these should add up to 100
  9. #define CANDLE_WAVE1_MAXDEPTH 20 // was 30
  10. #define CANDLE_WAVE2_MAXDEPTH 25 // was 45
  11. #define CANDLE_WAVE3_MAXDEPTH 15 // was 25
  12. static const uint8_t candle_wave1_depth = CANDLE_WAVE1_MAXDEPTH * CANDLE_AMPLITUDE / 100;
  13. static uint8_t candle_wave2_depth = CANDLE_WAVE2_MAXDEPTH * CANDLE_AMPLITUDE / 100;
  14. static uint8_t candle_wave3_depth = CANDLE_WAVE3_MAXDEPTH * CANDLE_AMPLITUDE / 100;
  15. static uint8_t candle_mode_brightness = 24;
  16.  
Advertisement
Add Comment
Please, Sign In to add comment