This commit is contained in:
norbert-walter 2025-01-04 22:24:33 +01:00
parent b91f345d25
commit b142470c1d
2 changed files with 3 additions and 0 deletions

View File

@ -472,6 +472,7 @@ void generatorGraphic(uint x, uint y, int pcolor, int bcolor){
}
// Function to handle HTTP image request
// http://192.168.15.1/api/user/OBP60Task/screenshot
void doImageRequest(GwApi *api, int *pageno, const PageStruct pages[MAX_PAGE_NUMBER], AsyncWebServerRequest *request) {
GwLog *logger = api->getLogger();

View File

@ -394,6 +394,8 @@ void OBP60Task(GwApi *api){
}
}
// Display screenshot handler for HTTP request
// http://192.168.15.1/api/user/OBP60Task/screenshot
api->registerRequestHandler("screenshot", [api, &pageNumber, pages](AsyncWebServerRequest *request) {
doImageRequest(api, &pageNumber, pages, request);
});