Scale capacity, etc. : float --> double
This commit is contained in:
@@ -9,12 +9,12 @@ namespace TBF.Rig.GenericDevices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Max. mass of water in 'kg' or volume in 'l'
|
/// Max. mass of water in 'kg' or volume in 'l'
|
||||||
/// </summary>
|
/// </summary>
|
||||||
float Capacity { get; }
|
double Capacity { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 'Empty' water mass in 'kg' or volume in 'l'
|
/// 'Empty' water mass in 'kg' or volume in 'l'
|
||||||
/// </summary>
|
/// </summary>
|
||||||
float Empty { get; }
|
double Empty { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Time in [s] to drain the tank completely
|
/// Time in [s] to drain the tank completely
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ namespace TBF.Rig.MettlerToledo.Standard
|
|||||||
public StopBits StopBits;
|
public StopBits StopBits;
|
||||||
public Handshake Handshake;
|
public Handshake Handshake;
|
||||||
|
|
||||||
public float Capacity { get; set; } /// Max. water mass in 'kg' or volume in 'l'
|
public double Capacity { get; set; } /// Max. water mass in 'kg' or volume in 'l'
|
||||||
public float Empty { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
public double Empty { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
||||||
public float EmptyUp { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l') when the drain valve is not open
|
public double EmptyUp { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l') when the drain valve is not open
|
||||||
public string Evaporation { get; set; }
|
public string Evaporation { get; set; }
|
||||||
public string DrainValve { get; set; }
|
public string DrainValve { get; set; }
|
||||||
public int DrainTimeSec { get; set; }
|
public int DrainTimeSec { get; set; }
|
||||||
@@ -104,9 +104,9 @@ namespace TBF.Rig.MettlerToledo.Standard
|
|||||||
DataBits = 7;
|
DataBits = 7;
|
||||||
StopBits = System.IO.Ports.StopBits.One;
|
StopBits = System.IO.Ports.StopBits.One;
|
||||||
Handshake = System.IO.Ports.Handshake.XOnXOff;
|
Handshake = System.IO.Ports.Handshake.XOnXOff;
|
||||||
Capacity = 200.0f;
|
Capacity = 200.0;
|
||||||
Empty = 20.0f;
|
Empty = 20.0;
|
||||||
EmptyUp = 2.0f;
|
EmptyUp = 2.0;
|
||||||
DrainValve = "VB1";
|
DrainValve = "VB1";
|
||||||
DrainTimeSec = 180;
|
DrainTimeSec = 180;
|
||||||
BuoyancyTemp = 20.0f;
|
BuoyancyTemp = 20.0f;
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ namespace TBF.Rig.Scales.MettlerToledo
|
|||||||
public StopBits StopBits;
|
public StopBits StopBits;
|
||||||
public Handshake Handshake;
|
public Handshake Handshake;
|
||||||
public Protocol Protocol;
|
public Protocol Protocol;
|
||||||
public float Capacity { get; set; } /// Max. water mass in 'kg' or volume in 'l'
|
public double Capacity { get; set; } /// Max. water mass in 'kg' or volume in 'l'
|
||||||
public float Empty { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
public double Empty { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
||||||
public float EmptyUp { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l') when the drain valve is not open
|
public double EmptyUp { get; set; } /// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l') when the drain valve is not open
|
||||||
public string Evaporation { get; set; }
|
public string Evaporation { get; set; }
|
||||||
public string DrainValve { get; set; }
|
public string DrainValve { get; set; }
|
||||||
public int DrainTimeSec { get; set; }
|
public int DrainTimeSec { get; set; }
|
||||||
@@ -121,9 +121,9 @@ namespace TBF.Rig.Scales.MettlerToledo
|
|||||||
StopBits = System.IO.Ports.StopBits.One;
|
StopBits = System.IO.Ports.StopBits.One;
|
||||||
Handshake = System.IO.Ports.Handshake.None;
|
Handshake = System.IO.Ports.Handshake.None;
|
||||||
Protocol = Protocol.SICS;
|
Protocol = Protocol.SICS;
|
||||||
Capacity = 200.0f;
|
Capacity = 200.0;
|
||||||
Empty = 20.0f;
|
Empty = 20.0;
|
||||||
EmptyUp = 2.0f;
|
EmptyUp = 2.0;
|
||||||
DrainValve = "VB1";
|
DrainValve = "VB1";
|
||||||
DrainTimeSec = 180;
|
DrainTimeSec = 180;
|
||||||
ActionAfter1stDraining = ActionA1D.Zero;
|
ActionAfter1stDraining = ActionA1D.Zero;
|
||||||
@@ -234,9 +234,9 @@ namespace TBF.Rig.Scales.MettlerToledo
|
|||||||
case 4: StopBits = TBF.Utils.GetStopBits(str); return CfgUpdateFlags.RestartRqrd;
|
case 4: StopBits = TBF.Utils.GetStopBits(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 5: Handshake = TBF.Utils.GetHandshake(str); return CfgUpdateFlags.RestartRqrd;
|
case 5: Handshake = TBF.Utils.GetHandshake(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 6: Protocol = (str == Protocol.SICS.ToString()) ? Protocol.SICS : Protocol.ID1; return CfgUpdateFlags.RestartRqrd;
|
case 6: Protocol = (str == Protocol.SICS.ToString()) ? Protocol.SICS : Protocol.ID1; return CfgUpdateFlags.RestartRqrd;
|
||||||
case 7: Capacity = Utils.ParseUFloat(str); return CfgUpdateFlags.RestartRqrd;
|
case 7: Capacity = Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 8: Empty = Utils.ParseUFloat(str); return CfgUpdateFlags.RestartRqrd;
|
case 8: Empty = Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 9: EmptyUp = Utils.ParseUFloat(str); return CfgUpdateFlags.RestartRqrd;
|
case 9: EmptyUp = Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 10: DrainValve = str; return CfgUpdateFlags.RestartRqrd;
|
case 10: DrainValve = str; return CfgUpdateFlags.RestartRqrd;
|
||||||
case 11: DrainTimeSec = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
case 11: DrainTimeSec = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
case 12:
|
case 12:
|
||||||
@@ -253,7 +253,7 @@ namespace TBF.Rig.Scales.MettlerToledo
|
|||||||
{
|
{
|
||||||
message = string.Empty;
|
message = string.Empty;
|
||||||
int idummy;
|
int idummy;
|
||||||
float fdummy;
|
double ddummy;
|
||||||
|
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
@@ -274,7 +274,7 @@ namespace TBF.Rig.Scales.MettlerToledo
|
|||||||
case 7: /// Capacity
|
case 7: /// Capacity
|
||||||
case 8: /// Empty
|
case 8: /// Empty
|
||||||
case 9: /// EmptyUp
|
case 9: /// EmptyUp
|
||||||
if (Utils.TryParseUFloat(strValue, out fdummy)) return true;
|
if (Utils.TryParseUDouble(strValue, out ddummy)) return true;
|
||||||
break;
|
break;
|
||||||
case 13: /// Evaporation
|
case 13: /// Evaporation
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ namespace TBF.Rig.Various.TankWithLevelMsrmnt
|
|||||||
///
|
///
|
||||||
|
|
||||||
/// Max. water mass in 'kg' or volume in 'l'
|
/// Max. water mass in 'kg' or volume in 'l'
|
||||||
private float capacity;
|
private double capacity;
|
||||||
public float Capacity { get { return capacity; } set { capacity = value; } }
|
public double Capacity { get { return capacity; } set { capacity = value; } }
|
||||||
|
|
||||||
/// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
/// Mass threshold for 'Tank is empty' in 'kg' (or volume in 'l')
|
||||||
private float empty;
|
private double empty;
|
||||||
public float Empty { get { return empty; } set { empty = value; } }
|
public double Empty { get { return empty; } set { empty = value; } }
|
||||||
|
|
||||||
private string drainValve;
|
private string drainValve;
|
||||||
public string DrainValve { get { return drainValve; } set { drainValve = value; } }
|
public string DrainValve { get { return drainValve; } set { drainValve = value; } }
|
||||||
|
|||||||
Reference in New Issue
Block a user