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
19 // only if hasButtonCustomUI
20 static bool custom_click(auto& ctx, uint8_t nbClick) { return false; }
21
22 static bool custom_hold(auto& ctx, uint8_t nbClickAndHold, bool isEndOfHoldEvent, uint32_t holdDuration)
23 {
24 return false;
25 }
26
27 // only if hasSystemCallbacks
28 static void power_on_sequence(auto& ctx) {}
29 static void power_off_sequence(auto& ctx) {}
30 static void read_parameters(auto& ctx) {}
31 static void write_parameters(auto& ctx) {}
32
33 // only if requireUserThread
34 static void user_thread(auto& ctx) {}
35
36 // keep only if customized
37 struct StateTy
38 {
39 };
40
41 // keep only the ones you need (= true)
42 static constexpr bool hasBrightCallback = false;
43 static constexpr bool hasCustomRamp = false;
44 static constexpr bool hasButtonCustomUI = false;
45 static constexpr bool hasSystemCallbacks = false;
46 static constexpr bool requireUserThread = false;
47};
48
49#endif
Definition: my_custom_mode.hpp:38
Definition: my_custom_mode.hpp:5
Parent object for all custom user modes.
Definition: mode_type.hpp:53