mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 01:35:02 +00:00
Trying to force config values to load in lieu of proper signalling from Simpl code
This commit is contained in:
@@ -156,8 +156,13 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
SetupFunctions();
|
||||
SetupFeedbacks();
|
||||
EISC.SigChange += EISC_SigChange;
|
||||
EISC.OnlineStatusChange += (o, a) =>
|
||||
{
|
||||
if (a.DeviceOnLine)
|
||||
LoadConfigValues();
|
||||
};
|
||||
// load config if it's already there
|
||||
if (EISC.IsOnline || EISC.BooleanInput[BoolJoin.ConfigIsReady].BoolValue)
|
||||
if (EISC.IsOnline) // || EISC.BooleanInput[BoolJoin.ConfigIsReady].BoolValue)
|
||||
LoadConfigValues();
|
||||
return base.CustomActivate();
|
||||
}
|
||||
@@ -244,9 +249,6 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
|
||||
// Config things
|
||||
EISC.SetSigTrueAction(BoolJoin.ConfigIsReady, LoadConfigValues);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -254,6 +256,8 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
/// </summary>
|
||||
void LoadConfigValues()
|
||||
{
|
||||
|
||||
Debug.Console(1, this, "Loading configuration from DDVC01 EISC bridge");
|
||||
ConfigIsLoaded = false;
|
||||
|
||||
var co = ConfigReader.ConfigObject;
|
||||
@@ -335,7 +339,6 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
|
||||
Debug.Console(0, this, "******* CONFIG FROM DDVC: \r", JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented));
|
||||
|
||||
|
||||
ConfigIsLoaded = true;
|
||||
|
||||
// send config changed status???
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user