aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Emulations
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-17 18:03:58 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-17 18:03:58 +0300
commit8e77a83a73410f388b3a879c3082eb7bf6064657 (patch)
tree3ee3927a57b354a0e476ae399abb91c3335c1f0a /Software/Visual_Studio/Tango.Emulations
parent11aff2c52535254745dd521322b2b7f46ae16123 (diff)
downloadTango-8e77a83a73410f388b3a879c3082eb7bf6064657.tar.gz
Tango-8e77a83a73410f388b3a879c3082eb7bf6064657.zip
Bugs - delay progress in PPC, Overview error
Related Work Items: #8408
Diffstat (limited to 'Software/Visual_Studio/Tango.Emulations')
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs25
1 files changed, 15 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 8f8a04005..3543b8b3a 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -87,6 +87,7 @@ namespace Tango.Emulations.Emulators
private int _jobAbortCounter;
private bool _abortHeadCleaning;
private String _machineStatusRequestToken;
+ private MachineType _machineType;
#region Properties
@@ -620,12 +621,12 @@ namespace Tango.Emulations.Emulators
monitors.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data);
monitors.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data);
- res.HeatersStates.Add(new HeaterState()
- {
- CurrentValue = 50,
- IsInSetPoint = false,
- SetPoint = 100
- });
+ //res.HeatersStates.Add(new HeaterState()
+ //{
+ // CurrentValue = 50,
+ // IsInSetPoint = false,
+ // SetPoint = 100
+ //});
res.DigitalInterfaceStates.AddRange(_digitalOutputPinsStates.Concat(_digitalInputPinsStates));
res.ComponentsStates.AddRange(_componentsStates);
@@ -801,10 +802,12 @@ namespace Tango.Emulations.Emulators
Stopwatch watch = new Stopwatch();
Dictionary<int, IDSPackLevel> dispenserindexToPacklevel = new Dictionary<int, IDSPackLevel>();
+ double dryerLength = _machineType == MachineType.Ts1800 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : job.ProcessParameters.DryerBufferLength;
+
for (int i = 0; i < units; i++)
{
- while (progress < unit_length + (i == units - 1 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : 0) && !_cancelJob)
+ while (progress < unit_length + (i == units - 1 ? dryerLength : 0) && !_cancelJob)
{
var status = new PMR.Printing.JobStatus();
status.Progress = progress;
@@ -835,7 +838,7 @@ namespace Tango.Emulations.Emulators
}
}
- progress += Math.Min((centimeter_per_second / 1000d), (unit_length + (i == units - 1 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : 0)) - progress);
+ progress += Math.Min((centimeter_per_second / 1000d), (unit_length + (i == units - 1 ? dryerLength : 0)) - progress);
double currentPosition = 0;
double nextStopPosition = unit_length;
@@ -935,7 +938,7 @@ namespace Tango.Emulations.Emulators
{
Status = new PMR.Printing.JobStatus()
{
- Progress = unit_length + job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS,
+ Progress = unit_length + dryerLength,
}
}, request.Container.Token, new TransportResponseConfig() { Completed = !_cancelJob });
@@ -961,7 +964,7 @@ namespace Tango.Emulations.Emulators
{
Status = new PMR.Printing.JobStatus()
{
- Progress = unit_length + job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS,
+ Progress = unit_length + dryerLength,
}
}, _current_job_resume_token, new TransportResponseConfig() { Completed = !_cancelJob });
@@ -1268,6 +1271,8 @@ namespace Tango.Emulations.Emulators
}, request.Container.Token, new TransportResponseConfig() { ErrorCode = request.Message.Password == "1234" ? ErrorCode.None : ErrorCode.UnauthorizedConnection });
+ _machineType = request.Message.MachineType;
+
_connectionTime = DateTime.Now;
_isAfterReset = false;