diff options
author | stuebinm | 2023-05-26 21:07:48 +0200 |
---|---|---|
committer | stuebinm | 2023-05-26 21:14:20 +0200 |
commit | e029a031050e08599f9d6d5fa654c17d985039c1 (patch) | |
tree | 3b4dd35bf6f6a8495b47ac5158a954151c9c0b55 /tools/obu-guess-trip | |
parent | 8737181eac0dce062ff0541e263ba0bf6a772c66 (diff) |
expose sequence length of trip to onboard unit
Diffstat (limited to '')
-rwxr-xr-x | tools/obu-guess-trip | 5 |
1 files changed, 4 insertions, 1 deletions
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) |