aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
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
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')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml43
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs27
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsxbin0 -> 100667 bytes
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs2
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj3
8 files changed, 82 insertions, 15 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
index 42f6bd180..d1e7127cc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
@@ -54,6 +54,13 @@ namespace Tango.PPC.UI.Models
set { _value = value; RaisePropertyChangedAuto(); }
}
+ private bool _isReady;
+ public bool IsReady
+ {
+ get { return _isReady; }
+ set { _isReady = value; RaisePropertyChangedAuto(); }
+ }
+
public MachineOverviewItem()
{
Color = Colors.Gray;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
index 24ad6576d..aaa609c73 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -155,15 +155,22 @@ namespace Tango.PPC.UI.Models
if (currentvalue < targetValue)
{
DryerAir.Status = "Heating Up";
- DryerAir.Color = Colors.Orange;
+ DryerAir.Color = Colors.Red;
DryerAir.DisplayValue = currentvalue.ToString("N1");
+ DryerAir.MaxValue = targetValue;
+ DryerAir.DisplayMaxValue = ((int)targetValue).ToString();
+ DryerAir.IsReady = false;
}
else if (currentvalue >= targetValue)
{
- DryerAir.Status = "Operational";
+ DryerAir.Status = "";
DryerAir.Color = Colors.Green;
- DryerAir.DisplayValue = currentvalue.ToString("N1");
+ DryerAir.DisplayValue = ((int)currentvalue).ToString();
+ DryerAir.MaxValue = targetValue;
+ DryerAir.DisplayMaxValue = ((int)targetValue).ToString();
+ DryerAir.IsReady = true;
}
+
DryerAir.Value = currentvalue;
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
index ada513879..60584bc15 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -1084,7 +1084,7 @@
<SolidColorBrush Color="{Binding DryerZone3.Color}"/>
</Run.Foreground>
</Run>
- <Run Text="{Binding DryerZone3.DisplayMaxValue}" ></Run>
+ <Run Text="{Binding DryerZone3.DisplayMaxValue}"></Run>
</TextBlock>
<TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" >&#186;C</TextBlock>
@@ -1099,7 +1099,46 @@
<SolidColorBrush Color="{Binding DryerAir.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}">
+
+ <ContentControl Content="{Binding DryerAir}">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" >
+ <Run Text="{Binding DisplayValue}">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding Color}"/>
+ </Run.Foreground>
+ </Run>
+ <Run>/</Run>
+ <Run Text="{Binding DisplayMaxValue}"></Run>
+ </TextBlock>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding DryerAir.IsReady}" Value="True">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" >
+ <Run Text="Ready">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding Color}"/>
+ </Run.Foreground>
+ </Run>
+ </TextBlock>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding DryerAir.Color}"/>
</TextBlock.Foreground>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>
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();
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsx b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsx
new file mode 100644
index 000000000..a5d582122
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsx
Binary files differ
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
index e0ac215c9..7b1104c91 100644
--- a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
@@ -16,7 +16,7 @@ namespace Tango.EventsTypesGenerator
{
class Program
{
- private static string EVENTS_FILE = "Eureka BB alarm events handling chart_TS_and_X4_Rev11.xlsx";
+ private static string EVENTS_FILE = "Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsx";
private class ExcelEventType
{
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
index b7def3b1e..19d4549e0 100644
--- a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
@@ -67,6 +67,9 @@
<None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev11.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev13.xlsx">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
<None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev4.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>