Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
my_custom_mode.hpp
1#ifndef MY_CUSTOM_MODE_H
2#define MY_CUSTOM_MODE_H
3
5{
6 static void loop(auto& ctx) {}
7 static void on_enter_mode(auto& ctx) {}
8 static void on_exit_mode(auto& ctx) {}
9
10 // only if hasSunsetAnimation
11 static void sunset_update(auto& ctx, float progress) {}
12
13 // only if hasBrightCallback
14 static void brightness_update(auto& ctx, brightness_t brightness) {}
15
16 // only if hasCustomRamp
17 static void custom_ramp_update(auto& ctx, uint8_t rampValue) {}
18 static uint8_t get_custom_ramp_default_value(auto& ctx) { return 0; }
19
20 // only if hasButtonCustomUI
21 static bool custom_click(auto& ctx, uint8_t nbClick) { return false; }
22
23 static bool custom_hold(auto& ctx, uint8_t nbClickAndHold, bool isEndOfHoldEvent, uint32_t holdDuration)
24 {
25 return false;
26 }
27
28 // only if hasSystemCallbacks
29 static void power_on_sequence(auto& ctx) {}
30 static void power_off_sequence(auto& ctx) {}
31 static void read_parameters(auto& ctx) {}
32 static void write_parameters(auto& ctx) {}
33
34 // only if requireUserThread
35 static void user_thread(auto& ctx) {}
36
37 // keep only if customized
38 struct StateTy
39 {
40 };
41
42 // keep only the ones you need (= true)
43 static constexpr bool hasBrightCallback = false;
44 static constexpr bool hasCustomRamp = false;
45 static constexpr bool hasButtonCustomUI = false;
46 static constexpr bool hasSystemCallbacks = false;
47 static constexpr bool requireUserThread = false;
48};
49
50#endif
Definition: my_custom_mode.hpp:39
Definition: my_custom_mode.hpp:5
Parent object for all custom user modes.
Definition: mode_type.hpp:53