clock_info - support #5518
Replies: 1 comment
-
Posted at 2022-11-30 by @thyttan BW Clock, Linux Clock, and Circles Clock so far I think. Here are some PRs made regarding clock_info. Posted at 2022-12-01 by @gfwilliams And
There's a tutorial on it now: http://www.espruino.com/Bangle.js+Clock+Info Posted at 2022-12-02 by HughB Thanks. So the idea is that the user can install any number of clock info modules and any clock that supports the clock infos will get the new feature added ? Excellent idea. I very much like the concept. Had a bit of trouble with it though. I'm on 2.16.7 firmware and the latest apps as per the official app loader. PROBLEM 1 - Slope Clock ++
PROBLEM 2: Using Bw clock. I could not get Sunrise / Sunset to display. I encountered the watch hanging and had to reboot. After the reboot B/W clock would only show the top half of the clock. The bottom hallf was totally black and no amount of tapping or swiping would change the situation. Eventually I uninstalled the sunrise clock info and BW clock recovered ? Is this something to do with BW clock and sunrise having a Bangle menu. BW uses taps to control the cycling through the menu. Screenshots attached. The tutorial is great but a bare bones example clock based on say simplest clock would be easier to understand. Attachments: Posted at 2022-12-04 by HughB I'm trying a clock_info to simplest clock. I'm getting the following error on the console when I try BTN1 and BTN3.
Here's my code for simplest clock
Posted at 2022-12-04 by HughB The following code wont run in the IDE.
Attachments: Posted at 2022-12-04 by @thyttan From the screen shot it seems you may not have followed these instructions:
? I'd have expected there to be a file named 'clock_info' but I don't see one. Posted at 2022-12-05 by @gfwilliams As @thyttan says - You have
You mean you are trying this on Bangle.js 1? What firmware version are you on?
Yes - the idea is this is temporary - just when giving focus to the clock_info. I'd considered just drawing a border around it, it it would interfere with the time's font.
Not at the moment.
The clock. If you look at the tutorial I linked before you can see that the clock is responsible for the drawing code: http://www.espruino.com/Bangle.js+Clock+Info
Thats odd - maybe you could try with the IDE connected and see if it shows any errors? Posted at 2022-12-05 by HughB Thank you for the support @thyttan and @gfwilliams.
I think the future could be clock_info's rather than widgets :) Posted at 2022-12-05 by HughB @peerdavid - I have logged #2361 on BW clock. I get a reproducable hang when sunrise clock_info is installed. Posted at 2022-12-06 by @gfwilliams Just a note that you can get the hang even without sunrise. Just start the clock and start tapping very quickly. Posted at 2022-12-06 by HughB Thanks @gfwilliams, nearly there with my demo. A couple of things
Posted at 2022-12-06 by HughB Once BW clock has hung the only way I can stop the bottom half turning black and being unresponsive is to uninstall sunrise_clockinfo. I guess there could be more than one issue present here. It might be that BW clock is writing to storage after every UI interaction when perhaps it should only do so after the clock has locked. I know this was a problem before on BW clock. Or maybe the clock_info is writing state after every interaction. Posted at 2022-12-07 by PeerDavid BW clock writes settings when you exit the clock, but when it hangs there and you exit it will try to start there again... I will look into this when I have time, unfortunately I'm a bit busy right now :/ I will also try to refactor this interaction into the module such that it can be used by BW and AI clock :) Posted at 2022-12-07 by PeerDavid Regarding the hanging tapping bug -- I guess its due to my lock heuristic where I try to prevent taps whenever the previous info was not shown yet -- otherwise it can happen that e.g. alt. is drawn above the next info... I will also work on this and refactoring into a module will fix both, AI and BW. Thanks for your reports it really helps a lot to improve it and I really like to maintain and improve my clocks :D Posted at 2022-12-07 by @gfwilliams
I noticed - thank you! It makes a big difference to the quality of them. There's a good reason why if you search by most-installed at https://banglejs.com/apps/?c=clock BW Clock is second only to Anton (which is installed by default!)
It should, yes. Have you tried left-right swipes? The clock_info is in categories and swiping left-right changes category while up/down goes within that category Posted at 2022-12-09 by HughB
Yes, still cant get Weather info's displayed on slopeclockpp.
This does not happen when BW clock starts up. I have weather 0.17 installed from the offical loader. Attachments: Posted at 2022-12-09 by HughB I did a Bangle.factoryReset() and re-installed all the latest Apps.
But also go a non repeatable exception using my new Lato clock.
So far the only clock that I can see a display of the Weather clock info's is BW clock. Posted at 2022-12-09 by HughB @gfwilliams - the new time to next sunrise.sunset is nice ! Attachments: Posted at 2022-12-09 by @thyttan Regarding weather.clkinfo.js maybe @myxor, @peerdavid or @glemco could have an idea? Regarding the It seems to me like you pretokenize apps in the app loader? Could you try installing the app again without pretokenization and without minification? I think that would give a little more legible code in the error messages. EDIT: After looking some more it's the clock_info module on line 214, line 250, line 89 and I think line 224 that's referenced in the error message. Posted at 2022-12-09 by @thyttan Also, do you still get the error in Lato if you uninstall weather? Posted at 2022-12-09 by HughB @thyttan - thanks for looking at that. I'm new to the clock_info interface. Not sure how stable it is yet. My Bangle has been unstable since going to 2v16.7 firmware. I get freezes in settings and hangs in various places. I might try the latest bleeding edge firmware. I can get the error in SlopeClockpp as well.
But then after a few seconds I noticed a cloud Icon as below. Attachments: Posted at 2022-12-09 by HughB Getting very erratic behaviour with the weather 0.22 menus. I uninstalled waether but made the mistake of not setting BW clock back to the Bangle menu. Now its a black screen, but it seems to recover after a minute or so. No errors in Lato and SlopeClockpp when weather is uninstalled. But thats the issue. I would really like to see weather working in these clocks consistantly, not erratic with hangs and errors on the console etc. Posted at 2022-12-09 by @thyttan At least now we are quite certain it's something with the the weather clock info and probably not a problem in either Lato, BW Clock or Slope Clock ++. And just a clarification regarding the error message saying I haven't been using my Bangle daily for a while now, but fw2v16.25 seems pretty stable to me. Posted at 2022-12-10 by HughB I'm consistantly getting a hang when I go into settings and scoll up and down to change the color settings in slopeclockpp. I'm on fw2v16.28, only got the lock widget installed, settings, slopeclockpp and lato clocks installed. I have to reboot the watch with a long press. The problem starts when the menu scrolls off the screen - as in the screenshot. I was able to connect via the IDE but the console prompt never responded or showed up. I will try and capture more info so I can log a bug. I have stripped out unnecessary apps, widgets and rewritten the settings just in case. Attachments: Posted at 2022-12-10 by @thyttan Weird, I haven't got that bug recently, but I did get something similar earlier which was fixed when issue #2168 was closed. When it hangs, do you get any error messages if connected to the Web IDE? You don't happen to have some custom code for Is everything up to date with the app loader? (Main one or development one in that case?) I don't think it should help, but you could try installing Swipe menus. If it helps it's maybe something with EDIT: Also, did you try uninstalling and then installing Slope Clock++ again. If this only happens in it's settings menu maybe the slopeclockpp.settings.js file has been corrupted somewhere along the way? Posted at 2022-12-10 by HughB No custom code for Posted at 2022-12-10 by @thyttan I tried scrolling up and down on slope clock ++ settings but I don't get the bug. If you want to, you can upload a backup of your watch here so I could restore it to my watch and see if I get the error as well, and if I could find a solution. Posted at 2022-12-11 by HughB I have logged this hang as [Issue 2382] (espruino/BangleApps#2382) Posted at 2022-12-11 by HughB I have uploaded a backup. It would be good if someone else can see this. Attachments: Posted at 2022-12-11 by @thyttan I commented on issue 2382. Restored your backup but couldn't reproduce the bug. Posted at 2022-12-11 by glemco I couldn't reproduce the error with clkinfos on my setup, however I found that the code printing that warning isn't exactly helping out with the problem.. console.log(e); in the same catch box where that is printed (should be EDIT Posted at 2022-12-11 by HughB I have reproduced issue 2382 on a second Bangle 2 now. Posted at 2022-12-11 by HughB The SlopeClockpp with Weather Clock_info is working fine without issue on my 2nd Bangle 2. Issue 2382 still reproducable though. Posted at 2022-12-11 by glemco Do you mean the problem is there just on 1 bangle out of 2? Posted at 2022-12-11 by HughB No I have two Bangle 2's and both will reproduce issue 2382 (the hang issue in settings, not the clock_info issue that now appears to have gone since switching off pretokenisation). When reproducing bugs I take great care to make sure I have the same versions of apps and configuration. I usually do a factory reset and fully refresh favourites. I used to be a software tester many years ago. I have done a video of the Settings/Hang for issue 2382. In terms of Clock_Info's I can now reliably use Posted at 2022-12-11 by glemco Well, didn't mean to criticize your method (very neat, by the way). Just the clkinfo (and modules in general) are quite hard to track as they aren't versioned, so I first thought it could be that. Posted at 2022-12-11 by HughB I appreciate your support and interest. Annoying that the problem has gone away and I'm not 100% certain why. Its a puzzle. It might be that I upgraded to I'm going to see if I can write a firmware ID clock_info now :) Posted at 2022-12-11 by HughB Here's my Firmware ClockInfo. Attachments: Posted at 2022-12-12 by HughB Just a quick update 2382 has been fixed in 2.16.33 firmware. Posted at 2022-12-14 by HughB For clock_info's I am wondering what a minimal version of the show and hide functions should be ? Are they needed for clkinfofw. The firmware is not going to change and if it did there would have been a reboot. So could I just use:
Instead of:
Posted at 2022-12-15 by glemco In the reference Implementations I have always seen something like Posted at 2022-12-15 by @gfwilliams
As you say, the intervals are not needed, but I think @glemco that's an interesting one though - maybe there are some clockinfos that don't do that Posted at 2022-12-16 by glemco By the way, I'm not quite sure I fully understand the use of If I understood correctly, the simple Posted at 2022-12-16 by @gfwilliams The problem is, some clockinfos (eg the 'height' one) can't get the data they need to draw immediately. So the idea was that you'd call We need show/hide because we don't want to turn on gps/hrm/barometer/etc all the time - we just want them when the info is showing. We also don't want to redraw the clock infos every minute/second - we want them to be able to tell us when they changed and want to redraw. The Posted at 2022-12-16 by @gfwilliams I've just done a bunch of fixing up now... @hughb @glemco I was wrong about the I've tried to pull it out of all the code I can find so far Posted at 2022-12-17 by HughB @gfwilliams -done a pull and can see the changes done to clkinfofw. Is it possible the 0.01 version of clkinfofw would cause a memory leak ? Posted at 2022-12-18 by glemco So now the right way to handle the Posted at 2022-12-19 by @gfwilliams
Yes.
Yes - things like pressure just draw
I don't really understand... Items that are ready instantly should only draw once Items that aren't will draw twice, but at least if you're scrolling through menus then they should update quickly. Posted at 2022-12-19 by glemco Thanks, I guess I'm starting to grasp it better!
Does it make sense? Posted at 2022-12-19 by @gfwilliams That sounds good
Yes, I reckon that's ok for now then.
Yes, this might need some thought and careful testing with the existing addInteractive code (and that built into BW Clock/etc) since right now they're not expecting the arrays they are working on to change underneath them. Posted at 2022-12-20 by glemco Right, good point. Posted at 2023-01-06 by @gfwilliams I've just merged a change from @peerdavid that makes BW Clock use addInteractive :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-11-30 by HughB
I see there is a new module called clock_info but am wondering which clocks support this ?
I'm curious to see how this works in practice at a UI level.
I ideally want to try out a few example clocks.
Cant find any documentation on it other than the clock_info module.
Beta Was this translation helpful? Give feedback.
All reactions