mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 20:21:38 +02:00
0.8.92
* fix read back of limit value, now with one decimal place
This commit is contained in:
parent
7b030a39d5
commit
3dd1b4e73b
7 changed files with 12 additions and 4 deletions
|
@ -499,7 +499,7 @@ class RestApi {
|
|||
obj[F("name")] = String(iv->config->name);
|
||||
obj[F("serial")] = String(iv->config->serial.u64, HEX);
|
||||
obj[F("version")] = String(iv->getFwVersion());
|
||||
obj[F("power_limit_read")] = iv->actPowerLimit;
|
||||
obj[F("power_limit_read")] = ah::round1(iv->getChannelFieldValue(CH0, FLD_ACT_ACTIVE_PWR_LIMIT, iv->getRecordStruct(SystemConfigPara)));
|
||||
obj[F("power_limit_ack")] = iv->powerLimitAck;
|
||||
obj[F("max_pwr")] = iv->getMaxPower();
|
||||
obj[F("ts_last_success")] = rec->ts;
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
if(65535 != obj.power_limit_read) {
|
||||
pwrLimit = obj.power_limit_read + " %";
|
||||
if(0 != obj.max_pwr)
|
||||
pwrLimit += ", " + Math.round(obj.max_pwr * obj.power_limit_read / 100) + " W";
|
||||
pwrLimit += ", " + (obj.max_pwr * obj.power_limit_read / 100) + " W";
|
||||
}
|
||||
|
||||
var maxAcPwr = toIsoDateStr(new Date(obj.ts_max_ac_pwr * 1000));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue