WLED
WLED copied to clipboard
Usermod: Analog clock
I have moved the analog clock overlay functionality to a user mod and added following features:
- Colors of hours, minutes and seconds are configurable via Usermod Settings
- Possibility to have different LEDs display the seconds than the hours and minutes
- Can turn off seconds altogether
- Switch to turn on blending / mixing the colors of the pointers with each other or existing effects
- Fading effect for the seconds pointer
- Runs much smoother due to frequent updates even if there is no effect running
If desired, I could also remove the now obsolete "analog clock overlay" from the base code.
Hi and thanks for that mod,
i connected my clock to a 2nd GPIO and declared it as segment2. But this doesn't seems to work since the settings in your usermod will not be safed....
anyway: Is it possible to change the usermod settings (colors) with the api / mqtt ?
Following
i connected my clock to a 2nd GPIO and declared it as segment2. But this doesn't seems to work since the settings in your usermod will not be safed....
The mod doesn't honor segments (yet), just offsets. What is your LED configuration and what are the bounds you entered in the mod's settings? It doesn't save the boundaries when they're "invalid".
anyway: Is it possible to change the usermod settings (colors) with the api / mqtt ?
Not yet, but certainly a good idea :-)
@Aircoookie can you re-target this to main now and reopen?
Shoot, I figured it would rebase outstanding PRs instead of closing them. Rebasing actually requires restoring 0_14 branch, not a good UX given the rest of GitHub works perfectly well. At least it shouldn't tell me that the branch can be "safely deleted" if that action closes PRs without warning 😅
Sorry, I was under the impression (since @blazoncek asked for it in another PR of me) I'd have to rebase this to 0_14 as well.
By the way, using this on 0_14 with my clock fixed an occasional flickering of random LEDs. Can't wait for 0.14 to be released :-)
No, rebasing it to 0_14 was correct on your part, the error is on me for merging 0_14 to main before merging your PR :D
I like to try this usermod but cannot compile
In file included from wled00\usermods_list.cpp:153:0: wled00../usermods/Analog_Clock/Analog_Clock.h: In member function 'bool AnalogClockUsermod::hexStringToColor(const String&, uint32_t&, uint32_t)': wled00../usermods/Analog_Clock/Analog_Clock.h:90:9: error: 'errno' was not declared in this scope errno = 0; ^ wled00../usermods/Analog_Clock/Analog_Clock.h:93:34: error: 'ERANGE' was not declared in this scope if (*ep == 0 && errno != ERANGE) { ^ Compiling .pio\build\nodemcuv2\src\ws.cpp.o Compiling .pio\build\nodemcuv2\src\xml.cpp.o wled00../usermods/Analog_Clock/Analog_Clock.h:100:5: warning: control reaches end of non-void function [-Wreturn-type] } ^