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.
* Speed optimisations.
* 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
@ -15,7 +12,6 @@
(and look at more than next point)
- display distance to next water/toilet ?
- dynamic map rescale
- display scale (100m)
- compress path ?

View File

@ -334,11 +334,13 @@ class Status {
}
let hours = now.getHours().toString();
// now, distance to next point in meters
g.setFont("6x8:2").drawString(
"" + this.distance_to_next_point + "m",
0,
g.getHeight() - 49
);
g.setFont("6x8:2")
.setColor(g.theme.fg)
.drawString(
"" + this.distance_to_next_point + "m",
0,
g.getHeight() - 49
);
let point_time = this.old_times[this.old_times.length - 1];
let done_in = point_time - this.starting_time - this.paused_time;
@ -458,7 +460,11 @@ class Status {
let x = half_width - Math.round(rotated_x); // x is inverted
let y = half_height + Math.round(rotated_y);
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);
if (this.path.is_waypoint(i - 1)) {