|
Lamp-Da 0.1
A compact lantern project
|
Logic of the sunset time, eg the system auto stops after a set delay. More...
Go to the source code of this file.
Namespaces | |
| namespace | lampda |
| Program scope. | |
| namespace | lampda::logic |
| Handle the main high level logics. | |
| namespace | lampda::logic::sunset |
| Sunset timer handler. | |
Functions | |
| void | lampda::logic::sunset::init () |
| call once on program start | |
| void | lampda::logic::sunset::set_deadline (const uint32_t timeshutdown_s) |
| Set the sunset timer to a known clock deadline, replacing existing timers. Start the timer, or upate it if needed. | |
| void | lampda::logic::sunset::add_time_minutes (const uint8_t time_minutes) |
| add some time to the sunset timer. Limited in the range [1; 10] minutes. If the timer is not started yet, will start it. | |
| void | lampda::logic::sunset::shortcut_to_phaseout () |
| If a timer is enabled, shortcut it to the start of the shutdown animation. | |
| void | lampda::logic::sunset::bump_timer () |
| signal to the timer that some time may be added. Only add time if the timer is in the fadeout phase | |
| void | lampda::logic::sunset::cancel_timer () |
| cancel the current active timer | |
| bool | lampda::logic::sunset::is_enabled () |
| Indicate if the sunset is set. | |
| void | lampda::logic::sunset::lock_brightness_update (bool shouldLock) |
| Lock the hability of the sunset timer to control the brightness. | |
Logic of the sunset time, eg the system auto stops after a set delay.