Skip to content

Twenties: refactor to use the scheduling library instead of its own timeouts#4231

Draft
thyttan wants to merge 17 commits into
espruino:masterfrom
thyttan:twenties
Draft

Twenties: refactor to use the scheduling library instead of its own timeouts#4231
thyttan wants to merge 17 commits into
espruino:masterfrom
thyttan:twenties

Conversation

@thyttan
Copy link
Copy Markdown
Collaborator

@thyttan thyttan commented May 25, 2026

Work in progress.

Try the current iteration at: https://thyttan.github.io/BangleApps/?id=twenties

@elfehr
Copy link
Copy Markdown

elfehr commented Jun 1, 2026

Thanks for working on that!
Maybe you could add msg: "Twenties" to the alarm, to make it clear where it comes from so users are less likely to delete it? I wonder if there is a way to hide it completely or make it undeletable. Or maybe recreating it on boot if it has been deleted?

For curiosity, how are you testing the code in the IDE? On my side, it doesn't read the file from storage correctly, and if I upload the unminified javascript (either to RAM or to storage, replacing the original), I have an error that sched is not found and exports is not defined.

@thyttan
Copy link
Copy Markdown
Collaborator Author

thyttan commented Jun 1, 2026

if I upload the unminified javascript (either to RAM or to storage, replacing the original), I have an error that sched is not found and exports is not defined.

I get those as well, but it works anyways. When the code runs on the watch it will find the sched library file and use it (if you installed it before). But it's probably good to get that error when uploading so you know to get the library if you haven't already.

The exports not being defined is similar in that when running on the watch it will work. Maybe the Web IDE should be made to not fire that error? @gfwilliams

@thyttan
Copy link
Copy Markdown
Collaborator Author

thyttan commented Jun 1, 2026

I wonder if there is a way to hide it completely or make it undeletable.

Yes I think that makes sense. Gordon and I discussed it some in #4217

Or maybe recreating it on boot if it has been deleted?

I did that before. I prefer to avoid it. But maybe it makes sense.

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

Successfully merging this pull request may close these issues.

2 participants