Skip to content

Commit

Permalink
Merge pull request #101 from PepperDash/hotfix/queue-issues
Browse files Browse the repository at this point in the history
fix: all commands go through the queue
  • Loading branch information
cdenig authored Mar 4, 2024
2 parents 0afd600 + 3b3b851 commit 6002200
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Tesira-DSP-EPI/TesiraDsp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,8 @@ private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args
else if (args.Text.IndexOf("+OK", StringComparison.Ordinal) == 0)
{
if(InitialStart) CheckSerialSendStatus();
if (args.Text == "+OK") // Check for a simple "+OK" only 'ack' repsonse or a list response and ignore

return;
// if (args.Text == "+OK") // Check for a simple "+OK" only 'ack' repsonse or a list response and ignore
// return;

// response is not from a subscribed attribute. From a get/set/toggle/increment/decrement command
//string pattern = "(?<=\" )(.*?)(?=\\+)";
Expand Down
26 changes: 14 additions & 12 deletions Tesira-DSP-EPI/TesiraDspControlPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,20 @@ public virtual void SendFullCommand(string command, string attributeCode, string
}


if (command == "get")
{
// This command will generate a return value response so it needs to be queued
if (!string.IsNullOrEmpty(cmd))
Parent.CommandQueue.EnqueueCommand(new QueuedCommand(cmd, attributeCode, this));
}
else
{
// This command will generate a simple "+OK" response and doesn't need to be queued
if (!string.IsNullOrEmpty(cmd))
Parent.SendLine(cmd);
}
//if (command == "get")
//{
// // This command will generate a return value response so it needs to be queued
// if (!string.IsNullOrEmpty(cmd))
// Parent.CommandQueue.EnqueueCommand(new QueuedCommand(cmd, attributeCode, this));
//}
//else
//{
// // This command will generate a simple "+OK" response and doesn't need to be queued
// if (!string.IsNullOrEmpty(cmd))
// Parent.SendLine(cmd);
//}

Parent.CommandQueue.EnqueueCommand(new QueuedCommand(cmd, attributeCode, this));
}

virtual public void ParseGetMessage(string attributeCode, string message)
Expand Down
2 changes: 1 addition & 1 deletion Tesira-DSP-EPI/TesiraDspRouter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public override void ParseGetMessage(string attributeCode, string message) {

if (message.Contains("-ERR address not found"))
{
Debug.ConsoleWithLog(2, this, "Baimp Error Address not found: '{0}'\n", InstanceTag1);
Debug.ConsoleWithLog(2, this, "Biamp Error Address not found: '{0}'\n", InstanceTag1);
return;
}

Expand Down

0 comments on commit 6002200

Please sign in to comment.