aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-21 20:31:36 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-21 20:31:36 +0300
commit4c3be889e920102408b0927c5f595ada5a6a544f (patch)
tree71213b906a9762faff2ff49029c5ecdda9d7dc94 /Software/Visual_Studio/Tango.Integration
parentc33507b4aa109a1f2f2d7bd3483c468cc50b19b6 (diff)
downloadTango-4c3be889e920102408b0927c5f595ada5a6a544f.tar.gz
Tango-4c3be889e920102408b0927c5f595ada5a6a544f.zip
Fixed spool count on job from CSV.
Added auto power off selection settings. Fixed issue with power off on firmware reset.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs7
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs35
2 files changed, 35 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index 7951bc584..0e2a0e40c 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -612,5 +612,12 @@ namespace Tango.Integration.Operation
/// <param name="cardID">The card identifier.</param>
/// <returns></returns>
Task ResetCard(int cardID);
+
+ /// <summary>
+ /// Sets the firmware device time to auto power down.
+ /// </summary>
+ /// <param name="minutes">Timeout Minutes.</param>
+ /// <returns></returns>
+ Task SetPowerDownTime(int minutes);
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 93cb7bbb8..527c063fb 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -1441,6 +1441,8 @@ namespace Tango.Integration.Operation
_eventsSent = false;
_machineStatusSent = false;
+ MachineStatus = null;
+
if (Status != MachineStatuses.Disconnected)
{
UpdateStatus(MachineStatuses.Disconnected);
@@ -3287,16 +3289,16 @@ namespace Tango.Integration.Operation
if (response.Message.Status.Progress > 0)
if (oldKeepAlive != UseKeepAlive)
- {
{
- UseKeepAlive = oldKeepAlive;
- }
+ {
+ UseKeepAlive = oldKeepAlive;
+ }
- if (_jobActualStartDate == null)
- {
- _jobActualStartDate = DateTime.UtcNow;
+ if (_jobActualStartDate == null)
+ {
+ _jobActualStartDate = DateTime.UtcNow;
+ }
}
- }
if (!responseLogged)
{
@@ -4700,6 +4702,25 @@ namespace Tango.Integration.Operation
return SendRequest<ResetCardRequest, ResetCardResponse>(new ResetCardRequest() { CardID = cardID }, new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(3) });
}
+ /// <summary>
+ /// Sets the firmware device time to auto power down.
+ /// </summary>
+ /// <param name="minutes">Timeout Minutes.</param>
+ /// <returns></returns>
+ public async Task SetPowerDownTime(int minutes)
+ {
+ try
+ {
+ LogManager.Log($"Settings machine auto power down time to {minutes} minutes...");
+ var r = await SendRequest<SetPowerDownTimeRequest, SetPowerDownTimeResponse>(new SetPowerDownTimeRequest() { TimeoutMinutes = minutes });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error setting down power down time to {minutes} minutes.");
+ throw ex;
+ }
+ }
+
#endregion
}
}