Skip to content

Commit

Permalink
fix multi-module relays
Browse files Browse the repository at this point in the history
  • Loading branch information
SK21 committed Feb 29, 2024
1 parent 465c5cb commit 2ea8adb
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions RateAppSource/RateController/Classes/clsRelays.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public int SetRelays(int ModuleID)
}

// build return int
if (Rly.IsON) Result |= (int)Math.Pow(2, i);
if (Rly.IsON) Result |= (int)Math.Pow(2, Rly.ID);
}
}
}
Expand All @@ -284,7 +284,8 @@ private void BuildPowerRelays()
cPowerRelays[i] = 0;
for (int j = 0; j < cRelays.Count; j++)
{
if (cRelays[j].Type == RelayTypes.Power && cRelays[j].ModuleID == i) cPowerRelays[i] |= (int)Math.Pow(2, j);
clsRelay Rly = cRelays[j];
if (Rly.Type == RelayTypes.Power && Rly.ModuleID == i) cPowerRelays[i] |= (int)Math.Pow(2, Rly.ID);
}
}
}
Expand All @@ -296,7 +297,8 @@ private void BuildInvertedRelays()
cInvertedRelays[i] = 0;
for (int j = 0; j < cRelays.Count; j++)
{
if (cRelays[j].Type == RelayTypes.Invert_Section && cRelays[j].ModuleID == i) cInvertedRelays[i] |= (int)Math.Pow(2, j);
clsRelay Rly = cRelays[j];
if (Rly.Type == RelayTypes.Invert_Section && Rly.ModuleID == i) cInvertedRelays[i] |= (int)Math.Pow(2, Rly.ID);
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified RateAppSource/RateController/obj/Debug/RateController.exe
Binary file not shown.
Binary file modified RateAppSource/RateController/obj/Debug/RateController.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified RateControllerApp/RateController.exe
Binary file not shown.
Binary file modified RateControllerApp/de/RateController.resources.dll
Binary file not shown.
Binary file modified RateControllerApp/fr/RateController.resources.dll
Binary file not shown.
Binary file modified RateControllerApp/hu/RateController.resources.dll
Binary file not shown.
Binary file modified RateControllerApp/nl/RateController.resources.dll
Binary file not shown.
Binary file modified RateControllerApp/pl/RateController.resources.dll
Binary file not shown.
Binary file modified RateControllerApp/ru/RateController.resources.dll
Binary file not shown.

0 comments on commit 2ea8adb

Please sign in to comment.