aqhome-react: added statistics modules (average, min, max)

This commit is contained in:
Martin Preuss
2024-05-15 22:50:20 +02:00
parent b888524cc3
commit 1d51ef0259
4 changed files with 315 additions and 1 deletions

View File

@@ -22,7 +22,8 @@
#include "aqhome-react/units/u_zeroposnegstring.h"
#include "aqhome-react/units/u_suntime.h"
#include "aqhome-react/units/u_varchanges.h"
#include "aqhome-react/units/u_timeprogram.h"
#include "aqhome-react/units/u_statfns.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
@@ -302,6 +303,14 @@ AQHREACT_UNIT *AqHomeReact_CreateUnitByName(AQHOME_REACT *aqh, const char *unitT
return AqHomeReact_UnitZeroPosNegString_new(aqh);
else if (strcasecmp(unitType, "suntime")==0)
return AqHomeReact_UnitSuntime_new(aqh);
else if (strcasecmp(unitType, "timeraction")==0)
return AqHomeReact_UnitTimeProgram_new(aqh);
else if (strcasecmp(unitType, "average")==0)
return AqHomeReact_UnitAverage_new(aqh);
else if (strcasecmp(unitType, "minvalue")==0)
return AqHomeReact_UnitMinValue_new(aqh);
else if (strcasecmp(unitType, "maxvalue")==0)
return AqHomeReact_UnitMaxValue_new(aqh);
else {
AQHREACT_UNIT *unit;