Skip to content

Commit

Permalink
Cleanup telstar departure board layout
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mount committed Apr 5, 2023
1 parent b52cd81 commit 235a85a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/darwintelstar/telstar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions util/telstar/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 235a85a

Please sign in to comment.