gipy: quickfix for heights position
parent
7f91bceb5c
commit
539d687fd8
|
|
@ -1002,10 +1002,11 @@ class Status {
|
||||||
let current_position = 0;
|
let current_position = 0;
|
||||||
if (this.current_segment !== null) {
|
if (this.current_segment !== null) {
|
||||||
current_position =
|
current_position =
|
||||||
this.remaining_distances[this.current_segment + 1] +
|
this.remaining_distances[0] -
|
||||||
this.projected_point.distance(
|
(this.remaining_distances[this.current_segment + 1] +
|
||||||
this.path.point(this.current_segment + 1)
|
this.projected_point.distance(
|
||||||
);
|
this.path.point(this.current_segment + 1)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
if (this.screen == HEIGHTS_FULL) {
|
if (this.screen == HEIGHTS_FULL) {
|
||||||
this.display_heights(0, current_position, this.remaining_distances[0]);
|
this.display_heights(0, current_position, this.remaining_distances[0]);
|
||||||
|
|
@ -1484,8 +1485,8 @@ class Path {
|
||||||
// by default correct orientation (0 forward, 1 backward) wins
|
// by default correct orientation (0 forward, 1 backward) wins
|
||||||
// but if other one is really closer, return other one
|
// but if other one is really closer, return other one
|
||||||
let good_orientation = go_backwards ? 1 : 0;
|
let good_orientation = go_backwards ? 1 : 0;
|
||||||
if (mins[1-good_orientation] < mins[good_orientation] / 100.0) {
|
if (mins[1 - good_orientation] < mins[good_orientation] / 100.0) {
|
||||||
return indices[1-good_orientation];
|
return indices[1 - good_orientation];
|
||||||
} else {
|
} else {
|
||||||
return indices[good_orientation];
|
return indices[good_orientation];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue