aboutsummaryrefslogtreecommitdiff
path: root/tools/obu-guess-trip
diff options
context:
space:
mode:
Diffstat (limited to 'tools/obu-guess-trip')
-rwxr-xr-xtools/obu-guess-trip5
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)