aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-07-07 15:36:47 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-07-07 15:36:47 +0300
commita744f78c204bbfa33415b1ef5ae2bed57779056a (patch)
treecdd9dfb7850f1c891b86674f644ba4cedc2b8817 /Software/Visual_Studio/PPC
parent56ca81b4616f11001bd9cb6a1bae5a6d0f2dc855 (diff)
parent97beff5cc3919b365585da19f7f93e2cd0b4a0ef (diff)
downloadTango-a744f78c204bbfa33415b1ef5ae2bed57779056a.tar.gz
Tango-a744f78c204bbfa33415b1ef5ae2bed57779056a.zip
Merge branch 'software' of https://twinetfs.visualstudio.com/Tango/_git/Tango into software
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs38
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml4
9 files changed, 49 insertions, 48 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
index 132f33849..87a1a361f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
@@ -399,7 +399,7 @@
<DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
<TextBlock VerticalAlignment="Center">Gradient Resolution CM</TextBlock>
- <touch:TouchNumericTextBox Minimum="10" Maximum="500" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.GradientGenerationResolution}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ <touch:TouchNumericTextBox Minimum="40" Maximum="500" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.GradientGenerationResolution}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
</DockPanel>
<DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
index 6e1d76d9d..cd646ce02 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
@@ -92,11 +92,11 @@ namespace Tango.PPC.Maintenance.ViewModels
set { _wasteStates = value; RaisePropertyChangedAuto(); }
}
- private bool _isInkAutoFillingDisabled;
- public bool IsInkAutoFillingDisabled
+ private bool _isInkAutoFillingEnabled;
+ public bool IsInkAutoFillingEnabled
{
- get { return _isInkAutoFillingDisabled; }
- set { _isInkAutoFillingDisabled = value; RaisePropertyChangedAuto(); OnInkAutoFillingChanged(); }
+ get { return _isInkAutoFillingEnabled; }
+ set { _isInkAutoFillingEnabled = value; RaisePropertyChangedAuto(); OnInkAutoFillingChanged(); }
}
public RelayCommand ExportLogsCommand { get; set; }
@@ -190,8 +190,8 @@ namespace Tango.PPC.Maintenance.ViewModels
UpdateMidTankLevels(status);
OverallTemperature.Temperature = status.OverallTemperature;
SpoolState = status.SpoolState;
- _isInkAutoFillingDisabled = status.AutoInkFillingDisabled;
- RaisePropertyChanged(nameof(IsInkAutoFillingDisabled));
+ _isInkAutoFillingEnabled = status.AutoInkFillingEnabled;
+ RaisePropertyChanged(nameof(IsInkAutoFillingEnabled));
InvalidateRelayCommands();
}
@@ -335,22 +335,22 @@ namespace Tango.PPC.Maintenance.ViewModels
private async void OnInkAutoFillingChanged()
{
- if (IsInkAutoFillingDisabled)
+ if (IsInkAutoFillingEnabled)
{
try
{
- NotificationProvider.SetGlobalBusyMessage("Disabling auto ink filling...");
+ NotificationProvider.SetGlobalBusyMessage("Enabling auto ink filling...");
await MachineProvider.MachineOperator.SendRequest<SetInkAutoFillingModeRequest, SetInkAutoFillingModeResponse>(new SetInkAutoFillingModeRequest()
{
- Disabled = true
+ Enable = true
});
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error disabling ink filling.");
- _isInkAutoFillingDisabled = false;
- RaisePropertyChanged(nameof(IsInkAutoFillingDisabled));
- await NotificationProvider.ShowError($"Error disabling auto ink filling.\n{ex.Message}");
+ LogManager.Log(ex, "Error enabling auto ink filling.");
+ _isInkAutoFillingEnabled = false;
+ RaisePropertyChanged(nameof(IsInkAutoFillingEnabled));
+ await NotificationProvider.ShowError($"Error enabling auto ink filling.\n{ex.Message}");
}
finally
{
@@ -361,18 +361,18 @@ namespace Tango.PPC.Maintenance.ViewModels
{
try
{
- NotificationProvider.SetGlobalBusyMessage("Enabling auto ink filling...");
+ NotificationProvider.SetGlobalBusyMessage("Disabling auto ink filling...");
await MachineProvider.MachineOperator.SendRequest<SetInkAutoFillingModeRequest, SetInkAutoFillingModeResponse>(new SetInkAutoFillingModeRequest()
{
- Disabled = false
+ Enable = false
});
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error enabling ink filling.");
- _isInkAutoFillingDisabled = true;
- RaisePropertyChanged(nameof(IsInkAutoFillingDisabled));
- await NotificationProvider.ShowError($"Error enabling auto ink filling.\n{ex.Message}");
+ LogManager.Log(ex, "Error disabling auto ink filling.");
+ _isInkAutoFillingEnabled = true;
+ RaisePropertyChanged(nameof(IsInkAutoFillingEnabled));
+ await NotificationProvider.ShowError($"Error disabling auto ink filling.\n{ex.Message}");
}
finally
{
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
index 4f93f9b31..a77ec5901 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
@@ -261,7 +261,7 @@
<touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ViewBitResultsCommand}">VIEW BIT RESULTS</touch:TouchButton>
- <touch:TouchToggleButton EnableDropShadow="False" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Margin="20" CornerRadius="25" Height="50" FontSize="18" IsChecked="{Binding IsInkAutoFillingDisabled}" IsEnabled="{Binding MachineProvider.IsConnected}" Content="DISABLE AUTO INK FILLING" CheckedContent="ENABLE AUTO INK FILLING" Foreground="{StaticResource TangoPrimaryAccentBrush}"></touch:TouchToggleButton>
+ <touch:TouchToggleButton EnableDropShadow="False" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Margin="20" CornerRadius="25" Height="50" FontSize="18" IsChecked="{Binding IsInkAutoFillingEnabled}" IsEnabled="{Binding MachineProvider.IsConnected}" Content="ENABLE AUTO INK FILLING" CheckedContent="DISABLE AUTO INK FILLING" Foreground="{StaticResource TangoPrimaryAccentBrush}"></touch:TouchToggleButton>
</UniformGrid>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index 2cf0e193a..fce1ce046 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -22,6 +22,8 @@ namespace Tango.PPC.Common
/// <seealso cref="Tango.Settings.SettingsBase" />
public class PPCSettings : SettingsBase
{
+ private int _gradientGenerationResolution;
+
/// <summary>
/// Gets or sets the state of the application.
/// </summary>
@@ -105,7 +107,7 @@ namespace Tango.PPC.Common
/// <summary>
/// Gets or sets the gradient generation resolution.
/// </summary>
- public int GradientGenerationResolution { get; set; }
+ public int GradientGenerationResolution { get => Math.Max(40, _gradientGenerationResolution); set => _gradientGenerationResolution = value; }
/// <summary>
/// Gets or sets a value indicating whether to enable the application lock screen.
@@ -215,7 +217,7 @@ namespace Tango.PPC.Common
/// <summary>
/// Gets or sets the automatic update check interval.
/// </summary>
- public TimeSpan AutoUpdateCheckInterval { get; set; }
+ public TimeSpan AutoUpdateCheckInterval { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable the automatic thread loading support.
@@ -308,9 +310,11 @@ namespace Tango.PPC.Common
/// </summary>
public bool UseJobsModuleV2 { get; set; }
- public ColorSpaces? DefaultTabColorSpace {
+ public ColorSpaces? DefaultTabColorSpace
+ {
get;
- set; }
+ set;
+ }
/// <summary>
/// Gets or sets the fine tuning trial length in meters.
@@ -335,7 +339,7 @@ namespace Tango.PPC.Common
JobUploadStrategy = JobUploadStrategy.JobDescriptionFile;
FineTuningTrialLengthMeters = 200;
EnableGradientGeneration = true;
- GradientGenerationResolution = 20;
+ GradientGenerationResolution = 40;
MachineScanningTimeoutSeconds = 20;
EmbeddedComPort = "COM10";
EmbeddedDeviceHint = "Tango USB Serial Port";
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
index d2fe31387..d9ec6d1c2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
@@ -12,9 +12,9 @@
<Grid DockPanel.Dock="Bottom">
<touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton>
- <StackPanel HorizontalAlignment="Left" Visibility="{Binding IsAutoInkFillingDisabled,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel HorizontalAlignment="Left" Visibility="{Binding IsAutoInkFillingEnabled,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<TextBlock HorizontalAlignment="Center" Foreground="{StaticResource TangoErrorBrush}">Auto ink filling is disabled</TextBlock>
- <touch:TouchButton CornerRadius="25" Margin="0 5 0 0" Command="{Binding EnableAutoInkFillingCommand}" Style="{StaticResource TangoHollowButton}" Width="300" Height="50" VerticalAlignment="Bottom">ENABLE AUTO INK FILLING</touch:TouchButton>
+ <touch:TouchButton CornerRadius="25" Margin="0 5 0 0" Command="{Binding StartAutoInkFillingCommand}" Style="{StaticResource TangoHollowButton}" Width="300" Height="50" VerticalAlignment="Bottom">START INK FILLING</touch:TouchButton>
</StackPanel>
</Grid>
<StackPanel DockPanel.Dock="Top">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
index 6d4c90e21..20f1fc18a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
@@ -13,22 +13,22 @@ namespace Tango.PPC.UI.Dialogs
{
public InsufficientLiquidQuantityException Exception { get; set; }
- public bool IsAutoInkFillingDisabled { get; set; }
+ public bool IsAutoInkFillingEnabled { get; set; }
- public bool EnableAutoInkFillingOnExit { get; set; }
+ public bool StartAutoInkFillingOnExit { get; set; }
- public RelayCommand EnableAutoInkFillingCommand { get; set; }
+ public RelayCommand StartAutoInkFillingCommand { get; set; }
- public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex,bool isAutoInkFillingDisabled)
+ public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex,bool isAutoInkFillingEnabled)
{
Exception = ex;
- IsAutoInkFillingDisabled = isAutoInkFillingDisabled;
- EnableAutoInkFillingCommand = new RelayCommand(EnableAutoInkFilling);
+ IsAutoInkFillingEnabled = isAutoInkFillingEnabled;
+ StartAutoInkFillingCommand = new RelayCommand(StartAutoInkFilling);
}
- private void EnableAutoInkFilling()
+ private void StartAutoInkFilling()
{
- EnableAutoInkFillingOnExit = true;
+ StartAutoInkFillingOnExit = true;
Accept();
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
index 9856faf3d..938d99451 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -104,22 +104,19 @@ namespace Tango.PPC.UI.Printing
_notificationProvider.ReleaseGlobalBusyMessage();
LogManager.Log(ex);
- var vm = await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex, _machineProvider.MachineOperator.MachineStatus.AutoInkFillingDisabled));
+ var vm = await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex, _machineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled));
- if (vm.EnableAutoInkFillingOnExit)
+ if (vm.StartAutoInkFillingOnExit)
{
try
{
- _notificationProvider.SetGlobalBusyMessage("Enabling auto ink filling...");
- await _machineProvider.MachineOperator.SendRequest<SetInkAutoFillingModeRequest, SetInkAutoFillingModeResponse>(new SetInkAutoFillingModeRequest()
- {
- Disabled = false
- });
+ _notificationProvider.SetGlobalBusyMessage("Starting ink filling...");
+ await _machineProvider.MachineOperator.SendRequest<InitiateInkFillingRequest, InitiateInkFillingResponse>(new InitiateInkFillingRequest());
}
catch (Exception exx)
{
- LogManager.Log(exx, "Error enabling ink filling.");
- await _notificationProvider.ShowError($"Error enabling auto ink filling.\n{ex.Message}");
+ LogManager.Log(exx, "Error starting ink filling.");
+ await _notificationProvider.ShowError($"Error starting ink filling.\n{ex.Message}");
}
finally
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
index 9025b1908..3630c7ef6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Application")]
-[assembly: AssemblyVersion("1.7.10.0")]
+[assembly: AssemblyVersion("1.7.11.0")]
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
index ff35fb059..1417c79f3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -291,7 +291,7 @@
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingDisabled}" Value="True">
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False">
@@ -300,7 +300,7 @@
</Style.Triggers>
</Style>
</Grid.Style>
- <touch:TouchIcon Icon="LightningBoltOutline" Foreground="#151515" Width="24" Height="24" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 3 -35 0"></touch:TouchIcon>
+ <touch:TouchIcon Icon="InvertColors" Foreground="#151515" Width="18" Height="18" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 6 -30 0"></touch:TouchIcon>
</Grid>
</Grid>