From 44772557bac0bc0007f084fcec11ea76bd6f5c68 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sat, 5 Aug 2023 11:42:15 +0200 Subject: [PATCH] fixed INS when no GPS fix --- src/kernel/gps/INS.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/gps/INS.hx b/src/kernel/gps/INS.hx index 6b9e1df..7f30b17 100644 --- a/src/kernel/gps/INS.hx +++ b/src/kernel/gps/INS.hx @@ -69,8 +69,9 @@ class INS { } private static function move(dir:Null) { - Log.debug('INS move: $dir'); var pos = GPS.getPosition(); + if (pos == null || dir == null) + return; var newPos = pos + dir; GPS.setINSPosition(newPos); }