led_map interface, allow getting command results in old post command api

This commit is contained in:
openshwprojects
2023-03-17 15:24:07 +01:00
parent 69621200e0
commit 1e508c064d
2 changed files with 38 additions and 3 deletions

View File

@ -879,7 +879,17 @@ int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, js
printer(request, "\"SSID1\":\"%s\"", CFG_GetWiFiSSID());
printer(request, "}");
}
else if (!wal_strnicmp(cmd, "LED_Map", 7)) {
printer(request, "{");
printer(request, "\"Map\":[%i,%i,%i,%i,%i]",
(int)g_cfg.ledRemap.r, (int)g_cfg.ledRemap.g, (int)g_cfg.ledRemap.b, (int)g_cfg.ledRemap.c, (int)g_cfg.ledRemap.w);
printer(request, "}");
}
else {
printer(request, "{");
printer(request, "}");
}
return 0;
}