Skip to content

Commit

Permalink
Merge pull request #22 from PepperDash/hotfix/joinmap-fix
Browse files Browse the repository at this point in the history
Hotfix/joinmap fix
  • Loading branch information
andrew-welker authored Nov 7, 2024
2 parents 8e67cbb + 8121156 commit e04072d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
16 changes: 7 additions & 9 deletions Pdu-Wattbox-Epi/WattboxController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,16 +323,14 @@ public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, E

NameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);

if ((int)joinMap.OutletName.JoinNumber - (int)joinStart > 0)

var index = 0;
foreach (var o in PduOutlets.Select(outlet => outlet.Value).OfType<WattboxOutlet>())
{
var index = 0;
foreach (var o in PduOutlets.Select(outlet => outlet.Value).OfType<WattboxOutlet>())
{
var i = index;
o.LinkOutlet(trilist, joinMap, i);
index++;
}
}
var i = index;
o.LinkOutlet(trilist, joinMap, i);
index += 4;
}

trilist.OnlineStatusChange += (d, args) =>
{
Expand Down
3 changes: 1 addition & 2 deletions Pdu-Wattbox-Lib/WattboxHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,13 @@ public void SubmitRequest(string url, string dir, RequestType requestType)

if(string.IsNullOrEmpty(response.ContentString))
{
IsOnlineWattbox = false;
Debug.Console(1, this, "Response ContentString is null or empty");
return;
}

if (response.Header.ContentType.Contains("text/xml"))
{
//Debug.Console(2, this, "Parsing");
IsOnlineWattbox = true;
ParseResponse(response.ContentString);
return;
}
Expand Down

0 comments on commit e04072d

Please sign in to comment.