remove legacy code

This commit is contained in:
Thomas Ballmann 2020-12-05 16:34:39 +01:00
parent ed8a5f54e5
commit 74e7028ced
2 changed files with 3 additions and 15 deletions

View File

@ -283,18 +283,7 @@ void setupApiDevice()
}); });
server.on( server.on(
"/api/device/screen", HTTP_POST, [](AsyncWebServerRequest *request) { "/api/device/screen", HTTP_POST, [](AsyncWebServerRequest *request) {},
AsyncResponseStream *response = request->beginResponseStream("application/json");
DynamicJsonDocument doc(117); // https://arduinojson.org/v6/assistant/
// todo
doc["status"] = true;
doc["image"]["format"] = "xxx";
doc["image"]["width"] = 0;
doc["image"]["height"] = 0;
serializeJson(doc, *response);
request->send(response); },
[](AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) { [](AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
if (!index) if (!index)
{ {
@ -313,6 +302,8 @@ void setupApiDevice()
ImageFlushBuffer(); ImageFlushBuffer();
updateDisplayRequired = true; updateDisplayRequired = true;
request->send(200, "application/json; charset=utf-8", "{}");
} }
}); });

View File

@ -9,9 +9,6 @@ constexpr uint16_t MAX_WIDTH = 640;
int16_t curRowDelta[MAX_WIDTH + 1]; int16_t curRowDelta[MAX_WIDTH + 1];
int16_t nextRowDelta[MAX_WIDTH + 1]; int16_t nextRowDelta[MAX_WIDTH + 1];
// TODO auf das umbauen
//uint8_t curRowDelta[640 / 8];
void setupImage() void setupImage()
{ {
setupImagePNG(); setupImagePNG();