In progress
This commit is contained in:
@@ -43,9 +43,9 @@ namespace TBF.Rig.Uni.Diverter
|
||||
|
||||
|
||||
public bool State { get { return (cBoard.Route & mask) != 0; } }
|
||||
public int ThresholdGate { get { return diverterCfg.StartingLevel; } }
|
||||
public int ThresholdLo { get { return diverterCfg.ThresholdLo; } }
|
||||
public int ThresholdHi { get { return diverterCfg.ThresholdHi; } }
|
||||
public int ThresholdGate { get { return diverterCfg.StartThresholdPct; } }
|
||||
public int ThresholdLo { get { return diverterCfg.ThresholdLoPct; } }
|
||||
public int ThresholdHi { get { return diverterCfg.ThresholdHiPct; } }
|
||||
|
||||
FloatBox switchTimeStart;
|
||||
FloatBox switchTimeEnd;
|
||||
|
||||
@@ -29,9 +29,9 @@ namespace TBF.Rig.Uni.Diverter
|
||||
public int AdcNr; /// 0..15(?), number of the analog input
|
||||
public int AdcValueToSink; /// 0..1023
|
||||
public int AdcValueToTank; /// 0..1023
|
||||
public int StartingLevel; /// 0..100 in %, threshold for the ADC value to start the test
|
||||
public int ThresholdLo; /// 0..100 in %, threshold for low level when diverter transition time is measured
|
||||
public int ThresholdHi; /// 0..100 in %, threshold for high level when diverter transition time is measured
|
||||
public int StartThresholdPct; /// 0..100 in %, threshold for the ADC value to start the test
|
||||
public int ThresholdLoPct; /// 0..100 in %, threshold for low level when diverter transition time is measured
|
||||
public int ThresholdHiPct; /// 0..100 in %, threshold for high level when diverter transition time is measured
|
||||
public int DfltSwithTimeStartMs; /// Default diverter transition time 'start' or 'to tank' in ms
|
||||
public int DfltSwithTimeEndMs; /// Default diverter transition time 'end' or 'to sink' in ms
|
||||
|
||||
@@ -77,9 +77,9 @@ namespace TBF.Rig.Uni.Diverter
|
||||
AdcNr = 5; /// Div1: AdcNr=5 , Div2: AdcNr=6
|
||||
AdcValueToSink = 100;
|
||||
AdcValueToTank = 500;
|
||||
StartingLevel = 50;
|
||||
ThresholdLo = 10;
|
||||
ThresholdHi = 90;
|
||||
StartThresholdPct = 50;
|
||||
ThresholdLoPct = 10;
|
||||
ThresholdHiPct = 90;
|
||||
DfltSwithTimeStartMs = 1;
|
||||
DfltSwithTimeEndMs = 1;
|
||||
CalibCertificateNr = string.Empty;
|
||||
@@ -97,9 +97,9 @@ namespace TBF.Rig.Uni.Diverter
|
||||
AdcNr,
|
||||
AdcValueToSink,
|
||||
AdcValueToTank,
|
||||
StartingLevel,
|
||||
ThresholdLo,
|
||||
ThresholdHi);
|
||||
StartThresholdPct,
|
||||
ThresholdLoPct,
|
||||
ThresholdHiPct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ namespace TBF.Rig.Uni.Diverter
|
||||
adcNrTextBox.Text = config.AdcNr.ToString();
|
||||
adcToSinkTextBox.Text = config.AdcValueToSink.ToString();
|
||||
adcToTankTextBox.Text = config.AdcValueToTank.ToString();
|
||||
startingEdgeTextBox.Text = config.StartingLevel.ToString();
|
||||
thresholdLoTextBox.Text = config.ThresholdLo.ToString();
|
||||
thresholdHiTextBox.Text = config.ThresholdHi.ToString();
|
||||
startingEdgeTextBox.Text = config.StartThresholdPct.ToString();
|
||||
thresholdLoTextBox.Text = config.ThresholdLoPct.ToString();
|
||||
thresholdHiTextBox.Text = config.ThresholdHiPct.ToString();
|
||||
dfltSwitchTimeStartTextBox.Text = config.DfltSwithTimeStartMs.ToString();
|
||||
dfltSwitchTimeEndTextBox.Text = config.DfltSwithTimeEndMs.ToString();
|
||||
|
||||
@@ -240,23 +240,23 @@ namespace TBF.Rig.Uni.Diverter
|
||||
}
|
||||
|
||||
tmp = int.Parse(startingEdgeTextBox.Text);
|
||||
if (config.StartingLevel != tmp)
|
||||
if (config.StartThresholdPct != tmp)
|
||||
{
|
||||
config.StartingLevel = tmp;
|
||||
config.StartThresholdPct = tmp;
|
||||
flags |= CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
tmp = int.Parse(thresholdLoTextBox.Text);
|
||||
if (config.ThresholdLo != tmp)
|
||||
if (config.ThresholdLoPct != tmp)
|
||||
{
|
||||
config.ThresholdLo = tmp;
|
||||
config.ThresholdLoPct = tmp;
|
||||
flags |= CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
tmp = int.Parse(thresholdHiTextBox.Text);
|
||||
if (config.ThresholdHi != tmp)
|
||||
if (config.ThresholdHiPct != tmp)
|
||||
{
|
||||
config.ThresholdHi = tmp;
|
||||
config.ThresholdHiPct = tmp;
|
||||
flags |= CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user