handle stats values in nodes server. added missing code.
This commit is contained in:
@@ -261,6 +261,12 @@ int AQH_ValueModality_fromString(const char *s)
|
||||
return AQH_ValueModality_RGBW;
|
||||
else if (strcasecmp(s, "motion")==0)
|
||||
return AQH_ValueModality_Motion;
|
||||
else if (strcasecmp(s, "co2")==0)
|
||||
return AQH_ValueModality_Co2;
|
||||
else if (strcasecmp(s, "tvoc")==0)
|
||||
return AQH_ValueModality_TVOC;
|
||||
else if (strcasecmp(s, "stats")==0)
|
||||
return AQH_ValueModality_Stats;
|
||||
}
|
||||
return AQH_ValueModality_Unknown;
|
||||
}
|
||||
@@ -276,6 +282,9 @@ const char *AQH_ValueModality_toString(int i)
|
||||
case AQH_ValueModality_RGB: return "rgb";
|
||||
case AQH_ValueModality_RGBW: return "rgbw";
|
||||
case AQH_ValueModality_Motion: return "motion";
|
||||
case AQH_ValueModality_Co2: return "co2";
|
||||
case AQH_ValueModality_TVOC: return "tvoc";
|
||||
case AQH_ValueModality_Stats: return "stats";
|
||||
case AQH_ValueModality_Unknown:
|
||||
default: return "unknown";
|
||||
}
|
||||
|
||||
@@ -42,7 +42,10 @@ enum {
|
||||
AQH_ValueModality_Door,
|
||||
AQH_ValueModality_RGB,
|
||||
AQH_ValueModality_RGBW,
|
||||
AQH_ValueModality_Motion
|
||||
AQH_ValueModality_Motion,
|
||||
AQH_ValueModality_Co2,
|
||||
AQH_ValueModality_TVOC,
|
||||
AQH_ValueModality_Stats
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user