-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
New app: pace #3565
New app: pace #3565
Conversation
With a slight hack
@gfwilliams @thyttan @atjn I keep seeing memory errors with this but don't believe there's a memory leak in my code, any ideas?
And when I >reset()
=undefined
FW addr 0x0022afac fail
Status 0
FW addr 0x0022bbb0 fail
Status 0
FW addr 0x0022bbd0 fail
Status 0
FW addr 0x0022bc00 fail
Status 0
Execution Interrupted during event processing.
Interpreter error: [
"LOW_MEMORY",
"MEMORY"
] |
e42e268
to
d447b5c
Compare
I'm quite ignorant about the layout module. I suppose its clear function wouldn't help? |
Thanks for the quick response! I'm afraid not, that just wipes the layout's part of the screen, but thanks for the suggestion - I'll dig more into the layout module. Although thinking about it, my app isn't using it too differently from others such as |
The app starts completely blank though and need two button presses just to display anything, so I feel like something's not right anyway. Maybe run https://github.com/espruino/EspruinoMemView and see if you can visibly see what looks like the issue. But I just noticed:
and at no point does anything seem to take anything out of
|
By the way, it's interesting that |
The GPS on my watch has never really worked so I unfortunately can't reproduce the issue. On the other hand, that is a pretty good indicator that your problem lies somewhere in the GPS handling. Taking a quick look at the code, my best bet is that you have made a mistake with this loop, which makes it loop infinitely: for(; ; i++) {
const split = splits[i + splitOffset];
if (split == null) break;
... |
Shall do - as far as I have seen, running the app as it stands reliably raises the error for me, perhaps the gradual increase in small memory usage (i.e. a
Interesting - the app for me starts with an initial split shown, that's quite odd!
Didn't know about this, amazing
I believe this is the issue, I expect my units are wrong, so it's adding to a split once per metre instead of once per K (or similar)
I'll see what I can find
Thanks for the pointer, but this is ok - if we had an issue here we'd see the app hanging since it would be an infinite loop :) |
time is total (or elapsed) time, duration is active time
Switched to using |
8d9a00a
to
0b8637f
Compare
All sorted - I'm thinking of doing something with run+ so runners can see their splits at the end of their run, is that something that'd be accepted or better kept as another app? |
I agree getting that summary at the end might be nice.
For the running layout, what differentiates this from what the run/run+ apps can do - since you can put current pace in one of it's boxes already? Is it the legibility? less taxing on battery? |
i.e. time/distance mix-up
also patch btadv
0b8637f
to
7718374
Compare
Yes I think so
Also very good points, agreed!
Yes I like the sound of that, I think I'll keep this as a standalone app for anyone that might want something simpler (or to run on Bangle 1) and see about how we can integrate it into
Yeah that's what I was wondering, I think that'd be cool.
Yes, a more lightweight app and you can see two things at once - the main things I need to see when racing are my pace and current time. So perhaps something else we consider for |
apps/pace/app-icon.js
Outdated
@@ -0,0 +1 @@ | |||
require("heatshrink").decompress(atob("mEwwkBiIA/AH8QRYoX/AAcAZqwXuMIQYCiAcOO456OCwwACF5orEDghzOE4oZCLxw+GDAKsXeSIqEGBKKGBwIRFGBCfIC7p5RC7oGHC8RxFC453JAw4Xda5AIEC5IAPO6AXmO5BuHC67OIUA4aERyIXEIxAAJiAuFC5gTEcgpDNBwoWCIxp4CCwp1OCIYAEOiDFNDBwVQAH4AvA=")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This draws black on black for me in dtlaunch
(Desktop Launcher) when using Dark BW system theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, thanks! Sorted
apps/pace/app.ts
Outdated
|
||
const drawSplit = (i: number, y: number, pace: number | string) => { | ||
g | ||
.setColor("#fff") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use g.theme.fg
, right (or some other solution)? On Light BW theme it's white on white for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good spot!
I'm inclined to favor a solution like this:
I think this post on the forum is relevant when thinking about this more:
|
- compression - transparency - inverted
I like the sound of that - the delayed first touch counting as a single tap to focus a box sounds great to me.
I think we stick with how it's been done with karvonnen for now, with the split display and we can split apart if the app does seem to bloat - I can get started on a PR over the next few weeks if that sounds good to you? |
OK! If you want to - no rush of course 🙂 Regarding this PRAll's looking good on the watch now - nice work! I don't know anything about typescript types, so no comment from me there. Maybe @gfwilliams could just take a look at the changes to exstats - they seem innocent but I'm not really familiar with it. |
Thank you! Ah yes - the exstats changes are to allow users/callers to adjust the Lines 188 to 191 in 47a8d26
|
@gfwilliams are you ok with the changes to |
Looks good to me. I don't see anything else that uses 'notify' relies on the values so I think we're good? |
Yes I think so - thanks for the check, @thyttan all good from you? |
Yes! |
Thanks! |
This allows a runner to view their current pace and, when paused, splits from their run