Extended http_server to provide new endpoints:

/_mapping.txt, /player.json, /playlist_manager.json, /controller.json and /position.json to get the matching data as well as /cmd to send commands to.
This commit is contained in:
2019-11-19 20:48:11 +01:00
parent 4f9174d362
commit 20041dd483
2 changed files with 11 additions and 2 deletions

View File

@ -360,6 +360,8 @@ String Controller::json() {
JsonObject rfid = json.createNestedObject("last_rfid");
rfid["uid"] = _last_rfid_uid;
rfid["data"] = _last_rfid_data;
json["uptime"] = millis() / 1000;
json["free_heap"] = ESP.getFreeHeap();
return json.as<String>();
}