Skip to content

Commit

Permalink
Json page also Shows Git Build (letscontrolit#808)
Browse files Browse the repository at this point in the history
* remove un-needed spaces in JSON (save some memory?)

* Add the Git Build string in the /json page
  • Loading branch information
soif authored and psy0rz committed Feb 2, 2018
1 parent ebfa0a4 commit 36a9bda
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/WebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2984,17 +2984,19 @@ void handle_json()
if (tasknr.length() == 0)
{
reply += F("{\"System\":{\n");
reply += F("\"Build\": ");
reply += F("\"Build\":");
reply += BUILD;
reply += F(",\n\"Unit\": ");
reply += F(",\n\"Git Build\":\"");
reply += BUILD_GIT;
reply += F("\",\n\"Unit\":");
reply += Settings.Unit;
reply += F(",\n\"Local time\": ");
reply += F(",\n\"Local time\":");
reply += F("\"");
reply += getDateTimeString('-',':',' ');
reply += F("\"");
reply += F(",\n\"Uptime\": ");
reply += F(",\n\"Uptime\":");
reply += wdcounter / 2;
reply += F(",\n\"Free RAM\": ");
reply += F(",\n\"Free RAM\":");
reply += ESP.getFreeHeap();
reply += F("\n},\n");
}
Expand Down Expand Up @@ -3024,7 +3026,7 @@ void handle_json()
LoadTaskSettings(TaskIndex);
reply += F("{\n");

reply += F("\"TaskName\": \"");
reply += F("\"TaskName\":\"");
reply += ExtraTaskSettings.TaskDeviceName;
reply += F("\"");
if (Device[DeviceIndex].ValueCount != 0)
Expand Down

0 comments on commit 36a9bda

Please sign in to comment.