Browse Source

Add files via upload

Anpassung an geaenderten Rueckgabewert fuer sml_find_hist_power().
pull/1080/head
oberfritze 2 years ago
committed by GitHub
parent
commit
ee6f9024e8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/web/RestApi.h

4
src/web/RestApi.h

@ -296,7 +296,7 @@ class RestApi {
#ifdef AHOY_SML_OBIS_SUPPORT #ifdef AHOY_SML_OBIS_SUPPORT
if (mConfig->sml_obis.ir_connected) { if (mConfig->sml_obis.ir_connected) {
if ((sml_power = sml_find_hist_power(sml_hist, cur_interval)) == -1) { if ((sml_power = sml_find_hist_power(sml_hist, cur_interval)) == INT32_MIN) {
snprintf (&content[index], length - index, "\n%u:%02u,%u,", snprintf (&content[index], length - index, "\n%u:%02u,%u,",
minutes / 60, minutes % 60, ac_power); minutes / 60, minutes % 60, ac_power);
} else { } else {
@ -319,7 +319,7 @@ class RestApi {
#ifdef AHOY_SML_OBIS_SUPPORT #ifdef AHOY_SML_OBIS_SUPPORT
if (mConfig->sml_obis.ir_connected) { if (mConfig->sml_obis.ir_connected) {
if ((sml_power = sml_find_hist_power(sml_hist, cur_interval)) == -1) { if ((sml_power = sml_find_hist_power(sml_hist, cur_interval)) == INT32_MIN) {
snprintf (&content[index], length - index, "\n%u:%02u,%u,", snprintf (&content[index], length - index, "\n%u:%02u,%u,",
minutes / 60, minutes % 60, ac_power); minutes / 60, minutes % 60, ac_power);
} else { } else {

Loading…
Cancel
Save