espruino / BangleApps

Bangle.js App Loader (and Apps)
https://banglejs.com/apps
MIT License
488 stars 1.16k forks source link

[Sleep Quiet] Can't edit any setting #3484

Closed Tsht closed 3 months ago

Tsht commented 3 months ago

Affected hardware version

Bangle 2

Your firmware version

2v23

The bug

When I click on the app I have three settings (Quiet Switch, quiet mode, exit), however only Exit works. Clicking on the others only vibrates the watch, the setting won't change. I should be able to edit the setting. Just click on the watch button, then Sleep Quiet and try to change a setting. I have SleepLog installed and working.

Installed apps

Launcher (v0.21) Bluetooth Widget (v0.09) Lock Widget (v0.08) Battery Level Widget (v0.12) Messages (v0.62) Weather (v0.26) Alarms Widget (v0.02) Pedometer widget (v0.22) About (v0.15) Message Icons (v0.07) Anton Clock Plus (v0.11) Message Widget (v0.06) Message List (v0.05) Simple Timer (v0.09) Sleep Log (v0.18) Scheduler (v0.26) Notifications (default) (v0.14) Android Integration (v0.36) Settings (v0.72) Alarms & Timers (v0.48) Bootloader (v0.62) Sleep Quiet (activate quiet mode when asleep) (v0.01)

bobrippling commented 3 months ago

If you connect the IDE, do you notice any errors emitted when you change those settings? @storm64 @Ishidres tagging with you two being the main devs

storm64 commented 3 months ago

I'd like to hand this over to @jla-42, as he is the creator of this app. From the bug description the sleeplog interface does not seem to be the problem.

jla-42 commented 3 months ago

will look into it.

If you connect the IDE, do you notice any errors emitted when you change those settings?

@Tsht the printout from the IDE would be really helpful. Thanks!

jla-42 commented 3 months ago

Hello @Tsht, I could reproduce the issue and (hopefully) fix it. I created a pull request, which is waiting for a review before it can be merged: #3486 If you would like to test it right away, you can do so in my fork: https://jla-42.github.io/BangleApps/?q=asleephttps://jla-42.github.io/BangleApps/?q=asleep

Thank you for finding the defect!

Best wishes J

Tsht commented 3 months ago

I think the file is created with v0.02, I saw this in the IDE (quietSwitch.json). It's empty ({}) but I can't still edit settings... I have no specific output on the IDE.

jla-42 commented 3 months ago

@Tsht >> please run this command in the ide, to erase the broken file, after that, the version 0.02 will during the first run create a new one populated with default values. hope that helps. require("Storage").erase("quietSwitch.json")

Tsht commented 3 months ago

It's working after erasing the file, thanks ! ^^

jla-42 commented 3 months ago

Cool, thank you for testing!

@bobrippling >> can you please close this ticket as it is fixed and the pull request is awaiting review and merge? thanks!

bobrippling commented 3 months ago

Thanks for the fix @jla-42!

jla-42 commented 3 months ago

@bobrippling >> thank you for verification and closing!