mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-20 20:36:11 +02:00
Fix switch-case default error
This commit is contained in:
parent
868012931f
commit
509549e5a4
1 changed files with 2 additions and 1 deletions
|
@ -345,6 +345,8 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
DPRINTLN(DBG_INFO, F("devcontrol [") + String(num) + F("], cmd: 0x") + String(cmd, HEX));
|
||||
|
||||
Inverter<> *iv = getInverter(jsonIn, jsonOut);
|
||||
JsonArray payload = jsonIn[F("payload")].as<JsonArray>();
|
||||
|
||||
if(NULL != iv)
|
||||
{
|
||||
switch (cmd)
|
||||
|
@ -366,7 +368,6 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
iv->devControlRequest = true;
|
||||
break;
|
||||
case ActivePowerContr:
|
||||
JsonArray payload = jsonIn[F("payload")].as<JsonArray>();
|
||||
iv->powerLimit[0] = payload[0];
|
||||
iv->powerLimit[1] = payload[1];
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue