mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-11 21:47:16 +02:00
Make change in serial.htm and webApi.cpp
This commit is contained in:
parent
7c7a7d25b8
commit
c3d81d36c6
3 changed files with 33 additions and 39 deletions
|
@ -336,8 +336,9 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
|
||||
// Todo: num is the inverter number 0-3. For better display in DPRINTLN
|
||||
uint8_t num = jsonIn[F("inverter")];
|
||||
uint8_t tx_request = jsonIn[F("tx_request")];
|
||||
|
||||
if(TX_REQ_DEVCONTROL == jsonIn[F("tx_request")])
|
||||
if(TX_REQ_DEVCONTROL == tx_request)
|
||||
{
|
||||
DPRINTLN(DBG_INFO, F("devcontrol [") + String(num) + F("], cmd: 0x") + String(cmd, HEX));
|
||||
|
||||
|
@ -365,6 +366,8 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
iv->devControlRequest = true;
|
||||
break;
|
||||
case ActivePowerContr:
|
||||
iv->devControlCmd = ActivePowerContr;
|
||||
iv->devControlRequest = true;
|
||||
iv->powerLimit[0] = payload[0];
|
||||
iv->powerLimit[1] = payload[1];
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue