Skip to content

Commit e0616ab

Browse files
committed
Use printf format strings from PROGMEM
1 parent 0f5f107 commit e0616ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

TODO.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ TODO items
8181
20.9 Add wide clock style config, different screen formats for 8+ tiles: HH:MM, HH:MM:SS, HH:MM *CF, HH:MM %RH, mm dd HH:MM, HH:MM Www DD (12 chars! 8 tiles fit 10 chars! ,
8282
(There are smaller fonts, but everything in this code is assuming fixed size chars.)
8383
==> Done v3.1.25; now there are 8 variants. No font change.
84-
21. News headlines: Do not use newsapi.org, it is NOT free but costs 450 USD per __MONTH__ (5400 USD per annum)! rediculous pricing for this Indian company!
84+
21. News headlines: Do not use newsapi.org, it is NOT free but costs 450 USD per __MONTH__ (5400 USD per annum)! ridiculous pricing for this Indian company!
8585
==> Done v3.1.26
8686
22. Change to use latest Arduino json V7 library. this makes the JsonStreamingParser and json buffer size (mis)calculation unnecessary.
8787
==> Done v3.1.27 (thanks to bit4man)

marquee/MqttClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ void MqttClient::loop() {
7272
if (connectstatus) {
7373
failMessage[0] = 0;
7474
if (!client.subscribe(topic)) {
75-
sprintf(failMessage, "Failed to connect to topic:%s", topic);
75+
sprintf_P(failMessage, PSTR("Failed to connect to topic:%s"), topic);
7676
} else {
7777
// publish on topic + "/ready" the time to signal MQTT we are there
7878
String pubtopic = topic;
7979
pubtopic += "/ready";
8080
client.publish(pubtopic.c_str(), "ready");
8181
}
8282
} else {
83-
sprintf(failMessage, "Failed to connect to: %s:%d, reason: %d", server, port, client.state());
83+
sprintf_P(failMessage, PSTR("Failed to connect to: %s:%d, reason: %d"), server, port, client.state());
8484
}
8585
}
8686
if (client.connected()) {

marquee/marquee.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ void getWeatherData() //client function to send/receive GET request data.
11581158
// when scrolling the display causing that to stall.
11591159
// Solution: cancel setup sync provider, and call getNtpTime() here explicitly,
11601160
// then the time update is visualized on the LED display.
1161-
Serial.printf("Timestatus=%d\n", timeStatus()); // status timeNeedsSync(1) is NEVER set
1161+
Serial.printf_P(PSTR("Timestatus=%d\n"), timeStatus()); // status timeNeedsSync(1) is NEVER set
11621162
if (1) { //ALWAYS; (timeStatus() != timeSet || updateTime) { // when timeNotSet OR timeNeedsSync
11631163
Serial.println(F("Updating Time..."));
11641164
//Update the Time

0 commit comments

Comments
 (0)