From 9fa032b7aea6f2fbfdae05d21c3c10db174e1662 Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 3 Feb 2018 14:31:17 +0200 Subject: Same as previous.. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes Software/Fonts/digital-7/digital-7 (italic).ttf | Bin 0 -> 23344 bytes .../Fonts/digital-7/digital-7 (mono italic).ttf | Bin 0 -> 22984 bytes Software/Fonts/digital-7/digital-7 (mono).ttf | Bin 0 -> 34404 bytes Software/Fonts/digital-7/digital-7.ttf | Bin 0 -> 34360 bytes Software/Fonts/digital-7/readme.txt | 73 +++ Software/PMR/Messages/Common/DoubleArray.proto | 9 + .../PMR/Messages/Common/KeepAliveRequest.proto | 2 +- .../PMR/Messages/Common/KeepAliveResponse.proto | 2 +- Software/PMR/Messages/Common/MessageType.proto | 27 +- .../Diagnostics/PushDiagnosticsRequest.proto | 2 +- .../Diagnostics/PushDiagnosticsResponse.proto | 5 +- .../ViewModels/MainViewVM.cs | 10 +- .../Views/MainView.xaml | 190 ++++--- .../ViewModels/SensorsViewVM.cs | 2 +- .../Tango.MachineStudio.Common/Fonts/digital-7.ttf | Bin 0 -> 34360 bytes .../Resources/MaterialDesign.xaml | 5 + .../Tango.MachineStudio.Common.csproj | 1 + .../Tango.MachineStudio.UI/Views/MainView.xaml.cs | 43 +- .../Tango.Emulations/Emulators/MachineEmulator.cs | 32 +- .../Formulation/DiluterFormulaCalculator.cs | 29 - .../Formulation/LubricantFormulaCalculator.cs | 15 + .../TransparentLiquidFormulaCalculator.cs | 29 + .../Observables/Enumerations/IdsPackFormulas.cs | 12 +- .../Operators/IMachineOperator.cs | 2 +- .../Tango.Integration/Operators/MachineOperator.cs | 9 +- .../Tango.Integration/Tango.Integration.csproj | 3 +- .../Visual_Studio/Tango.PMR/Common/DoubleArray.cs | 152 +++++ .../Tango.PMR/Common/KeepAliveRequest.cs | 2 +- .../Tango.PMR/Common/KeepAliveResponse.cs | 2 +- .../Visual_Studio/Tango.PMR/Common/MessageType.cs | 86 ++- .../Diagnostics/PushDiagnosticsRequest.cs | 217 ++++++++ .../Diagnostics/PushDiagnosticsResponse.cs | 218 ++++++++ .../Diagnostics/StartDiagnosticsRequest.cs | 217 -------- .../Diagnostics/StartDiagnosticsResponse.cs | 196 ------- .../Visual_Studio/Tango.PMR/Hardware/Dancer.cs | 253 --------- .../Visual_Studio/Tango.PMR/Hardware/Dispenser.cs | 569 ------------------- .../Tango.PMR/Hardware/InternalWinder.cs | 245 -------- Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs | 572 ------------------- .../Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs | 303 ---------- .../Visual_Studio/Tango.PMR/Hardware/PIDControl.cs | 616 --------------------- Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 5 +- 43 files changed, 970 insertions(+), 3185 deletions(-) create mode 100644 Software/Fonts/digital-7/digital-7 (italic).ttf create mode 100644 Software/Fonts/digital-7/digital-7 (mono italic).ttf create mode 100644 Software/Fonts/digital-7/digital-7 (mono).ttf create mode 100644 Software/Fonts/digital-7/digital-7.ttf create mode 100644 Software/Fonts/digital-7/readme.txt create mode 100644 Software/PMR/Messages/Common/DoubleArray.proto create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/digital-7.ttf delete mode 100644 Software/Visual_Studio/Tango.Integration/Formulation/DiluterFormulaCalculator.cs create mode 100644 Software/Visual_Studio/Tango.Integration/Formulation/LubricantFormulaCalculator.cs create mode 100644 Software/Visual_Studio/Tango.Integration/Formulation/TransparentLiquidFormulaCalculator.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Common/DoubleArray.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsRequest.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/Dancer.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/Dispenser.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/InternalWinder.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs delete mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/PIDControl.cs diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 68b085631..1d7afd781 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 00c57b0bd..bacb454a8 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Fonts/digital-7/digital-7 (italic).ttf b/Software/Fonts/digital-7/digital-7 (italic).ttf new file mode 100644 index 000000000..5a98d7a62 Binary files /dev/null and b/Software/Fonts/digital-7/digital-7 (italic).ttf differ diff --git a/Software/Fonts/digital-7/digital-7 (mono italic).ttf b/Software/Fonts/digital-7/digital-7 (mono italic).ttf new file mode 100644 index 000000000..a01db8a5d Binary files /dev/null and b/Software/Fonts/digital-7/digital-7 (mono italic).ttf differ diff --git a/Software/Fonts/digital-7/digital-7 (mono).ttf b/Software/Fonts/digital-7/digital-7 (mono).ttf new file mode 100644 index 000000000..a481b97b4 Binary files /dev/null and b/Software/Fonts/digital-7/digital-7 (mono).ttf differ diff --git a/Software/Fonts/digital-7/digital-7.ttf b/Software/Fonts/digital-7/digital-7.ttf new file mode 100644 index 000000000..5dbe6f908 Binary files /dev/null and b/Software/Fonts/digital-7/digital-7.ttf differ diff --git a/Software/Fonts/digital-7/readme.txt b/Software/Fonts/digital-7/readme.txt new file mode 100644 index 000000000..6894c2408 --- /dev/null +++ b/Software/Fonts/digital-7/readme.txt @@ -0,0 +1,73 @@ +True Type Fonts: DIGITAL-7 version 1.02 + + +EULA +-==- +The fonts Digital-7 is freeware for home using. + + +DESCRIPTION +-=========- + +This font created specially for program Calculator-7 (download shareware version: http://www.styleseven.com/ and use 7 days fo free). + +The program Calculator-7 offers you the following possibilities: +* calculate using seven operator: addition, subtraction, multiply, divide, percent, square root, 1 divide to X; +* set decimal position (0, 2, 3, float) and round type (up, mathematical, down); +* customize an appearance of work window: scale, fonts for digital panel and buttons, background color; +* customize an appearance of number in digital panel: leading zero for decimal, thousand separator, decimal separator, digit grouping; +* calculate total from clipboard (copy data to clipboard from table or text and press one button). + + +Files in digital-7_font.zip: + readme.txt this file; + digital-7.ttf digital-7 regular font; + digital-7 (italic).ttf digital-7 italic font; + digital-7 (mono).ttf digital-7 mono font; + digital-7 (mono italic).ttf digital-7 mono font. + +Please visit http://www.styleseven.com/ for download our other products as freeware as shareware. +We will welcome any useful suggestions and comments; please send them to ms-7@styleseven.com + + +FREEWARE USE (NOTES) +-=================- +Also you may: + * Use the font in freeware software (credit needed); + * Use the font for your education process. + + +COMMERCIAL OR BUSINESS USE +-========================- + +You can buy font for commercial use here ($24.95): http://store.esellerate.net/s.aspx?s=STR0331655240 +You may: + * Include the font to your installation; + * Use one license up to 100 computers in your office. +Please contact us for any questions. + + +WHAT IS NEW? +-==========- + + Version 1.01 April 05 2009 + -------------------------- + * Change Typeface name for fonts "Digital-7 (mono)" and "Digital-7 (italic)" (now available all fonts for select in application, for example Word Pad). + * Corrected symbol ':'. + + Version 1.01 April 07 2011 + -------------------------- + * Embedding is allowed. + + Version 1.1 June 07 2013 + -------------------------- + * Mono Italic font is added. + + +AUTHOR +-====- + +Sizenko Alexander +Style-7 +http://www.styleseven.com +Created: October 7 2008 \ No newline at end of file diff --git a/Software/PMR/Messages/Common/DoubleArray.proto b/Software/PMR/Messages/Common/DoubleArray.proto new file mode 100644 index 000000000..7543364da --- /dev/null +++ b/Software/PMR/Messages/Common/DoubleArray.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.Common; +option java_package = "com.twine.tango.pmr.common"; + +message DoubleArray +{ + repeated double Data = 1; +} \ No newline at end of file diff --git a/Software/PMR/Messages/Common/KeepAliveRequest.proto b/Software/PMR/Messages/Common/KeepAliveRequest.proto index fb47ee43c..a488b4f26 100644 --- a/Software/PMR/Messages/Common/KeepAliveRequest.proto +++ b/Software/PMR/Messages/Common/KeepAliveRequest.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package Tango.PMR.common; +package Tango.PMR.Common; option java_package = "com.twine.tango.pmr.common"; message KeepAliveRequest diff --git a/Software/PMR/Messages/Common/KeepAliveResponse.proto b/Software/PMR/Messages/Common/KeepAliveResponse.proto index 3a5f73f31..78ec5b296 100644 --- a/Software/PMR/Messages/Common/KeepAliveResponse.proto +++ b/Software/PMR/Messages/Common/KeepAliveResponse.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package Tango.PMR.common; +package Tango.PMR.Common; option java_package = "com.twine.tango.pmr.common"; message KeepAliveResponse diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index b53e1e0a3..bbdbe6505 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -5,16 +5,8 @@ option java_package = "com.twine.tango.pmr.common"; enum MessageType { - //Common - RGB = 0; - Job = 1; - Segment = 2; - //Hardware - //Dispenser; - //Motor; - //Gradient; - - + //The first enum value must be zero so.. + None = 0; //Stubs CalculateRequest = 3; @@ -52,16 +44,6 @@ enum MessageType StubExtFlashWriteRequest = 35; StubExtFlashWriteResponse = 36; - //work - //Hardware = 200; - Dispenser = 200; - Motor = 201; - Gradient = 202; - Dancer = 203; - InternalWinder = 204; - Dispense = 205; - SegmentGradient = 206; - //Integration ExternalBridgeUdpDiscoveryPacket = 1000; @@ -74,9 +56,10 @@ enum MessageType KeepAliveRequest = 1007; KeepAliveResponse = 1008; + //Diagnostics - StartDiagnosticsRequest = 2000; - StartDiagnosticsResponse = 2001; + PushDiagnosticsRequest = 2000; + PushDiagnosticsResponse = 2001; ReportRequest = 2002; ReportResponse = 2003; StatusResponse = 2004; diff --git a/Software/PMR/Messages/Diagnostics/PushDiagnosticsRequest.proto b/Software/PMR/Messages/Diagnostics/PushDiagnosticsRequest.proto index 2148bb18e..c2dc51b19 100644 --- a/Software/PMR/Messages/Diagnostics/PushDiagnosticsRequest.proto +++ b/Software/PMR/Messages/Diagnostics/PushDiagnosticsRequest.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message StartDiagnosticsRequest +message PushDiagnosticsRequest { bool PushSensors = 1; bool PushMotors = 2; diff --git a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto index b6e81c257..c5779d382 100644 --- a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto +++ b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto @@ -3,9 +3,12 @@ syntax = "proto3"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message StartDiagnosticsResponse +import "DoubleArray.proto"; + +message PushDiagnosticsResponse { repeated double Dancer1Angle = 1; repeated double Dancer2Angle = 2; repeated double Dancer3Angle = 3; + repeated PMR.Common.DoubleArray DispensersMotorsFrequency = 4; } \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4f045627d..08b8897d2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -22,6 +22,7 @@ using Tango.Video.DirectCapture; using Tango.Integration.Operators; using Tango.PMR.Diagnostics; using System.Reflection; +using Tango.PMR.Common; namespace Tango.MachineStudio.Developer.ViewModels { @@ -470,7 +471,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } } - private void MachineOperator_DiagnosticsDataAvailable(object sender, StartDiagnosticsResponse response) + private void MachineOperator_DiagnosticsDataAvailable(object sender, PushDiagnosticsResponse response) { foreach (var prop in response.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) { @@ -485,7 +486,8 @@ namespace Tango.MachineStudio.Developer.ViewModels } else { - //Multi Graph... + DoubleArray[] arrayOfDoubles = Enumerable.ToArray(prop.GetValue(response) as IEnumerable); + (controller as GraphMultiController).PushData(arrayOfDoubles.Select(x => x.Data.ToList()).ToList()); } } } @@ -911,11 +913,13 @@ namespace Tango.MachineStudio.Developer.ViewModels for (int i = 0; i < sensor.ChannelCount; i++) { + var randomColor = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor()); + (controller as GraphMultiController).AddSeries(new DataYSeries() { Name = sensor.Description.First().ToString() + (i + 1), UseFillAndStroke = true, - Stroke = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor()) + Stroke = randomColor }); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index cf5d1e19e..65837bcf1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -211,7 +211,7 @@ - +