diff --git a/src/config/settings.h b/src/config/settings.h index f15e81fa..6663ce3f 100644 --- a/src/config/settings.h +++ b/src/config/settings.h @@ -287,7 +287,7 @@ typedef struct { float battVoltageOn; float battVoltageOff; // Advanced - uint16_t setPoint; + int16_t setPoint; uint8_t refresh; uint8_t powerTolerance; uint16_t powerMax; @@ -1062,7 +1062,7 @@ class settings { getVal(obj, F("battVoltageOff"), &mCfg.plugin.zeroExport.groups[group].battVoltageOff); // Advanced if (obj.containsKey(F("setPoint"))) - getVal(obj, F("setPoint"), &mCfg.plugin.zeroExport.groups[group].setPoint); + getVal(obj, F("setPoint"), &mCfg.plugin.zeroExport.groups[group].setPoint); if (obj.containsKey(F("refresh"))) getVal(obj, F("refresh"), &mCfg.plugin.zeroExport.groups[group].refresh); if (obj.containsKey(F("powerTolerance"))) diff --git a/src/web/RestApi.h b/src/web/RestApi.h index 17552b9a..5eeb785e 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -845,7 +845,7 @@ class RestApi { objGroup[F("battVoltageOn")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOn); objGroup[F("battVoltageOff")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOff); // Advanced - objGroup[F("setPoint")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].setPoint; + objGroup[F("setPoint")] = (int16_t)mConfig->plugin.zeroExport.groups[group].setPoint; objGroup[F("refresh")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].refresh; objGroup[F("powerTolerance")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].powerTolerance; objGroup[F("powerMax")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].powerMax; diff --git a/src/web/html/setup.html b/src/web/html/setup.html index bae845ea..062d20cb 100644 --- a/src/web/html/setup.html +++ b/src/web/html/setup.html @@ -1414,7 +1414,7 @@ ]), // Advanced ml("div", {id: "div{#ZE_GROUP_TAB_ADVANCED}", class: "tab-content hide"}, [ - divRow("{#ZE_GROUP_TAB_ADVANCED_SETPOINT}", ml("input", {name: "setPoint", class: "text", type: "number", min: "0", max: "65535", value: obj.setPoint}, null)), + divRow("{#ZE_GROUP_TAB_ADVANCED_SETPOINT}", ml("input", {name: "setPoint", class: "text", type: "number", min: "-32768", max: "32767", step: "1", value: obj.setPoint}, null)), divRow("{#ZE_GROUP_TAB_ADVANCED_REFRESH}", ml("input", {name: "refresh", class: "text", type: "number", min: "0", max: "255", value: obj.refresh}, null)), divRow("{#ZE_GROUP_TAB_ADVANCED_POWERTOLERANCE}", ml("input", {name: "powerTolerance", class: "text", type: "number", min: "0", max: "255", value: obj.powerTolerance}, null)), divRow("{#ZE_GROUP_TAB_ADVANCED_POWERMAX}", ml("input", {name: "powerMax", class: "text", type: "number", min: "0", max: "65535", value: obj.powerMax}, null)),