Skip to content

Conversation

@bobrippling
Copy link
Collaborator

This adds an option to show the satelite strength as a bar, to allow people to gauge how accurate the pace (and related stats) are, while running.

  • Test on a run

@bobrippling
Copy link
Collaborator Author

@gfwilliams for some reason the main boxes are scooted over to the right (I would expect left), when I add a column to their right:

image

Compared to the setting being off, so no column added on the left:
image

The code that adds the bar is:

topLevel = {
type: "h",
c: [
{
type: "custom",
render: drawGpsLvl,
id: "gpslvl",
filly: 1,
width: 5,
bgCol: g.theme.bg, // automatically clears before render()
},
topLevel,
]
}
}
let layout = new Layout(topLevel, {lazy:true, btns:[{ label:"---", cb: onStartStop, id:"button"}]});

Is this something odd in layout?

@gfwilliams
Copy link
Member

It does seem to be something strange in Layout. I'm looking into it, but right now it seems to be caused by the button label that gets added. If you remove the btns argument it lays out properly.

@gfwilliams
Copy link
Member

Ok, I've just fixed it, but because we're building Layout in now, you'll need a whole new firmware for this to work :(

Short of hard-coding the widths of the columns I don't think there's a great solution for this.

But what about some other options:

  • We already have 8 pixels over the right-hand side where the button's text is. Could you just draw in there? As long as you redraw after layout.render(); it'd be ok
  • Or what about adding a custom renderer for the GPS area? Then you could have your GPS accuracy bar in there, since we already change the background colour based on whether we have a fix or not we might as well change it to the colours you've used, and maybe add the percent bar in there in the background?
  • Or you could add it as a widget in the widget bar (you can easily add one that only shows in runplus)?
  • ...or what about a widget that can be installed and would display in any apps where GPS is enabled?

@bobrippling
Copy link
Collaborator Author

Thanks for the fix!

But what about some other options:

  • We already have 8 pixels over the right-hand side where the button's text is. Could you just draw in there? As long as you redraw after layout.render(); it'd be ok

  • Or what about adding a custom renderer for the GPS area? Then you could have your GPS accuracy bar in there, since we already change the background colour based on whether we have a fix or not we might as well change it to the colours you've used, and maybe add the percent bar in there in the background?

  • Or you could add it as a widget in the widget bar (you can easily add one that only shows in runplus)?

  • ...or what about a widget that can be installed and would display in any apps where GPS is enabled?

Sure - I'll try those out and see how they look 🎨

@pavelmachek
Copy link
Contributor

In "sky spy", I was playing with different ideas to determine if GPS signal is reliable. Best way probably is to compare GPS and barometer heights, and if that difference is too big or changes rapidly, GPS is not reliable.

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.

3 participants