Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new alarm without writing it in the code #6

Open
Portia-Lin opened this issue Dec 24, 2020 · 3 comments
Open

Create new alarm without writing it in the code #6

Portia-Lin opened this issue Dec 24, 2020 · 3 comments

Comments

@Portia-Lin
Copy link

Hi. I see your library is implementing scheduled alarms. I want to use it to create my own firmware for a smart switch. I'm interested in the option to create, view and delete alarms via the web interface. As in the picture. How can I create a new alarm without writing it directly in the code? How to view existing alarms? Thanks 84083736-952c3380-a9b8-11ea-8e5c-413e5fc112d3.png

@Portia-Lin
Copy link
Author

I figured out how to create a new alarm. I should create a function to add a new alarm. But still wondering how to remove and view existing alarms.

@hjkoster400d
Copy link

I'm looking to do the same as you did, can you share how you created the dynamic alarms? That would be a great help :D

@hjkoster400d
Copy link

For anyone reading this and want to know;) Found it, the lambda capture needs to specify the variables that it needs in the lambda object. I was using [&] which captures all known variables on the stack by reference. But that wasn't enough for me, because by the time the lambda was triggered, the references where lost.

This is where is ended up with
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants