ControlBoard.Uni initialzation fixed : diverters count taken into account, ver. 3.1.1641

This commit is contained in:
Milan Hanajik
2021-05-04 10:32:26 +02:00
parent c5769bed0c
commit fc95847377
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.1.1640.0")]
[assembly: AssemblyFileVersion("3.1.1640.0")]
[assembly: AssemblyVersion("3.1.1641.0")]
[assembly: AssemblyFileVersion("3.1.1641.0")]
+3 -2
View File
@@ -195,8 +195,9 @@ namespace TBF.Rig.ControlBoard.Uni
scopeAnalyzerData = null;
switchCounterData = null;
routeMask = 0xFF00FFFFFF;
for (int i = 0; i < cbCfg.RegValvesCount; i++) routeMask &= ~((UInt128)3 << 2 * i);
routeMask = 0xFF1EFFFF00;
for (int i = 4; i < cbCfg.RegValvesCount; i++) routeMask &= ~((UInt128)3 << 2 * i);
for (int i = 1; i < cbCfg.DivertersCount; i++) routeMask &= ~((UInt128)1 << 24 + i);
if (cbCfg.RelaysFInstalled) routeMask |= 0xFF0000000000;
if (cbCfg.RelaysGInstalled) routeMask |= 0xFF000000000000;
if (cbCfg.RelaysHInstalled) routeMask |= 0xFF00000000000000;