From 235a85a0598406ae1545cb209a5914c985cde06e Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 5 Apr 2023 20:21:09 +0100 Subject: [PATCH] Cleanup telstar departure board layout --- tools/darwintelstar/telstar.go | 2 +- util/telstar/response.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/darwintelstar/telstar.go b/tools/darwintelstar/telstar.go index ce79538..1422504 100644 --- a/tools/darwintelstar/telstar.go +++ b/tools/darwintelstar/telstar.go @@ -35,7 +35,7 @@ func (t *Telstar) boards() error { func (t *Telstar) crs(crs string) error { - crs = "LBG" + //crs = "LBG" cl := client.DarwinLDBClient{Url: "https://ldb.prod.a51.li"} result, err := cl.GetSchedule(crs) diff --git a/util/telstar/response.go b/util/telstar/response.go index b016ef4..482624c 100644 --- a/util/telstar/response.go +++ b/util/telstar/response.go @@ -44,6 +44,10 @@ func (r *Response) Dynamic() *Response { // AddFrame adds a frame to the response func (r *Response) addFrame(f *Frame) *Response { // Don't add a frame if we are full - e.g. large responses + // e.g. For london bridge, at times you can fill up frames a...y + // and have to cut off frames. + // + // Also, Telstar doesn't allow z in the response - hence why <'z' here if len(r.frames) < int('z'-r.frameId) { r.frames = append(r.frames, f) }