TestMethods.PMaxTest bug fix : when pump reached 100% PMaxTest started regardless of the pressure.
This commit is contained in:
@@ -20,12 +20,14 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
public float PressureLo; /// Presure range low limit in [bar]
|
||||
public float PressureHi; /// Presure range high limit in [bar]
|
||||
public int DurationPMax; /// Duration of the test in [s]
|
||||
public int PressSetTimeout; /// Pressure setting timeout [s]
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
PressureLo = 5.0f; /// [bar]
|
||||
PressureHi = 6.0f; /// [bar]
|
||||
DurationPMax = 60;
|
||||
DurationPMax = 60; /// [s]
|
||||
PressSetTimeout = 300; /// [s]
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +35,8 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
{
|
||||
Strings.Pressure_lo_bar,
|
||||
Strings.Pressure_hi_bar,
|
||||
Strings.Duration_s,
|
||||
string.Format("PMaxTest {0}", Strings.Duration_s),
|
||||
"Pressure setting timeout, 0=off [s]",
|
||||
};
|
||||
public override string ParamName(int i) { return paramNames[i]; }
|
||||
public override int ParamsCount() { return paramNames.Length; }
|
||||
@@ -45,7 +48,8 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
case 0: return PressureLo.ToString(); /// [bar]
|
||||
case 1: return PressureHi.ToString(); /// [bar]
|
||||
case 2: return DurationPMax.ToString();
|
||||
default: return string.Empty;
|
||||
case 3: return PressSetTimeout.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +60,7 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
case 0: PressureLo = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 1: PressureHi = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 2: DurationPMax = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 3: PressSetTimeout = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@@ -73,9 +78,12 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
if (Utils.TryParseUFloat(strValue, out dummy)) return true;
|
||||
break;
|
||||
case 2:
|
||||
if (int.TryParse(strValue, out iDummy)) return true;
|
||||
if (int.TryParse(strValue, out iDummy) && iDummy >= 1 && iDummy <= 300) return true;
|
||||
break;
|
||||
default:
|
||||
case 3:
|
||||
if (int.TryParse(strValue, out iDummy) && iDummy >= 0 && iDummy <= 900) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +97,8 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
prms.PressureLo = this.PressureLo;
|
||||
prms.PressureHi = this.PressureHi;
|
||||
prms.DurationPMax = this.DurationPMax;
|
||||
}
|
||||
prms.PressSetTimeout = this.PressSetTimeout;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user