Skip to content

Commit

Permalink
fixed some warnings and error
Browse files Browse the repository at this point in the history
  • Loading branch information
Foroxon committed Jan 15, 2024
1 parent faaf949 commit d67f859
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Binary file modified libs/Adafruit_GFX_Library.zip
Binary file not shown.
1 change: 1 addition & 0 deletions libs/glcdfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// Standard ASCII 5x7 font

__attribute__((unused))
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x55, 0x51, 0x55, 0x3E,
Expand Down
7 changes: 2 additions & 5 deletions src/firmware/firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ std::vector<String> fetchAndParseJSON() {

if (httpCode > 0) {
String payload = http.getString();
DynamicJsonDocument doc(1024);
JsonDocument doc;
deserializeJson(doc, payload);

JsonArray arr = doc.as<JsonArray>();
Expand Down Expand Up @@ -787,7 +787,7 @@ void parseHomeDistrictJson() {
String payload = http.getString();
Serial.println("Http Success, payload: " + payload);

DynamicJsonDocument doc(512);
JsonDocument doc;
DeserializationError error = deserializeJson(doc, payload);
if (error) {
Serial.println("Deserialization error: ");
Expand All @@ -796,15 +796,12 @@ void parseHomeDistrictJson() {
}
Serial.println("Json parsed!");
bool alertNow = doc["data"]["alertnow"];
Serial.print("Alert now: ");
Serial.println(alertNow);
if (alertNow) {
homeAlertStart = doc["data"]["changed"];
Serial.print("Home Alert Start: ");
Serial.println(homeAlertStart);
} else {
homeAlertStart = 0;
Serial.println("Home Alert Start: " + homeAlertStart);
}
} else {
Serial.println("Error on HTTP request:" + httpCode);
Expand Down

0 comments on commit d67f859

Please sign in to comment.