From e029a031050e08599f9d6d5fa654c17d985039c1 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 26 May 2023 21:07:48 +0200 Subject: expose sequence length of trip to onboard unit --- tools/obu-guess-trip | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/obu-guess-trip') diff --git a/tools/obu-guess-trip b/tools/obu-guess-trip index 305ec8d..b9264f6 100755 --- a/tools/obu-guess-trip +++ b/tools/obu-guess-trip @@ -43,7 +43,10 @@ Arguments: (define stops (fetch-stations url)) (define pos (with-input-from-process `(obu-ping -s ,statefile -n 1 -d) read)) - (define trip (assoc-ref (closest-stop-to stops pos) 'trip)) + (define guessed + (closest-stop-to stops pos)) + (define trip (assoc-ref guessed 'trip)) + (do-process `(obu-config -s ,statefile sequencelength ,(assoc-ref guessed 'sequencelength))) (display trip)) (define (closest-stop-to stops pos) -- cgit v1.2.3