Correct high voltage state within LaserWebPanel.
This commit is contained in:
@@ -116,6 +116,8 @@ namespace CincyLib.Laser
|
||||
if (int.TryParse(highVoltageString, out hv))
|
||||
LaserWebPanel.HighVoltage = GetHighVoltage(hv);
|
||||
|
||||
ApplyCorrections(LaserWebPanel);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch { }
|
||||
@@ -124,6 +126,18 @@ namespace CincyLib.Laser
|
||||
|
||||
}
|
||||
|
||||
private void ApplyCorrections(LaserWebPanel lwp)
|
||||
{
|
||||
foreach (var msg in lwp.FYIMessages)
|
||||
{
|
||||
if (msg.ToLower().Contains("laser high voltage is off"))
|
||||
{
|
||||
lwp.HighVoltage = HighVoltage.Off;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool Read(Uri uri)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user