|
Lamp-Da 0.1
A compact lantern project
|
Sunset timer handler. More...
Functions | |
| bool | is_enabled () |
| Indicate if the sunset is set. | |
| uint32_t | get_sunset_loop_timing_ms () |
| float | get_percent_of_advance () |
| Return the percent of advance of the sunset timer, from 0 to 1. 1 is end of process. | |
| float | signal_sunset_update () |
| Send the timer update signal to consummers Returns the progress. | |
| void | sunset_process_loop () |
| void | init () |
| call once on program start | |
| void | 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 | 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 | shortcut_to_phaseout () |
| If a timer is enabled, shortcut it to the start of the shutdown animation. | |
| void | bump_timer () |
| signal to the timer that some time may be added. Only add time if the timer is in the fadeout phase | |
| void | cancel_timer () |
| cancel the current active timer | |
| void | lock_brightness_update (bool shouldLock) |
| Lock the hability of the sunset timer to control the brightness. | |
Sunset timer handler.
| bool lampda::logic::sunset::is_enabled | ( | ) |
Indicate if the sunset is set.
True if timer is running.
| 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.
| [in] | timeshutdown_s | The new time limit. It must be greater than the current time |