aboutsummaryrefslogtreecommitdiffstats
path: root/Software
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
parent11aff2c52535254745dd521322b2b7f46ae16123 (diff)
downloadTango-8e77a83a73410f388b3a879c3082eb7bf6064657.tar.gz
Tango-8e77a83a73410f388b3a879c3082eb7bf6064657.zip
Bugs - delay progress in PPC, Overview error
Related Work Items: #8408
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs8
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs25
-rw-r--r--Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs2
-rw-r--r--Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs3
4 files changed, 19 insertions, 19 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs
index f9ced3719..75846431f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs
@@ -24,13 +24,7 @@ namespace Tango.PPC.UI.Converters
}
case BL.Enumerations.LiquidTypes.Cleaner:
{
- ImageBrush cleanerBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute };
- BitmapSource bit_source = ResourceHelper.GetImageFromResources(@"Images/cl-full.png");
- var targetBitmap = new WriteableBitmap(new TransformedBitmap(bit_source, new ScaleTransform(0.3, 0.3)));
-
- cleanerBrush.ImageSource = targetBitmap;
- cleanerBrush.Viewport = new System.Windows.Rect(0, 0, targetBitmap.Width, targetBitmap.Height);
- return cleanerBrush;
+ return Application.Current.Resources["TangoCleanerBrush"] as Brush;
}
case BL.Enumerations.LiquidTypes.Yellow:
return Application.Current.Resources["TangoYellowInkBrush"] as Brush;
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;
diff --git a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs
index dc8efa7dd..9c112ae75 100644
--- a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs
+++ b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs
@@ -19,7 +19,7 @@ namespace Tango.FileSystem
folder.Path = "This PC";
folder.IsRoot = true;
folder.Type = FileSystemItemType.Folder;
- folder.Items = DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Fixed || x.DriveType == DriveType.Removable || x.DriveType == DriveType.Network).Select(x => new FileSystemItemDTO()
+ folder.Items = DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Fixed || x.DriveType == DriveType.Removable || x.DriveType == DriveType.Network).Where(x => x.IsReady).Select(x => new FileSystemItemDTO()
{
Path = x.RootDirectory.FullName,
DriveType = x.DriveType,
diff --git a/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs b/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs
index 3e714325b..f593a6ea6 100644
--- a/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs
+++ b/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using System.Timers;
using Tango.Core;
using Tango.Core.ExtensionMethods;
+using Tango.Logging;
using Tango.PMR.Discovery;
using Tango.PMR.Integration;
using Tango.Transport.Helpers;
@@ -190,7 +191,7 @@ namespace Tango.Transport.Discovery
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error multicasting discovery packet.");
+ LogManager.Log(ex, LogCategory.Debug, "Error multicasting discovery packet.");
}
}
}