gipy: color current and next segment

master
frederic wagner 2022-12-29 16:31:53 +01:00
parent 8b11c8f4d9
commit b00b4395fb
3 changed files with 15 additions and 12 deletions

View File

@ -70,3 +70,4 @@
* New setting to hide points and increase display speed. * New setting to hide points and increase display speed.
* Speed optimisations. * Speed optimisations.
* Estimated time of Arrival/Going back. * Estimated time of Arrival/Going back.
* Display current and next segment in red so that you know where to go.

View File

@ -1,10 +1,7 @@
* bugs + use Bangle.project(latlong)
+ try to avoid camera turning when stopped but still work when walking
- when exactly on turn, distance to next point is still often 50m
-----> it does not buzz very often on turns
- when going backwards we have a tendencing to get a wrong current_segment
* additional features * additional features
@ -15,7 +12,6 @@
(and look at more than next point) (and look at more than next point)
- display distance to next water/toilet ? - display distance to next water/toilet ?
- dynamic map rescale
- display scale (100m) - display scale (100m)
- compress path ? - compress path ?

View File

@ -334,7 +334,9 @@ class Status {
} }
let hours = now.getHours().toString(); let hours = now.getHours().toString();
// now, distance to next point in meters // now, distance to next point in meters
g.setFont("6x8:2").drawString( g.setFont("6x8:2")
.setColor(g.theme.fg)
.drawString(
"" + this.distance_to_next_point + "m", "" + this.distance_to_next_point + "m",
0, 0,
g.getHeight() - 49 g.getHeight() - 49
@ -458,7 +460,11 @@ class Status {
let x = half_width - Math.round(rotated_x); // x is inverted let x = half_width - Math.round(rotated_x); // x is inverted
let y = half_height + Math.round(rotated_y); let y = half_height + Math.round(rotated_y);
if (previous_x !== null) { if (previous_x !== null) {
g.setColor(g.theme.fg); let segment_color = g.theme.fg;
if (i == this.current_segment + 1 || i == this.current_segment + 2) {
segment_color = 0xf800;
}
g.setColor(segment_color);
g.drawLine(previous_x, previous_y, x, y); g.drawLine(previous_x, previous_y, x, y);
if (this.path.is_waypoint(i - 1)) { if (this.path.is_waypoint(i - 1)) {