Skip to content

Commit 1c9945f

Browse files
committed
Bump version
And increment position only after clearing contents
1 parent 303bfcc commit 1c9945f

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

examples/DBTFT/platformio.ini

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ platform = espressif8266
1313
board = d1_mini
1414
framework = arduino
1515
lib_deps =
16-
soundstorm/DBAPI @ ^2.1.7
16+
soundstorm/DBAPI @ ^2.2.0
1717
arduino-libraries/NTPClient @ ^3.2.1
1818
adafruit/Adafruit GFX Library@^1.11.10
1919
adafruit/Adafruit ILI9341 @ ^1.5.12
@@ -30,7 +30,7 @@ framework = arduino
3030
build_flags = -D BOARD_2432S028R
3131
lib_ldf_mode = deep
3232
lib_deps =
33-
soundstorm/DBAPI @ ^2.1.7
33+
soundstorm/DBAPI @ ^2.2.0
3434
arduino-libraries/NTPClient @ ^3.2.1
3535
adafruit/Adafruit GFX Library@^1.11.10
3636
adafruit/Adafruit ILI9341 @ ^1.5.12
@@ -48,15 +48,13 @@ framework = arduino
4848
build_flags = -D BOARD_2432S028R -D USE_ST7798
4949
lib_ldf_mode = deep
5050
lib_deps =
51-
soundstorm/DBAPI @ ^2.1.7
51+
soundstorm/DBAPI @ ^2.2.0
5252
arduino-libraries/NTPClient @ ^3.2.1
5353
adafruit/Adafruit GFX Library@^1.11.10
5454
adafruit/Adafruit ST7735 and ST7789 Library@^1.11.0
5555
tzapu/WifiManager @ ^2.0.0
5656
board_build.filesystem = littlefs
5757
monitor_speed = 115200
58-
monitor_port = COM6
59-
upload_port = COM6
6058
#upload_protocol = espota
6159
#upload_flags = --auth=iliketrains
6260
#board_build.partitions = esp32_4M.csv ;0x140000 by default is apprently not enough in some cases, shrink littlefs.

examples/DBTFT/src/DBTFT.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ void loop() {
782782
}
783783
}
784784
Serial.println("Reload");
785-
da = db.getDepartures(fromStation->stationId, NULL, tdst, activeDesign->maxEntries, 3, filter);
786-
Serial.println();
785+
da = db.getDepartures(fromStation->stationId, NULL, tdst + 7 * 3600, activeDesign->maxEntries, 2, filter);
786+
Serial.println(db.getError());
787787
departure = da;
788788
if (departure != NULL) {
789789
failedConnection = 0; // Reset, as we got a result anyways.
@@ -799,10 +799,10 @@ void loop() {
799799
departure = departure->next;
800800
}
801801
tft.setTextColor(COLOR_RED);
802-
// clear empty spots (not enough departures) only if we got data.
803-
while (pos + activeDesign->itemHeight * 2 - 2 <= tft.height() && da != NULL) {
804-
pos += activeDesign->itemHeight;
802+
// clear empty spots (not enough departures) only if the request succeeded.
803+
while (pos + activeDesign->itemHeight * 2 - 2 <= tft.height() && db.getError() == DBERR_NONE) {
805804
tft.fillRect(0, pos - 1, tft.width(), 18, activeDesign->backgroundColor);
805+
pos += activeDesign->itemHeight;
806806
}
807807
if (failedConnection == 5) {
808808
tft.fillScreen(COLOR_RED);

examples/HannoverHBF/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ platform = espressif8266
1313
board = d1_mini
1414
framework = arduino
1515
lib_deps =
16-
soundstorm/DBAPI @ ^2.1.7
16+
soundstorm/DBAPI @ ^2.2.0
1717
bblanchon/ArduinoJson @ ^7.3.0
1818
paulstoffregen/Time @ ^1.6.1

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "DBAPI",
3-
"version": "2.1.7",
3+
"version": "2.2.0",
44
"description": "Hacon/Hafas/DB API for ESP8266 / ESP32 (WiFiClientSecure)",
55
"keywords": "train, deutsche bahn, travel",
66
"repository":

0 commit comments

Comments
 (0)