From 74e7028ced3166b5d5c9666efc7356276a6ab0d6 Mon Sep 17 00:00:00 2001 From: Thomas Ballmann Date: Sat, 5 Dec 2020 16:34:39 +0100 Subject: [PATCH] remove legacy code --- lib/app/app.cpp | 15 +++------------ lib/image/image.cpp | 3 --- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/app/app.cpp b/lib/app/app.cpp index 73e3dd0..3465e44 100644 --- a/lib/app/app.cpp +++ b/lib/app/app.cpp @@ -283,18 +283,7 @@ void setupApiDevice() }); server.on( - "/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); }, + "/api/device/screen", HTTP_POST, [](AsyncWebServerRequest *request) {}, [](AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) { if (!index) { @@ -313,6 +302,8 @@ void setupApiDevice() ImageFlushBuffer(); updateDisplayRequired = true; + + request->send(200, "application/json; charset=utf-8", "{}"); } }); diff --git a/lib/image/image.cpp b/lib/image/image.cpp index 9cbb5ae..b077ec4 100644 --- a/lib/image/image.cpp +++ b/lib/image/image.cpp @@ -9,9 +9,6 @@ constexpr uint16_t MAX_WIDTH = 640; int16_t curRowDelta[MAX_WIDTH + 1]; int16_t nextRowDelta[MAX_WIDTH + 1]; -// TODO auf das umbauen -//uint8_t curRowDelta[640 / 8]; - void setupImage() { setupImagePNG();