5#ifndef USER_FUNCTIONS_H
6#define USER_FUNCTIONS_H
18#ifdef LMBD_LAMP_TYPE__INDEXABLE
22namespace lampda::user::_private {
96bool button_hold_default(
const uint8_t nbClickAndHold,
const bool isEndOfHoldEvent,
const uint32_t holdDuration);
115bool button_hold_usermode(
const uint8_t nbClickAndHold,
const bool isEndOfHoldEvent,
const uint32_t holdDuration);
Handle the output LED strip brightness.
protected inheritence to avoid uncontroled hardware calls
Definition: strip.h:49
Contains code handling custom user mode functions for indexable strips.
Definition: default_behavior.hpp:17
bool button_clicked_default(const uint8_t)
Called to handle button click events for default user mode behaviors.
Definition: indexable_behavior.hpp:18
bool button_hold_default(const uint8_t, const bool, const uint32_t)
Called to handle button click+hold events for user mode behaviors.
Definition: indexable_behavior.hpp:168
void brightness_update(const brightness_t brightness)
Called when the system changes the LED strip brightness.
Definition: default_behavior.hpp:58
void user_thread()
Called at each tick of the secondary thread.
Definition: default_behavior.hpp:161
bool button_hold_usermode(const uint8_t clicks, const bool isEndOfHoldEvent, const uint32_t holdDuration)
Called to handle button click+hold events if "usermode UI" is on.
Definition: default_behavior.hpp:135
bool button_start_hold_default(const uint8_t clicks, const bool isEndOfHoldEvent, const uint32_t holdDuration)
Called to handle button hold on lamp start.
Definition: default_behavior.hpp:103
void read_parameters()
Called when system wants to read parameters from filesystem.
Definition: default_behavior.hpp:95
void power_on_sequence()
Called when the system powers on (must be non blocking function!)
Definition: default_behavior.hpp:33
void sunset_timer_update(const float progress)
Called when the sunset timer progresses [0; 1].
Definition: default_behavior.hpp:81
bool button_start_click_default(const uint8_t clicks)
Called to handle button click on lamp start.
Definition: default_behavior.hpp:101
void handle_user_command(const common::UserCommand &command)
Handle user command.
Definition: indexable_behavior.hpp:283
bool should_spawn_thread()
Determine if a second user_thread() loop thread should be spawned.
Definition: default_behavior.hpp:150
void write_parameters()
Called when system wants to write parameters to filesystem.
Definition: default_behavior.hpp:89
void power_off_sequence()
Called when the system powers off (must be non blocking function!)
Definition: default_behavior.hpp:44
void loop()
Called at each tick of the main loop.
Definition: default_behavior.hpp:141
bool button_clicked_usermode(const uint8_t clicks)
Called to handle button click events if "usermode UI" is active.
Definition: default_behavior.hpp:129
uint16_t brightness_t
Define the type of the brightness parameters.
Definition: constants.h:147
Interface of the indexable strip object. Only used for RGB lamp type.