commit 60d675bc42ac97e541ab78b54ffe3306deb3f2fa
parent cdce47e72a1f1c7e224b433cea2bacc8c6a11706
Author: Daniel Barlow <dan@telent.net>
Date: Fri, 13 Mar 2026 22:15:25 +0000
remove clamp of gnss course datum
doesn't seem to be needed any longer
Diffstat:
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl
@@ -94,7 +94,6 @@ label.readout {
:lon 0
:zoom 17
:course 0 ; direction of travel
- :courses [0 0 0]
:orientation-target 0 ; map rotation angle from north
:orientation-actual 0 ; map rotation angle from north
:rotation-speed 0
@@ -499,12 +498,6 @@ label.readout {
true)
}))))
-
-(fn clamp [a b c]
- (if (< b a) a
- (> b c) c
- b))
-
(fn read-gnss-sentence [l]
(if (not (= l ""))
(let [message (nmea.parse l)]
@@ -521,13 +514,7 @@ label.readout {
{ : speed-knots }
(update-app-state { :speed (* speed-knots knot-in-m-s) }))
(when message.bearing-true
- (let [c1 message.bearing-true
- c2 (. app-state.courses 1)
- c3 (. app-state.courses 2)]
- (update-app-state
- { :course (clamp c1 c2 c3)
- :courses [c1 c2 c3]
- }))))))
+ (update-app-state { :course message.bearing-true })))))
(fn collect-profile []
(GLib.timeout_add