5#ifndef SIMPLE_BEHAVIOR_MANAGER_H
6#define SIMPLE_BEHAVIOR_MANAGER_H
29 if (
manager.get_active_group() == 0)
32 if (
manager.lamp.getBrightness() ==
manager.lamp.getMaxBrightness())
34 manager.lamp.restoreBrightness();
48 if (
manager.get_active_group() == 0 and
50 manager.lamp.getBrightness() == ::lampda::brightness::absoluteMaximumBrightness)
66 fprintf(stderr,
"group %d *mode %d\n",
manager.get_active_group(),
manager.get_active_mode());
70void button_hold_default(
const uint8_t clicks,
const bool isEndOfHoldEvent,
const uint32_t holdDuration)
80 auto& rampHandler =
manager.state.rampHandler;
93 if (default_behaviors::handle_elk_command(elkControlCommand))
AlertManager_t manager
Instanciation of the AlertManager.
Definition: alerts.cpp:27
void write_temporary_output_limits(const uint16_t voltage_mv, const uint16_t current_ma, const uint32_t timeout_ms)
overwrite the output characteristics for a given duration. Gets back to the previous settings after t...
Definition: output_power.cpp:32
bool button_hold(const uint8_t clicks, const bool isEndOfHoldEvent, const uint32_t holdDuration)
must be called by the lampda::user::button_hold_default
Definition: default_behavior.hpp:197
bool button_clicked(const uint8_t clicks)
must be called by the lampda::user::button_clicked_default
Definition: default_behavior.hpp:172
Contains code handling custom user mode functions for indexable strips.
Definition: default_behavior.hpp:15
void handle_elk_command(const utils::ELK::Package &elkControlCommand)
Handle a ELK BLE package.
Definition: indexable_behavior.hpp:228
void 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:118
void button_clicked_default(const uint8_t)
Called to handle button click events for default user mode behaviors.
Definition: indexable_behavior.hpp:18