mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-14 00:21:44 +02:00
Bugfix: Negativer SetPoint
This commit is contained in:
parent
5c53156d9e
commit
c1792b0f18
3 changed files with 4 additions and 4 deletions
|
@ -287,7 +287,7 @@ typedef struct {
|
||||||
float battVoltageOn;
|
float battVoltageOn;
|
||||||
float battVoltageOff;
|
float battVoltageOff;
|
||||||
// Advanced
|
// Advanced
|
||||||
uint16_t setPoint;
|
int16_t setPoint;
|
||||||
uint8_t refresh;
|
uint8_t refresh;
|
||||||
uint8_t powerTolerance;
|
uint8_t powerTolerance;
|
||||||
uint16_t powerMax;
|
uint16_t powerMax;
|
||||||
|
@ -1062,7 +1062,7 @@ class settings {
|
||||||
getVal<float>(obj, F("battVoltageOff"), &mCfg.plugin.zeroExport.groups[group].battVoltageOff);
|
getVal<float>(obj, F("battVoltageOff"), &mCfg.plugin.zeroExport.groups[group].battVoltageOff);
|
||||||
// Advanced
|
// Advanced
|
||||||
if (obj.containsKey(F("setPoint")))
|
if (obj.containsKey(F("setPoint")))
|
||||||
getVal<uint16_t>(obj, F("setPoint"), &mCfg.plugin.zeroExport.groups[group].setPoint);
|
getVal<int16_t>(obj, F("setPoint"), &mCfg.plugin.zeroExport.groups[group].setPoint);
|
||||||
if (obj.containsKey(F("refresh")))
|
if (obj.containsKey(F("refresh")))
|
||||||
getVal<uint8_t>(obj, F("refresh"), &mCfg.plugin.zeroExport.groups[group].refresh);
|
getVal<uint8_t>(obj, F("refresh"), &mCfg.plugin.zeroExport.groups[group].refresh);
|
||||||
if (obj.containsKey(F("powerTolerance")))
|
if (obj.containsKey(F("powerTolerance")))
|
||||||
|
|
|
@ -845,7 +845,7 @@ class RestApi {
|
||||||
objGroup[F("battVoltageOn")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOn);
|
objGroup[F("battVoltageOn")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOn);
|
||||||
objGroup[F("battVoltageOff")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOff);
|
objGroup[F("battVoltageOff")] = ah::round1((float)mConfig->plugin.zeroExport.groups[group].battVoltageOff);
|
||||||
// Advanced
|
// 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("refresh")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].refresh;
|
||||||
objGroup[F("powerTolerance")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].powerTolerance;
|
objGroup[F("powerTolerance")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].powerTolerance;
|
||||||
objGroup[F("powerMax")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].powerMax;
|
objGroup[F("powerMax")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].powerMax;
|
||||||
|
|
|
@ -1414,7 +1414,7 @@
|
||||||
]),
|
]),
|
||||||
// Advanced
|
// Advanced
|
||||||
ml("div", {id: "div{#ZE_GROUP_TAB_ADVANCED}", class: "tab-content hide"}, [
|
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_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_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)),
|
divRow("{#ZE_GROUP_TAB_ADVANCED_POWERMAX}", ml("input", {name: "powerMax", class: "text", type: "number", min: "0", max: "65535", value: obj.powerMax}, null)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue