mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-02 22:33:41 +00:00
Fixed -127 value on last hour of day when we enter CEST
This commit is contained in:
@@ -61,7 +61,7 @@ float EntsoeApi::getValueForHour(time_t cur, int8_t hour) {
|
|||||||
if(tomorrow == NULL)
|
if(tomorrow == NULL)
|
||||||
return ENTSOE_NO_VALUE;
|
return ENTSOE_NO_VALUE;
|
||||||
value = tomorrow->getPoint(pos-24);
|
value = tomorrow->getPoint(pos-24);
|
||||||
if(strcmp(tomorrow->getMeasurementUnit(), "MWH") == 0) {
|
if(value != ENTSOE_NO_VALUE && strcmp(tomorrow->getMeasurementUnit(), "MWH") == 0) {
|
||||||
multiplier *= 0.001;
|
multiplier *= 0.001;
|
||||||
} else {
|
} else {
|
||||||
return ENTSOE_NO_VALUE;
|
return ENTSOE_NO_VALUE;
|
||||||
@@ -73,7 +73,7 @@ float EntsoeApi::getValueForHour(time_t cur, int8_t hour) {
|
|||||||
if(today == NULL)
|
if(today == NULL)
|
||||||
return ENTSOE_NO_VALUE;
|
return ENTSOE_NO_VALUE;
|
||||||
value = today->getPoint(pos);
|
value = today->getPoint(pos);
|
||||||
if(strcmp(today->getMeasurementUnit(), "MWH") == 0) {
|
if(value != ENTSOE_NO_VALUE && strcmp(today->getMeasurementUnit(), "MWH") == 0) {
|
||||||
multiplier *= 0.001;
|
multiplier *= 0.001;
|
||||||
} else {
|
} else {
|
||||||
return ENTSOE_NO_VALUE;
|
return ENTSOE_NO_VALUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user