aqhome-react, aqhome: added units/functions for handling local variables.
This commit is contained in:
@@ -103,6 +103,8 @@ int AqHomeReact_Init(AQHOME_REACT *aqh, int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
aqh->localVars=AQH_Vars_CreateGroup("localVars");
|
||||
|
||||
rv=AqHomeReact_ReloadUnitNets(aqh);
|
||||
if (rv<0) {
|
||||
DBG_ERROR(NULL, "Error reading unit network files (%d)", rv);
|
||||
@@ -126,7 +128,7 @@ int AqHomeReact_ReloadUnitNets(AQHOME_REACT *aqh)
|
||||
|
||||
AQHREACT_Unit_List_Clear(aqh->unitList);
|
||||
aqh->timerUnit=NULL;
|
||||
aqh->varChangeUnit=NULL;
|
||||
aqh->serverVarChangeUnit=NULL;
|
||||
|
||||
_setupBuiltinUnits(aqh);
|
||||
|
||||
@@ -238,7 +240,12 @@ void _setupBuiltinUnits(AQHOME_REACT *aqh)
|
||||
unit=AqHomeReact_UnitVarChanges_new(aqh);
|
||||
AQHREACT_Unit_SetId(unit, ".updatedValue");
|
||||
AQHREACT_Unit_List_Add(unit, aqh->unitList);
|
||||
aqh->varChangeUnit=unit;
|
||||
aqh->serverVarChangeUnit=unit;
|
||||
|
||||
unit=AqHomeReact_UnitVarChanges_new(aqh);
|
||||
AQHREACT_Unit_SetId(unit, ".updatedVar");
|
||||
AQHREACT_Unit_List_Add(unit, aqh->unitList);
|
||||
aqh->localVarChangeUnit=unit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user