From 3043e65ad539455ad2510e402e1c8f2d168577d2 Mon Sep 17 00:00:00 2001 From: Mirta Date: Sun, 12 May 2019 13:30:46 +0300 Subject: Implemented new TCC algorithm. --- .../Tango.MachineStudio.Common.csproj | 6 ++++-- .../Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 4cf1855ca..3c272892b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -55,7 +55,9 @@ ..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll - + + ..\..\Referenced Assemblies\SMO\Microsoft.SqlServer.AzureStorageEnum.dll + @@ -386,7 +388,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 8d9255926..c94102df5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -420,6 +420,10 @@ {5001990f-977b-48ff-b217-0236a5022ad8} Tango.Web + + {f209fae8-73f9-441b-97f4-0844a0279390} + Tango.TCC.BL + {f69da3a8-f823-461e-87cf-a9275abc0b15} Tango.MachineStudio.Dispensers @@ -520,6 +524,14 @@ + + Tango.TCC.ColorDetector.dll + Always + + + Tango.TCC.ColorDetector.pdb + Always + -- cgit v1.3.1 From 7ef2f5156e8a7958ee6425f53158f94974762ef9 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 12 May 2019 16:22:55 +0300 Subject: Fixed CircleActionButton on TCC. Prevent continues messages from updating after complete or error. Fixed diagnostics not resuming MS <=> PPC after PPC <=> Machine disconnection. --- .../Android_Studio/ColorCapture/app/build.gradle | 6 +- .../colorcapture/controls/CircleActionButton.java | 16 ++++++ .../views/sendtoemail/SendToEmailFragmentVM.java | 2 +- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/TCC/TCC.mdf | Bin 8388608 -> 8388608 bytes Software/DB/TCC/TCC_log.ldf | Bin 8388608 -> 8388608 bytes .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Advanced Installer Projects/PPC Installer.aip | 13 +++-- .../Build/Shortcuts/Machine Studio.lnk | Bin 1581 -> 1502 bytes .../ViewModels/MachineTechViewVM.cs | 2 + .../Connection/DefaultMachineProvider.cs | 2 +- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- .../ExternalBridge/ExternalBridgeService.cs | 63 ++++++++++++++++++++- .../Tango.Integration/Operation/MachineOperator.cs | 20 +++++-- .../Tango.Transport/TransporterBase.cs | 3 + 17 files changed, 114 insertions(+), 17 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle index 495158238..b733330cc 100644 --- a/Software/Android_Studio/ColorCapture/app/build.gradle +++ b/Software/Android_Studio/ColorCapture/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "com.twine.colorcapture" minSdkVersion 22 targetSdkVersion 27 - versionCode 2 - versionName "1.0" + versionCode 3 + versionName "1.3" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { @@ -23,7 +23,7 @@ android { buildTypes { debug { - buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://10.100.102.214:45455/api/\"" + buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://192.168.1.229:45457/api/\"" buildConfigField "String", "WEB_SERVICE_APP_ID", "\"Tdf793i4ughsiduf8749509237885ehgfdlkghlT\"" } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/CircleActionButton.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/CircleActionButton.java index afa02c511..a054fb3b2 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/CircleActionButton.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/CircleActionButton.java @@ -35,6 +35,7 @@ public class CircleActionButton extends FrameLayout implements View.OnTouchListe private AlphaAnimation alphaAnimationUp; private Drawable icon; private AppCompatTextView textView; + private boolean isWidthSet; public CircleActionButton(@NonNull Context context, @Nullable AttributeSet attrs) { @@ -48,6 +49,7 @@ public class CircleActionButton extends FrameLayout implements View.OnTouchListe btn = findViewById(R.id.actionButtonCircleButton); circleActionButton = findViewById(R.id.actionButtonCircle); + frameAfterPadding = findViewById(R.id.frameAfterPadding); ImageView imageView = findViewById(R.id.circleActionButtonImageView); textView = findViewById(R.id.circleActionButtonTextView); @@ -72,6 +74,20 @@ public class CircleActionButton extends FrameLayout implements View.OnTouchListe a.recycle(); } + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) + { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + + if (!isWidthSet) + { + isWidthSet = true; + ViewGroup.LayoutParams layoutParams = circleActionButton.getLayoutParams(); + layoutParams.width = circleActionButton.getMeasuredHeight(); + circleActionButton.setLayoutParams(layoutParams); + } + } + @Override public boolean onTouch(View view, MotionEvent motionEvent) { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java index 8638f8719..8056bcfe6 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java @@ -90,7 +90,7 @@ public class SendToEmailFragmentVM extends ViewModelBase i vm.close(); notificationProvider.showSuccess("Send to email", "Your detected color result is on its way!", (x) -> { - closeActivity(); + navigationProvider.navigateBack(); }); } }).build().start(); diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 324ad59d5..e85b35642 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 f331c27ec..014618103 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/TCC/TCC.mdf b/Software/DB/TCC/TCC.mdf index 9cc3cbf08..583667787 100644 Binary files a/Software/DB/TCC/TCC.mdf and b/Software/DB/TCC/TCC.mdf differ diff --git a/Software/DB/TCC/TCC_log.ldf b/Software/DB/TCC/TCC_log.ldf index ad5e3250a..394c67999 100644 Binary files a/Software/DB/TCC/TCC_log.ldf and b/Software/DB/TCC/TCC_log.ldf differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt index 6d87e9201..a603ff06b 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index 7758bafce..109c4d6da 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ - + - + @@ -194,6 +194,7 @@ + @@ -219,7 +220,7 @@ - + @@ -456,6 +457,8 @@ + + @@ -485,7 +488,7 @@ - + @@ -512,7 +515,7 @@ - + diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk index 666940192..03a370eb7 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk and b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 72e43d7b0..ab5d2ebb1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -405,6 +405,8 @@ namespace Tango.MachineStudio.Technician.ViewModels /// The data. private void PopulateDiagnosticsData(StartDiagnosticsResponse data) { + if (data.Monitors == null) return; + TimeSpan delta_base = DateTime.Now - _start_time; TimeSpan delta = (DateTime.Now - _last_time); double delta_mili = delta.TotalMilliseconds; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index ab42de712..04f64bd9c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -183,7 +183,7 @@ namespace Tango.PPC.Common.Connection } catch (Exception ex) { - LogManager.Log(ex, "Error while trying to scan and connect to the machine."); + LogManager.Log(ex, LogCategory.Debug, "Error while trying to scan and connect to the machine."); } } 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 24512bf27..592edd180 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.0.23.0")] +[assembly: AssemblyVersion("1.0.24.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 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. --> - + diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs index abd2f4015..00e7def8c 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs @@ -32,6 +32,8 @@ namespace Tango.Integration.ExternalBridge private int _discovery_port = 8888; //Will be overridden by settings in constructor.. private int _external_bridge_port = 1984; //Will be overridden by settings in constructor.. private String _eventsNotificationsToken; + private String _diagnosticsNotificationToken; + private String _debugLogsNotificationToken; #region Events @@ -189,6 +191,8 @@ namespace Tango.Integration.ExternalBridge { MachineOperator.StateChanged -= MachineOperator_StateChanged; MachineOperator.StateChanged += MachineOperator_StateChanged; + MachineOperator.StatusChanged -= MachineOperator_StatusChanged; + MachineOperator.StatusChanged += MachineOperator_StatusChanged; MachineOperator.PendingResponseReceived -= MachineOperator_PendingResponseReceived; MachineOperator.PendingResponseReceived += MachineOperator_PendingResponseReceived; } @@ -228,6 +232,26 @@ namespace Tango.Integration.ExternalBridge //Do nothing right now. } + private void MachineOperator_StatusChanged(object sender, MachineStatuses e) + { + if (e == MachineStatuses.ReadyToDye) + { + if (IsInSession) + { + if (_diagnosticsNotificationToken != null) + { + var msg = MessageFactory.CreateTangoMessage(_diagnosticsNotificationToken); + _machineOperator.SendContinuousRequest(msg); + } + if (_debugLogsNotificationToken != null) + { + var msg = MessageFactory.CreateTangoMessage(_debugLogsNotificationToken); + _machineOperator.SendContinuousRequest(msg); + } + } + } + } + private void LogManager_NewLog(object sender, Tango.Logging.LogItemBase e) { if (State == TransportComponentState.Connected && _send_app_logs) @@ -415,6 +439,8 @@ namespace Tango.Integration.ExternalBridge protected async virtual void OnClientDisconnected() { _eventsNotificationsToken = null; + _diagnosticsNotificationToken = null; + _debugLogsNotificationToken = null; IsInSession = false; _send_app_logs = false; @@ -467,6 +493,22 @@ namespace Tango.Integration.ExternalBridge SendResponse(container); } } + else if (container.Type == MessageType.StartDiagnosticsResponse) + { + if (_diagnosticsNotificationToken != null) + { + container.Token = _diagnosticsNotificationToken; + SendResponse(container); + } + } + else if (container.Type == MessageType.StartDebugLogResponse) + { + if (_debugLogsNotificationToken != null) + { + container.Token = _debugLogsNotificationToken; + SendResponse(container); + } + } } } catch { } @@ -485,8 +527,15 @@ namespace Tango.Integration.ExternalBridge _messageHandlers.Add(MessageType.JobRequest, OnJobRequest); + //Events _messageHandlers.Add(MessageType.StartEventsNotificationRequest, OnStartEventsNotificationRequest); _messageHandlers.Add(MessageType.StopEventsNotificationRequest, OnStopEventsNotificationRequest); + + //Diagnostics + _messageHandlers.Add(MessageType.StartDiagnosticsRequest, OnStartDiagnosticsRequest); + + //Debug Logs + _messageHandlers.Add(MessageType.StartDebugLogRequest, OnStartDebugLogRequest); } protected virtual async void OnAnyRequest(MessageContainer container) @@ -652,7 +701,7 @@ namespace Tango.Integration.ExternalBridge SendResponse(new StartEventsNotificationResponse(), container.Token); } - private void OnStopEventsNotificationRequest(MessageContainer container) + protected virtual void OnStopEventsNotificationRequest(MessageContainer container) { if (_eventsNotificationsToken != null) { @@ -662,6 +711,18 @@ namespace Tango.Integration.ExternalBridge } } + protected virtual void OnStartDiagnosticsRequest(MessageContainer container) + { + _diagnosticsNotificationToken = container.Token; + _machineOperator.SendContinuousRequest(container); + } + + protected virtual void OnStartDebugLogRequest(MessageContainer container) + { + _debugLogsNotificationToken = container.Token; + _machineOperator.SendContinuousRequest(container); + } + private void OnColorProfileRequest(MessageContainer container) { var request = MessageFactory.ParseTangoMessageFromContainer(container); diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 6084c78a2..4047ae7a2 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -890,14 +890,20 @@ namespace Tango.Integration.Operation { if (response.Message.Status.Progress > jobTicket.ProcessParameters.DryerBufferLength) { - Status = MachineStatuses.Printing; + if (!completed) + { + Status = MachineStatuses.Printing; + } } } else { if (response.Message.Status.Progress > 0) { - Status = MachineStatuses.Printing; + if (!completed) + { + Status = MachineStatuses.Printing; + } } } } @@ -1548,14 +1554,20 @@ namespace Tango.Integration.Operation { if (response.Message.Status.Progress > request.JobTicket.ProcessParameters.DryerBufferLength) { - Status = MachineStatuses.Printing; + if (!completed) + { + Status = MachineStatuses.Printing; + } } } else { if (response.Message.Status.Progress > 0) { - Status = MachineStatuses.Printing; + if (!completed) + { + Status = MachineStatuses.Printing; + } } } } diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs index 28ac15cd6..f1e6d9c46 100644 --- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs +++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs @@ -1054,6 +1054,7 @@ namespace Tango.Transport if (container.Completed) { LogManager.Log("Continuous sequence completed.", LogCategory.Debug); + _pendingRequests.Remove(request); } request.SetResult(message, container.Completed); } @@ -1061,11 +1062,13 @@ namespace Tango.Transport { String m = "Continuous response " + container.Type + " has been aborted: " + container.Error.ToString(); LogManager.Log(m, LogCategory.Info); + _pendingRequests.Remove(request); request.SetException(new ContinuousResponseAbortedException(m)); } else { LogManager.Log("Continuous response has returned with error: " + container.Error.ToString(), LogCategory.Warning); + _pendingRequests.Remove(request); request.SetException(new ResponseErrorException(container)); } } -- cgit v1.3.1