Compare commits

...

4 Commits

Author SHA1 Message Date
Neil Dorin
a673122e00 fix: removes condition that blocked BeginPolling method call if using socket connection method 2025-08-18 13:49:04 -06:00
Neil Dorin
4854018d7b Merge pull request #1311 from PepperDash/cen-io-com-issues 2025-08-15 09:01:31 -06:00
Andrew Welker
078f35a91d fix: check EISC for null prior to using 2025-08-15 09:47:56 -05:00
Andrew Welker
dba07dced8 fix: PD Core 1.4.2 and comm factory update 2025-08-14 14:25:36 -05:00
4 changed files with 26 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
<packages>
<package id="PepperDashCore" version="1.4.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
<package id="PepperDashCore" version="1.4.2" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
</packages>

View File

@@ -37,19 +37,39 @@ namespace PepperDash.Essentials.Core
public void SendBytes(byte[] bytes)
{
if (eisc == null)
{
Debug.Console(0, this, "EISC not linked. Call LinkToApi before sending bytes.");
return;
}
eisc.Eisc.SetString(joinMap.SendText.JoinNumber, Encoding.ASCII.GetString(bytes, 0, bytes.Length));
}
public void SendText(string text)
{
if (eisc == null)
{
Debug.Console(0, this, "EISC not linked. Call LinkToApi before sending text.");
return;
}
eisc.Eisc.SetString(joinMap.SendText.JoinNumber, text);
}
public void Connect() {
if (eisc == null)
{
Debug.Console(0, this, "EISC not linked. Call LinkToApi before connecting.");
return;
}
eisc.Eisc.SetBool(joinMap.Connect.JoinNumber, true);
}
public void Disconnect() {
if (eisc == null)
{
Debug.Console(0, this, "EISC not linked. Call LinkToApi before disconnecting.");
return;
}
eisc.Eisc.SetBool(joinMap.Connect.JoinNumber, false);
}

View File

@@ -50,6 +50,9 @@ namespace PepperDash.Essentials.Core
case eControlMethod.Com:
comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig);
break;
case eControlMethod.ComBridge:
comm = new CommBridge(deviceConfig.Key + "-simpl", deviceConfig.Name + " Simpl");
break;
case eControlMethod.Cec:
comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig);
break;

View File

@@ -158,10 +158,8 @@ namespace PepperDash.Essentials.Core
Client.TextReceived += Client_TextReceived;
}
if (!IsSocket)
{
BeginPolling();
}
BeginPolling();
}
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)