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