From 48f781d037a83c51fdd555fb6c9d1c2b4e424efe Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 11 Dec 2018 19:43:35 +0200 Subject: Working on PPC hotspot and external bridge. --- .../MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index 70378a4d5..d1f9cda64 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -453,6 +453,13 @@ namespace Tango.MachineStudio.UI.ViewModels if (x.SelectedMachine.RequiresAuthentication) { + //Check machine exist on my database first + if (!ObservablesStaticCollections.Instance.Machines.ToList().Exists(y => y.SerialNumber == x.SelectedMachine.SerialNumber)) + { + _notificationProvider.ShowError( $"The specified machine '{x.SelectedMachine.SerialNumber}' could not be found on the database."); + return; + } + _notificationProvider.ShowModalDialog(async (login) => { using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.ToString() + "...")) -- cgit v1.3.1 From b6554a1fa87da50ba7c72ccf5df6bc198445640b Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 12 Dec 2018 12:58:10 +0200 Subject: Added organization for ExternalBridgeTcpClient. Clear TCP machine when restarting ExternalBridgeScanner. Fixed issue with wrong NanoliterPerPulse when converting from job to PMR job. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 20578304 -> 20578304 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 20578304 -> 20578304 bytes .../ViewModels/MainViewVM.cs | 4 ++-- .../Views/ConnectedMachineView.xaml | 4 ++++ .../ExternalBridge/ExternalBridgeScanner.cs | 5 +++++ .../ExternalBridge/ExternalBridgeTcpClient.cs | 1 + .../Tango.Integration/Operation/MachineOperator.cs | 9 ++++++++- 9 files changed, 20 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 83ec9f61f..3c8c5f764 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 0506561cb..7acf221ab 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 2875baabf..6ebeed357 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 3ab421053..266c1d998 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index d1f9cda64..c9cd3276f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -454,9 +454,9 @@ namespace Tango.MachineStudio.UI.ViewModels if (x.SelectedMachine.RequiresAuthentication) { //Check machine exist on my database first - if (!ObservablesStaticCollections.Instance.Machines.ToList().Exists(y => y.SerialNumber == x.SelectedMachine.SerialNumber)) + if (x.SelectedMachine.Machine == null) { - _notificationProvider.ShowError( $"The specified machine '{x.SelectedMachine.SerialNumber}' could not be found on the database."); + _notificationProvider.ShowError( $"The specified machine '{x.SelectedMachine.SerialNumber}' could not be found on the database. Aborting connection."); return; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml index b1502f374..2e2dd1285 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml @@ -95,6 +95,8 @@ + + @@ -181,6 +183,8 @@ + + diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs index f9d103de2..eb00a27b3 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs @@ -73,6 +73,11 @@ namespace Tango.Integration.ExternalBridge IsStarted = true; + foreach (var machine in AvailableMachines.OfType().ToList()) + { + AvailableMachines.Remove(machine); + } + _tcpDiscoveryThread = new Thread(TcpDiscoveryThreadMethod); _tcpDiscoveryThread.IsBackground = true; _tcpDiscoveryThread.Start(); diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs index 6a2c097fd..d602ac781 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs @@ -149,6 +149,7 @@ namespace Tango.Integration.ExternalBridge public ExternalBridgeTcpClient(String serialNumber, String ipAddress) { SerialNumber = serialNumber; + Machine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == serialNumber); IPAddress = ipAddress; UseKeepAlive = false; EnableDiagnostics = true; diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 5a63db5e0..63a19dcac 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -924,7 +924,14 @@ namespace Tango.Integration.Operation dispenser.DispenserLiquidType = (DispenserLiquidType)liquidVolume.IdsPack.LiquidType.Code; dispenser.DispenserStepDivision = (DispenserStepDivision)liquidVolume.DispenserStepDivision; - dispenser.NanoliterPerPulse = liquidVolume.IdsPack.DispenserType.NlPerPulse; + if (liquidVolume.DispenserStepDivision != BL.Dispensing.DispenserStepDivisions.Auto) + { + dispenser.NanoliterPerPulse = liquidVolume.NanoliterPerStep; + } + else + { + dispenser.NanoliterPerPulse = liquidVolume.IdsPack.DispenserType.NlPerPulse; + } dispenser.LiquidMaxNanoliterPerCentimeter = liquidVolume.LiquidMaxNanoliterPerCentimeter; dispenser.NanoliterPerCentimeter = liquidVolume.NanoliterPerCentimeter; -- cgit v1.3.1