commit 6c3f019ab76ac1716f292ac2e00d7cfea30748b3
parent eaa4ad895fedc285f6adbd73dc00bdb62d0660aa
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 9 Jun 2025 22:15:54 +0100
only change orientation if course is > 20 degrees off
means we don't spin around quite as much, which is nice
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl
@@ -302,9 +302,10 @@ label.readout {
(when (not (bounds= old-bounds bounds))
(fetch-tiles bounds app-state.tiles app-state.zoom)
(set map-surface nil)))
- (set app-state.orientation
- (+ app-state.orientation
- (* 0.05 (- app-state.course app-state.orientation))))
+ (when (> (math.abs (- app-state.orientation app-state.course)) 20)
+ (set app-state.orientation
+ (+ app-state.orientation
+ (* 0.05 (- app-state.course app-state.orientation)))))
(each [name widget (pairs state-widgets)]
(case name
:speed (widget:set_label