aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Emulations/Emulators
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-27 15:02:11 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-27 15:02:11 +0300
commitd7a39774fcbdab671c1e4796ba78a3ae29e75b77 (patch)
tree88e7bf083d6a041a7d392dd6947d4bbc90166777 /Software/Visual_Studio/Tango.Emulations/Emulators
parent5b634129f69b00f6df777a3e5e5203977d71062a (diff)
downloadTango-d7a39774fcbdab671c1e4796ba78a3ae29e75b77.tar.gz
Tango-d7a39774fcbdab671c1e4796ba78a3ae29e75b77.zip
Changed X4 Dryer Air Behavior.
Updated events table to rev 13.
Diffstat (limited to 'Software/Visual_Studio/Tango.Emulations/Emulators')
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index a65f6931a..bdf915869 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -83,11 +83,12 @@ namespace Tango.Emulations.Emulators
private bool _abortPowerDown;
private bool _isThreadLoadingStarted;
private String _threadLoadingToken;
- private DateTime _connectionTime;
+ private DateTime _connectionTime;
private int _jobAbortCounter;
private bool _abortHeadCleaning;
private String _machineStatusRequestToken;
private MachineType _machineType;
+ private ProcessParameters _processParameters;
#region Properties
@@ -575,6 +576,9 @@ namespace Tango.Emulations.Emulators
int value = 0;
Random rnd = new Random();
+ int airDryer = 0;
+ int dryerTarget = _processParameters != null ? (int)_processParameters.ESpare1 : 200;
+
var cancelToken = CreateCancelToken();
Stopwatch watch = new Stopwatch();
@@ -589,6 +593,13 @@ namespace Tango.Emulations.Emulators
DiagnosticsMonitors monitors = new DiagnosticsMonitors();
res.Monitors = monitors;
+ if (airDryer < dryerTarget)
+ {
+ airDryer++;
+ }
+
+ res.Monitors.EuSpare1.Add(airDryer);
+
for (int i = 0; i < 10; i++)
{
value++;
@@ -851,11 +862,11 @@ namespace Tango.Emulations.Emulators
for (int i = 0; i < units; i++)
{
- // while (progress < unit_length + (!bIsResumeProcess && i == units - 1 ? dryerLength : 0) && !_cancelJob)
- while (progress < unit_length + ( i == units - 1 ? dryerLength : 0) && !_cancelJob)
- {
- var status = new PMR.Printing.JobStatus();
- status.Progress = progress;
+ // while (progress < unit_length + (!bIsResumeProcess && i == units - 1 ? dryerLength : 0) && !_cancelJob)
+ while (progress < unit_length + (i == units - 1 ? dryerLength : 0) && !_cancelJob)
+ {
+ var status = new PMR.Printing.JobStatus();
+ status.Progress = progress;
if (!message_sent)
{
@@ -1239,7 +1250,7 @@ namespace Tango.Emulations.Emulators
{
Task.Factory.StartNew(() =>
{
-
+ _processParameters = request.Message.ProcessParameters;
Thread.Sleep(1000);
Transporter.SendResponse<UploadProcessParametersResponse>(new UploadProcessParametersResponse(), request.Container.Token);
@@ -1950,7 +1961,7 @@ namespace Tango.Emulations.Emulators
GetVersionDescriptorsResponse response = new GetVersionDescriptorsResponse();
int v = 1;
-
+
foreach (var destination in Enum.GetValues(typeof(PMR.FirmwareUpgrade.VersionFileDestination)).Cast<PMR.FirmwareUpgrade.VersionFileDestination>().ToList())
{
VersionFileDescriptor result = new VersionFileDescriptor();