(1) DIverter threshold used, (2) UniCB state display can be enabled / disabled, ver. 3.1.1598

This commit is contained in:
Milan Hanajik
2021-03-19 16:22:50 +01:00
parent 595f0c514e
commit 141b9a7b4c
11 changed files with 80 additions and 55 deletions
+8
View File
@@ -31,6 +31,7 @@ namespace TBF.Rig.ControlBoard.Uni
public bool RelaysFInstalled;
public bool RelaysGInstalled;
public bool RelaysHInstalled;
public bool ShowState;
/// Schematic drawing info
public Shape Shape { get; set; }
@@ -88,6 +89,7 @@ namespace TBF.Rig.ControlBoard.Uni
RelaysFInstalled = true;
RelaysGInstalled = true;
RelaysHInstalled = true;
ShowState = false;
}
string[] paramNames = new string[]
@@ -99,6 +101,7 @@ namespace TBF.Rig.ControlBoard.Uni
"Relays F are installed",
"Relays G are installed",
"Relays H are installed",
"Show state",
};
public string ParamName(int i) { return paramNames[i]; }
public int ParamsCount() { return paramNames.Length; }
@@ -116,6 +119,7 @@ namespace TBF.Rig.ControlBoard.Uni
case 4:
case 5:
case 6:
case 7:
return new string[] { Strings.yes, Strings.no };
default:
return null;
@@ -139,6 +143,7 @@ namespace TBF.Rig.ControlBoard.Uni
case 4: return RelaysFInstalled ? Strings.yes : Strings.no;
case 5: return RelaysGInstalled ? Strings.yes : Strings.no;
case 6: return RelaysHInstalled ? Strings.yes : Strings.no;
case 7: return ShowState ? Strings.yes : Strings.no;
default: return string.Empty;
}
}
@@ -154,6 +159,7 @@ namespace TBF.Rig.ControlBoard.Uni
case 4: RelaysFInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
case 5: RelaysGInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
case 6: RelaysHInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
case 7: ShowState = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
default: return CfgUpdateFlags.None;
}
}
@@ -180,6 +186,7 @@ namespace TBF.Rig.ControlBoard.Uni
case 4:
case 5:
case 6:
case 7:
if (ParamValues(i).Contains(str)) return true;
break;
default:
@@ -200,6 +207,7 @@ namespace TBF.Rig.ControlBoard.Uni
prms.RelaysFInstalled = RelaysFInstalled;
prms.RelaysGInstalled = RelaysGInstalled;
prms.RelaysHInstalled = RelaysHInstalled;
prms.ShowState = ShowState;
}
public Config.Entities.IParamsProvider Clone()