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