diff --git a/client/animations/tiny_train.gif b/client/animations/tiny_train.gif new file mode 100644 index 0000000..7f4a529 Binary files /dev/null and b/client/animations/tiny_train.gif differ diff --git a/client/bitmaps.h b/client/bitmaps.h index 9bbffa9..b189661 100644 --- a/client/bitmaps.h +++ b/client/bitmaps.h @@ -81,3 +81,17 @@ static const uint8_t PROGMEM spinny[][8] = { 0x00, }, }; +static const uint16_t PROGMEM tiny_train_dims[] = {24, 9, 1}; +static const uint8_t PROGMEM tiny_train[][27] = { + { + 0x00, 0x04, 0x00, + 0x00, 0x02, 0x00, + 0x01, 0xff, 0xfe, + 0x00, 0xa4, 0x94, + 0x01, 0x24, 0x92, + 0x01, 0x24, 0x92, + 0x03, 0xfc, 0xff, + 0x03, 0xff, 0xff, + 0x01, 0xb0, 0x36, + }, +}; diff --git a/client/client.ino b/client/client.ino index 3af0328..d0e41e5 100644 --- a/client/client.ino +++ b/client/client.ino @@ -102,20 +102,17 @@ void setup() { pinMode(BUTTON_PIN, INPUT_PULLUP); attachInterrupt(BUTTON_PIN, onButtonFalling, FALLING); - /* - display.print(" 5 Mannheim sofort\n" - "26 Kirchheim 9 min\n" - " 5 Weinheim 20:13"); - */ } +#define QUERY_STRING "stop_id=de:08221:1225&platform=A" + // TODO: Error handling String fetchDepartures() { std::unique_ptr https(new BearSSL::WiFiClientSecure); https->setInsecure(); HTTPClient client; - if (!client.begin(*https, "vrnp.beany.club", 443, "/departures?stop_id=de:08221:1225&platform=A")) { + if (!client.begin(*https, "vrnp.beany.club", 443, "/departures?" QUERY_STRING)) { display.fillScreen(COLOR_BG); display.setCursor(0, 0); display.print("begin failed"); diff --git a/client/scripts/extract_bitmaps.py b/client/scripts/extract_bitmaps.py index a99562b..f4de0c3 100755 --- a/client/scripts/extract_bitmaps.py +++ b/client/scripts/extract_bitmaps.py @@ -43,3 +43,4 @@ def generate_bitmap_from_gif(file: Path, fd): if __name__ == "__main__": generate_bitmap_from_gif(Path("./animations/spinny.gif"), sys.stdout) + generate_bitmap_from_gif(Path("./animations/tiny_train.gif"), sys.stdout)