From a04e1aaa43cb19e7b5bd18af7f06725fb5a920b2 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Apr 2019 13:02:04 +0300 Subject: Include OpenCV binaries in gitignore. --- .../OpenCV/bin/opencv_aruco330d.exp | Bin 0 -> 166117 bytes .../OpenCV/bin/opencv_aruco330d.lib | Bin 0 -> 279190 bytes .../OpenCV/bin/opencv_calib3d330d.exp | Bin 0 -> 185986 bytes .../OpenCV/bin/opencv_calib3d330d.lib | Bin 0 -> 314642 bytes .../OpenCV/bin/opencv_core330d.exp | Bin 0 -> 452112 bytes .../OpenCV/bin/opencv_core330d.lib | Bin 0 -> 752684 bytes .../OpenCV/bin/opencv_dnn330d.exp | Bin 0 -> 240989 bytes .../OpenCV/bin/opencv_dnn330d.lib | Bin 0 -> 401550 bytes .../OpenCV/bin/opencv_features2d330d.exp | Bin 0 -> 199127 bytes .../OpenCV/bin/opencv_features2d330d.lib | Bin 0 -> 338980 bytes .../OpenCV/bin/opencv_flann330d.exp | Bin 0 -> 116331 bytes .../OpenCV/bin/opencv_flann330d.lib | Bin 0 -> 197374 bytes .../OpenCV/bin/opencv_highgui330d.exp | Bin 0 -> 132361 bytes .../OpenCV/bin/opencv_highgui330d.lib | Bin 0 -> 225822 bytes .../OpenCV/bin/opencv_imgcodecs330d.exp | Bin 0 -> 113245 bytes .../OpenCV/bin/opencv_imgcodecs330d.lib | Bin 0 -> 194388 bytes .../OpenCV/bin/opencv_imgproc330d.exp | Bin 0 -> 200907 bytes .../OpenCV/bin/opencv_imgproc330d.lib | Bin 0 -> 342470 bytes .../OpenCV/bin/opencv_ml330d.exp | Bin 0 -> 141459 bytes .../OpenCV/bin/opencv_ml330d.lib | Bin 0 -> 237154 bytes .../OpenCV/bin/opencv_objdetect330d.exp | Bin 0 -> 142897 bytes .../OpenCV/bin/opencv_objdetect330d.lib | Bin 0 -> 244502 bytes .../OpenCV/bin/opencv_photo330d.exp | Bin 0 -> 161079 bytes .../OpenCV/bin/opencv_photo330d.lib | Bin 0 -> 272214 bytes .../OpenCV/bin/opencv_shape330d.exp | Bin 0 -> 135389 bytes .../OpenCV/bin/opencv_shape330d.lib | Bin 0 -> 228274 bytes .../OpenCV/bin/opencv_stitching330d.exp | Bin 0 -> 435599 bytes .../OpenCV/bin/opencv_stitching330d.lib | Bin 0 -> 734718 bytes .../OpenCV/bin/opencv_superres330d.exp | Bin 0 -> 164965 bytes .../OpenCV/bin/opencv_superres330d.lib | Bin 0 -> 280620 bytes .../OpenCV/bin/opencv_ts330d.lib | Bin 0 -> 15619832 bytes .../OpenCV/bin/opencv_video330d.exp | Bin 0 -> 132523 bytes .../OpenCV/bin/opencv_video330d.lib | Bin 0 -> 224086 bytes .../OpenCV/bin/opencv_videoio330d.exp | Bin 0 -> 119387 bytes .../OpenCV/bin/opencv_videoio330d.lib | Bin 0 -> 203624 bytes .../OpenCV/bin/opencv_videostab330d.exp | Bin 0 -> 313665 bytes .../OpenCV/bin/opencv_videostab330d.lib | Bin 0 -> 529376 bytes 37 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_aruco330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_aruco330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_core330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_core330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_dnn330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_dnn330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_features2d330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_features2d330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_flann330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_flann330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_highgui330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_highgui330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_ml330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_ml330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_photo330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_photo330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_shape330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_shape330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_stitching330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_stitching330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_superres330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_superres330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_ts330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_video330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_video330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_videoio330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_videoio330d.lib create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_videostab330d.exp create mode 100644 Software/External_Repositories/OpenCV/bin/opencv_videostab330d.lib (limited to 'Software') diff --git a/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.exp new file mode 100644 index 000000000..b863e4d98 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.lib new file mode 100644 index 000000000..cd11751a0 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_aruco330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.exp new file mode 100644 index 000000000..919eb06d7 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.lib new file mode 100644 index 000000000..e20981fe4 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_calib3d330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_core330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_core330d.exp new file mode 100644 index 000000000..07e5d841b Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_core330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_core330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_core330d.lib new file mode 100644 index 000000000..e290becdb Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_core330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.exp new file mode 100644 index 000000000..e5019b273 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.lib new file mode 100644 index 000000000..ac223e278 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_dnn330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.exp new file mode 100644 index 000000000..b7d300f68 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.lib new file mode 100644 index 000000000..24e758a2a Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_features2d330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_flann330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_flann330d.exp new file mode 100644 index 000000000..fcbd58789 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_flann330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_flann330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_flann330d.lib new file mode 100644 index 000000000..e9289d225 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_flann330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.exp new file mode 100644 index 000000000..82868b740 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.lib new file mode 100644 index 000000000..40fdbacf9 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_highgui330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.exp new file mode 100644 index 000000000..20e453c63 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.lib new file mode 100644 index 000000000..7a3697a81 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_imgcodecs330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.exp new file mode 100644 index 000000000..96a3b049b Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.lib new file mode 100644 index 000000000..6d1b134de Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_imgproc330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_ml330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_ml330d.exp new file mode 100644 index 000000000..498de9fea Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_ml330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_ml330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_ml330d.lib new file mode 100644 index 000000000..5f55bd260 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_ml330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.exp new file mode 100644 index 000000000..4c6535c66 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.lib new file mode 100644 index 000000000..9b72118bb Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_objdetect330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_photo330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_photo330d.exp new file mode 100644 index 000000000..955275f86 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_photo330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_photo330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_photo330d.lib new file mode 100644 index 000000000..9c6857b34 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_photo330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_shape330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_shape330d.exp new file mode 100644 index 000000000..c1ddd742b Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_shape330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_shape330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_shape330d.lib new file mode 100644 index 000000000..e7e4bcc71 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_shape330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.exp new file mode 100644 index 000000000..8c5266fbc Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.lib new file mode 100644 index 000000000..cccd130a7 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_stitching330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_superres330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_superres330d.exp new file mode 100644 index 000000000..3c29e616b Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_superres330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_superres330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_superres330d.lib new file mode 100644 index 000000000..f9ee92190 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_superres330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_ts330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_ts330d.lib new file mode 100644 index 000000000..a11b1f3ed Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_ts330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_video330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_video330d.exp new file mode 100644 index 000000000..980f49d6b Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_video330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_video330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_video330d.lib new file mode 100644 index 000000000..6d5a3c5b3 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_video330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.exp new file mode 100644 index 000000000..db7a33940 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.lib new file mode 100644 index 000000000..1a343fba1 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_videoio330d.lib differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.exp b/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.exp new file mode 100644 index 000000000..25687763d Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.exp differ diff --git a/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.lib b/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.lib new file mode 100644 index 000000000..c2cab1b20 Binary files /dev/null and b/Software/External_Repositories/OpenCV/bin/opencv_videostab330d.lib differ -- cgit v1.3.1 From f2a96237f63dd706a0e3cb1d87109c25229c5758 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Apr 2019 14:21:47 +0300 Subject: Working on TCC... --- .../Build/Shortcuts/Machine Studio.lnk | Bin 1581 -> 1516 bytes .../Models/CaptureConfig.cs | 7 +++++++ .../ViewModels/MainViewVM.cs | 12 ++++++++++++ .../Views/MainView.xaml | 9 +++++++++ .../TCC/Tango.TCC.BL/CardDetectionConfig.cs | 1 + .../Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs | 1 + .../TCC/Tango.TCC.CardDetector/CardDetection.cpp | Bin 10128 -> 10390 bytes .../Tango.TCC.CardDetector/CardDetectionConfig.h | 1 + 8 files changed, 31 insertions(+) (limited to 'Software') diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk index ff9db3779..34c82a731 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.ColorCapture/Models/CaptureConfig.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Models/CaptureConfig.cs index 9f54837cb..0b74f2b3f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Models/CaptureConfig.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Models/CaptureConfig.cs @@ -103,6 +103,13 @@ namespace Tango.MachineStudio.ColorCapture.Models set { _enableDoubleChecking = value; RaisePropertyChangedAuto(); } } + private bool _enforceBarcodeDetection; + public bool EnforceBarcodeDetection + { + get { return _enforceBarcodeDetection; } + set { _enforceBarcodeDetection = value; RaisePropertyChangedAuto(); } + } + public CaptureConfig() { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs index 21bb0baf0..5ea5747d5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs @@ -140,6 +140,14 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels set { _similarity = value; RaisePropertyChangedAuto(); } } + private String _barcode; + public String Barcode + { + get { return _barcode; } + set { _barcode = value; RaisePropertyChangedAuto(); } + } + + public RelayCommand ImportBenchmarksCommand { get; set; } public RelayCommand ExportBenchmarksCommand { get; set; } @@ -373,6 +381,7 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels DetectedSource = null; CaptureDeltaEController.Clear(); Similarity = 0; + Barcode = String.Empty; } private void OnSelectedVideoDeviceChanged(CaptureDevice previousDevice, CaptureDevice newDevice) @@ -407,6 +416,7 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels SimilarityTolerance = Config.SimilarityTolerance, HistogramMethod = Config.HistogramComparison, EnableDoubleChecking = Config.EnableDoubleChecking, + EnforceBarcodeDetection = Config.EnforceBarcodeDetection, }); if (result.Similarity > 0) @@ -442,6 +452,8 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels CapturedColor = Color.FromArgb(255, (byte)result.ColorDetectionOutput.RawColor.R, (byte)result.ColorDetectionOutput.RawColor.G, (byte)result.ColorDetectionOutput.RawColor.B); ProcessedColor = Color.FromArgb(255, (byte)result.ColorDetectionOutput.ProcessedColor.R, (byte)result.ColorDetectionOutput.ProcessedColor.G, (byte)result.ColorDetectionOutput.ProcessedColor.B); + Barcode = result.Barcode; + //calculate delta E. Lab measureLab = new Lab(MeasureL, MeasureA, MeasureB); DeltaE = measureLab.Compare(new Rgb(ProcessedColor.R, ProcessedColor.G, ProcessedColor.B), GetDeltaEComparison()); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml index d6f4890d7..ba8e3f281 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml @@ -276,6 +276,11 @@ + + + Barcode: + + @@ -582,6 +587,7 @@ + Columns @@ -637,6 +643,9 @@ Double Checking + + Enforce Barcode Detection + diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs index e63e0bdd1..b2b2bc197 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs @@ -19,6 +19,7 @@ namespace Tango.TCC.BL public double SimilarityTolerance { get; set; } public CardDetectionHistogramMethods HistogramMethod { get; set; } public bool EnableDoubleChecking { get; set; } + public bool EnforceBarcodeDetection { get; set; } public CardDetectionConfig() { diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs index 50bcceeba..221659868 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs @@ -66,6 +66,7 @@ namespace Tango.TCC.BL SimilarityTolerance = config.SimilarityTolerance, HistogramMethod = (int)config.HistogramMethod, EnableDoubleChecking = config.EnableDoubleChecking, + EnforceBarcodeDetection = config.EnforceBarcodeDetection, }); detectionResult.Similarity = result.Similarity; diff --git a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp index 174d2d549..25b523e58 100644 Binary files a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp and b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp differ diff --git a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h index 86d44ca34..90f3239be 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h +++ b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h @@ -17,6 +17,7 @@ namespace Tango property double SimilarityTolerance; property int HistogramMethod; property bool EnableDoubleChecking; + property bool EnforceBarcodeDetection; }; } } -- cgit v1.3.1 From e9aae57ef834adb1188b409db0cbee824b81a2bb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Apr 2019 14:25:27 +0300 Subject: Working on TCC... --- Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs | 2 ++ .../TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs | 1 + Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs | 5 +++++ Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config | 1 + 4 files changed, 9 insertions(+) (limited to 'Software') diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs index d6161e738..5ab6cfd6d 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs @@ -17,6 +17,7 @@ namespace Tango.TCC.BL.Web public double SimilarityTolerance { get; set; } public CardDetectionHistogramMethods HistogramMethod { get; set; } public bool EnableDoubleChecking { get; set; } + public bool EnforceBarcodeDetection { get; set; } public DefinitionResponse() { @@ -27,6 +28,7 @@ namespace Tango.TCC.BL.Web SimilarityTolerance = 50; HistogramMethod = CardDetectionHistogramMethods.Chi_Square; EnableDoubleChecking = true; + EnforceBarcodeDetection = true; } } } diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs index b3a4d4808..0c4111189 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs @@ -33,6 +33,7 @@ namespace Tango.TCC.Service.Controllers HistogramMethod = TCCServiceConfig.HISTOGRAM_METHOD, SimilarityTolerance = TCCServiceConfig.SIMILARITY_TOLERANCE, EnableDoubleChecking = TCCServiceConfig.ENABLE_DOUBLE_CHECKING, + EnforceBarcodeDetection = TCCServiceConfig.ENFORCE_BARCODE_DETECTION, }; } diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs b/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs index 8bedaefe9..14e9ef8cc 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs @@ -67,6 +67,11 @@ namespace Tango.TCC.Service /// public static bool ENABLE_DOUBLE_CHECKING => bool.Parse(ConfigurationManager.AppSettings[nameof(ENABLE_DOUBLE_CHECKING)].ToString()); + /// + /// Gets a value indicating whether the card will be detected only when barcode detection is successful. + /// + public static bool ENFORCE_BARCODE_DETECTION => bool.Parse(ConfigurationManager.AppSettings[nameof(ENFORCE_BARCODE_DETECTION)].ToString()); + /// /// Gets the mobile application ID. /// diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config b/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config index d2433dc9b..291a5baec 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config @@ -38,6 +38,7 @@ + -- cgit v1.3.1 From c36ea9eb28cd27cbf68187a0ce77536ca3442129 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 8 Apr 2019 15:09:28 +0300 Subject: version 1..3.8.41: Temperature reading every 100msec. throw max and min and calculate average each 1 second to avoid spikes. also, some improvements in heaters algorithm. --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 2 +- .../Embedded/Modules/Control/MillisecTask.c | 47 +++++- .../Embedded/Modules/Control/MillisecTask.h | 2 + .../Embedded/Modules/Diagnostics/Diagnostics.c | 22 +-- .../Embedded/Modules/Heaters/Heaters_print.c | 166 +++++++++++++-------- .../StateMachines/Initialization/PowerIdle.c | 26 ++-- 7 files changed, 178 insertions(+), 89 deletions(-) (limited to 'Software') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 030c4229e..0ef6a93b0 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,8,3}; +TangoVersion_t _gTangoVersion = {1,3,8,41}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 81c4a230b..c19dea78f 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -735,7 +735,7 @@ uint32_t AlarmHandlingLoop(uint32_t tick) switch (AlarmItem[Alarm_i].AlarmSource) { /*case ALARM_SOURCE_TYPE__TemperatureAlarm: - ivalue = TemperatureSensorRead((TEMPERATURE_SENSOR_ID_ENUM)AlarmItem[Alarm_i].DeviceId); + ivalue = MillisecGetTemperatures((TEMPERATURE_SENSOR_ID_ENUM)AlarmItem[Alarm_i].DeviceId); if (AlarmItem[Alarm_i].AlarmDirection == true) { if (ivalue/100 >= AlarmItem[Alarm_i].AlarmValue) diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index d34ac9ff9..193769265 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -445,6 +445,37 @@ uint32_t MillisecLoop(uint32_t tick) #endif return OK; } +int TemperatureSum[MAX_TEMPERATURE_SENSOR_ID]; +int TemperatureMin[MAX_TEMPERATURE_SENSOR_ID]; +int TemperatureMax[MAX_TEMPERATURE_SENSOR_ID]; +int TemperatureCount[MAX_TEMPERATURE_SENSOR_ID]; +int TemperatureCalc[MAX_TEMPERATURE_SENSOR_ID]; +void MillisecUpdateTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId,int temperature) +{ + //if(TemperatureCount[SensorId]++>=10) + // TemperatureCount[SensorId] = 0; + TemperatureCount[SensorId]++; + if (TemperatureMax[SensorId]temperature) TemperatureMin[SensorId]=temperature; + TemperatureSum[SensorId]+=temperature; +} +int MillisecCalculateTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId) +{ + int calc = 0; + TemperatureSum[SensorId]-=TemperatureMax[SensorId]; + TemperatureSum[SensorId]-=TemperatureMin[SensorId]; + calc = TemperatureSum[SensorId] / (TemperatureCount[SensorId]-2); + + TemperatureSum[SensorId] = 0; + TemperatureCount[SensorId] = 0; + TemperatureMin[SensorId] = 30000; + TemperatureMax[SensorId] = -30000; + return calc; +} +int MillisecGetTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId) +{ + return TemperatureCalc[SensorId]; +} uint32_t MillisecLowLoop(uint32_t tick) { uint8_t Motor_i,Disp_i,Heater_i,temp; @@ -454,9 +485,10 @@ uint32_t MillisecLowLoop(uint32_t tick) //call all modules Millisec functions //test dancers and speed encoders //check all callback units (state machine waiting for completion of a change) - bool Ten_msTick, Hundred_msTick, Onesecond_Tick,O900Millisecond_Tick,OneMinute_Tick; + bool Ten_msTick, Hundred_msTick , m90msecTick, Onesecond_Tick,O900Millisecond_Tick,OneMinute_Tick; Ten_msTick = (tick%eTenMillisecond == 0) ?true:false; Hundred_msTick = (tick%eHundredMillisecond == 0) ?true:false; + m90msecTick = (tick%eHundredMillisecond == 90) ?true:false; O900Millisecond_Tick = (tick%eOneSecond == 900) ?true:false; Onesecond_Tick = (tick%eOneSecond == 0) ?true:false; OneMinute_Tick = (tick%eOneMinute == 0) ?true:false; @@ -471,13 +503,20 @@ uint32_t MillisecLowLoop(uint32_t tick) if(Machine_Idle_Mode == true) Machine_Idle_Breathing_Led(); } + if (m90msecTick) + { + for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++) + { + MillisecReadFromTempSensor(Sensor_i, NULL); + } + } if (Hundred_msTick) { Speed_Data = Calculate_Speed_Sensor_Velocity(); Read_Buttons_Reg(); for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++) { - MillisecReadFromTempSensor(Sensor_i, NULL); + MillisecUpdateTemperatures (Sensor_i,TemperatureSensorRead(Sensor_i)); } if (GeneralHwReady == true) { @@ -517,6 +556,10 @@ uint32_t MillisecLowLoop(uint32_t tick) Read_Heaters_Current(Heater_i); } Gas_PPM = Calculate_Gas_Power_Consumption(); + for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++) + { + TemperatureCalc[Sensor_i] = MillisecCalculateTemperatures ( Sensor_i); + } } if (OneMinute_Tick) { diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index 064302685..be82d9e98 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -33,6 +33,8 @@ float getSensorSpeedData(void); uint32_t getDrawerFansStatus(void); uint32_t getSystemFansStatus(void); uint8_t getGasReading(void); +int MillisecGetTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId); + void MillisecInit(void); void MillisecStop(void); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index c936d842c..a5f36d6a1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -331,17 +331,17 @@ void Diagnostic100msecCollection(void) DiagnosticLoadMotor(WINDER_MOTOR, ThreadGetMotorSpeed (WINDER_MOTOR)); DiagnosticLoadMotor(SCREW_MOTOR, ThreadGetMotorSpeed (SCREW_MOTOR)); } - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__MixerHeater, TemperatureSensorRead( MIXER_PT100)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6, TemperatureSensorRead(HEAD6_PT100)); - - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__MixerHeater, MillisecGetTemperatures( MIXER_PT100)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DYEINGH_TEMP1)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DYEINGH_TEMP2)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DYEINGH_TEMP3)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DYEINGH_TEMP4)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DYEINGH_TEMP5)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6, MillisecGetTemperatures(HEAD6_PT100)); + + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DRYER_TEMP1)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DRYER_TEMP2)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, MillisecGetTemperatures(TEMP_SENSE_ANALOG_DRYER_TEMP3)); for (i=0;i #include @@ -205,8 +206,8 @@ uint32_t LoadHeaterSetPoint(HeaterType HeaterType) void LoadHeaterState(HeaterType HeaterType,HeaterState *HeaterState) { int HeaterId = HeaterType; - double temp = TemperatureSensorRead(HeaterId2PT100Id[HeaterId]); - //double temp = HeaterPreviousRead[HeaterId];//TemperatureSensorRead(HeaterId2PT100Id[HeaterId]); + double temp = MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]); + //double temp = HeaterPreviousRead[HeaterId];//MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]); HeaterState->has_heatertype = true; HeaterState->heatertype = HeaterType; @@ -214,7 +215,7 @@ void LoadHeaterState(HeaterType HeaterType,HeaterState *HeaterState) HeaterState->setpoint = HeaterCmd[HeaterId].targettemperatue/100; // HeaterState->setpoint = DCTimeSliceAllocation[HeaterId]*100/NumberOFSlicesInUse; HeaterState->has_currentvalue = true; - HeaterState->currentvalue = temp/100;//TemperatureSensorRead(HeaterId2PT100Id[HeaterId])/100; + HeaterState->currentvalue = temp/100;//MillisecGetTemperatures(HeaterId2PT100Id[HeaterId])/100; HeaterState->has_isactive = true; HeaterState->isactive = GetHeaterState(HeaterId); HeaterState->has_isrampingup = true; @@ -399,7 +400,7 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) } else { - HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);// + HeaterPreviousRead[HeaterId] = MillisecGetTemperatures(HeaterId);// LOG_ERROR(HeaterId,"ReRead Heater Temp"); }*/ PrepareHeater(HeaterId,Temperature); //prepare the heaters control info @@ -430,12 +431,12 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) { if (ControlIdtoHeaterId [HeaterId] == 0xFF) { - ControlIdtoHeaterId [HeaterId] = AddControlCallback( HeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),DryerInternalPT100Id,0); - //HeaterPreviousRead[HeaterId] = TemperatureSensorRead(DryerInternalPT100Id); - HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);// + ControlIdtoHeaterId [HeaterId] = AddControlCallback( HeaterControlCBFunction, Frequency/*eOneSecond*/,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),DryerInternalPT100Id,0); + //HeaterPreviousRead[HeaterId] = MillisecGetTemperatures(DryerInternalPT100Id); + HeaterPreviousRead[HeaterId] = MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]);// //Report("PrepareHeater AC Read", __FILE__,HeaterId, SetTemperatue, RpWarning,HeaterPreviousRead[HeaterId], 0); - HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);//TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); - HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);// = TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); + HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]);//MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); + HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]);// = MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); } //turn all alarms off AlarmHandlingSetAlarm(HeaterUnderEventType[HeaterId], false); @@ -443,7 +444,7 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) AlarmHandlingSetAlarm(HeaterEventType[HeaterId], false); if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) - ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); @@ -451,9 +452,9 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 0); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, 0); if (MainDryerHeaterMaxTempControl == 0xFF) - MainDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain],0); + MainDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain],0); if (SecondDryerHeaterMaxTempControl == 0xFF) - SecondDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary],0); + SecondDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary],0); //InitialHeating = true; HeaterReady[HeaterId] = false; if (BlowerCfg.enabled == true) @@ -478,7 +479,7 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) { if (ControlIdtoHeaterId [HeaterId] == 0xFF) - ControlIdtoHeaterId [HeaterId] = AddControlCallback( DCHeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + ControlIdtoHeaterId [HeaterId] = AddControlCallback( DCHeaterControlCBFunction, Frequency/*eOneSecond*/,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); //HeaterPIDConfig[HeaterId].m_params.dt *=10; //DCInitialHeating[HeaterId] = true; HeaterReady[HeaterId] = false; @@ -491,7 +492,7 @@ int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) Enable_Reading_Heaters_Current(HeaterId2CurrentId[HeaterId]); - HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);//TemperatureSensorRead(HeaterId2PT100Id[HeaterId]); + HeaterPreviousRead[HeaterId] = MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]);//MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]); if((abs(HeaterPreviousRead[HeaterId]-MINIMUM_HEATER_READ)<1)||(abs(MAXIMUM_HEATER_READ-HeaterPreviousRead[HeaterId])<10)) { LOG_ERROR (HeaterId,"PT100 not working properly"); @@ -499,7 +500,7 @@ int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) } //Report("PrepareHeater Read", __FILE__,HeaterId, SetTemperatue, RpWarning,HeaterPreviousRead[HeaterId], 0); if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) - ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); return OK; } @@ -538,12 +539,17 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue) HeaterPIDConfig[HeaterId].m_preError = 0; HeaterPIDConfig[HeaterId].m_SetParam = SetTemperatue*100;//need to update SetParams on presegment stage - temp = SetTemperatue*(100+HeaterControl[HeaterId].outputproportionalband); - temp = SetTemperatue*110.0; + int band = 5; + if (HeaterControl[HeaterId].outputproportionalband) + { + band = HeaterControl[HeaterId].outputproportionalband; + } + temp = SetTemperatue*(100+band); + //temp = SetTemperatue*110.0; HeaterControl[HeaterId].sensormaxvalue = (int)temp; - temp = SetTemperatue*(100-HeaterControl[HeaterId].outputproportionalband); - temp = SetTemperatue*90.0; + temp = SetTemperatue*(100-band); + //temp = SetTemperatue*90.0; HeaterControl[HeaterId].sensorminvalue = (int)temp; if (HeaterPIDConfig[HeaterId].m_params.IntegralErrorMultiplier) @@ -606,13 +612,11 @@ uint32_t MainPT100Read = 0,SecondaryPT100Read = 0; #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif -uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) +uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; - int32_t MaxreadValue = max (MainPT100Read,SecondaryPT100Read); - int32_t MinreadValue = min (MainPT100Read,SecondaryPT100Read); - /*char str[100]; - uint8_t len = 0;*/ + int32_t MaxreadValue; + int32_t MinreadValue; if (IfIndex>>8 != IfTypeHeaters) { LOG_ERROR (IfIndex, "Wrong Interface type"); @@ -624,11 +628,15 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) LOG_ERROR (IfIndex, "Wrong Interface "); return 0xFFFFFFFF; } - int32_t readValue = TemperatureSensorRead(HeaterId2PT100Id[index]); + //int32_t readValue = MillisecGetTemperatures(HeaterId2PT100Id[index]); if (abs(readValue - HeaterPreviousRead[index])>2000) { Report("Temperature Spike",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return ERROR; } HeaterPreviousRead[index] = readValue; @@ -640,19 +648,24 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) { SecondaryPT100Read = readValue; } + MaxreadValue = max (MainPT100Read,SecondaryPT100Read); + MinreadValue = min (MainPT100Read,SecondaryPT100Read); + if ((MaxreadValue) >= HeaterControl[index].sensormaxvalue) { if (HeaterMaxTempFlag[index] == false) { - // LOG_ERROR (MaxreadValue/100, "Heater Over the max temperature, turned off"); + LOG_ERROR (MaxreadValue/100, "Heater Over the max temperature, turned off"); } DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = true; + //HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = true; + //HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } - if ((MinreadValue) <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) + if ((MaxreadValue) <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue { if (HeaterControl[index].sensorminvalue > 0) { @@ -663,7 +676,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) { ActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); }*/ - // LOG_ERROR ((MinreadValue/100), "Heater Cooled Off max temperature, turned on"); + LOG_ERROR ((MinreadValue/100), "Heater Cooled Off max temperature, turned on"); } HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = false; HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = false; @@ -672,7 +685,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) } return ERROR; } -uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) +uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; if (IfIndex>>8 != IfTypeHeaters) @@ -681,7 +694,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) return 0xFFFFFFFF; } index = IfIndex&0xFF; - int32_t readValue = TemperatureSensorRead(HeaterId2PT100Id[index]); + //int32_t readValue = MillisecGetTemperatures(HeaterId2PT100Id[index]); if (HeaterControl[index].sensormaxvalue == 0) return OK; if ((HeaterPreviousRead[index]) >= HeaterControl[index].sensormaxvalue) @@ -689,6 +702,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) if(OverHeatCounter[index]++ >=Overheat_Count_Limit) { OverHeatCounter[index] = Overheat_Count_Limit; + HeaterReady[index] = false; if (JobIsActive()&&(HeaterReady[index]==true)) { JobEndReason = JOB_TEMPERATURE_ALARM; @@ -711,6 +725,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) if(UnderHeatCounter[index]++ >=Underheat_Count_Limit) { UnderHeatCounter[index] = Underheat_Count_Limit; + HeaterReady[index] = false; if (JobIsActive()&&(HeaterReady[index]==true)) { JobEndReason = JOB_TEMPERATURE_ALARM; @@ -719,7 +734,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) LOG_ERROR(index, "Temperature Error"); return OK; } - HeaterMinTempFlag[index] = true; + //HeaterMinTempFlag[index] = true; // Report("Heater under the min temperature",__FILE__,__LINE__,index,RpWarning,HeaterPreviousRead[index], HeaterControl[index].sensormaxvalue); if (HeaterReady[index]==false) AlarmHandlingSetAlarm(HeaterUnderEventType[index], true); @@ -763,17 +778,21 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if (IfIndex>>8 != IfTypeHeaters) { LOG_ERROR (IfIndex, "Wrong Interface type"); - return 0xFFFFFFFF; + return ERROR; } index = IfIndex&0xFF; if (index != HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature) //AC Heaters { LOG_ERROR (IfIndex, "Wrong Interface "); - return 0xFFFFFFFF; + return ERROR; } if (HeaterCmd[index].targettemperatue == 0) { - DeActivateHeater(index); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + //Heaters OFF until coming into the proportional band + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); //LOG_ERROR (0, "unconfigured"); return ERROR; } @@ -782,7 +801,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) Report("AC Temperature Spike",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); if (readValue > HeaterCmd[index].targettemperatue) { - DeActivateHeater(index); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); } @@ -1031,7 +1051,7 @@ void EightMilliSecondHeatersInterrupt(UArg arg0) return ; } - +int HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__MixerHeater+1] = {28000,28000,28000,17000,17000,17000,17000,17000,17000,11000}; uint32_t HeatersControlLoop(uint32_t tick) { //char str[100]; @@ -1041,45 +1061,69 @@ uint32_t HeatersControlLoop(uint32_t tick) ,SliceCounter,TimeSliceAllocation[SliceCounter],HeatersRestart,NumberOFSlicesInUse); Report(str, __FILE__,__LINE__,0, RpMessage, SliceCounter, TimeSliceAllocation[SliceCounter]); */ - static bool first = true; + /*static bool first = true; if (first == true) { first = false; + }*/ + if ((MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain])>HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain])| + (MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary])>HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary])) + { + Report("AC Disaster Temperature ",__FILE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]),RpWarning,HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary], 0); + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); } - if (HeaterReady[HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature] == true) + else { - if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain) + if (HeaterReady[HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature] == true) { - if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] == false) + if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain) { - //If HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain should be active - //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain - ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] == false) + { + //If HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain should be active + //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain + ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + } } - } - else if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary) - { - if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] == false) + else if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary) { - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); - //If HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary should be active - //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary - ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] == false) + { + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + //If HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary should be active + //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary + ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + } + } + else + { + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); } - } - else - { - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); } } for ( DcHeaterId = HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1; DcHeaterId<= HARDWARE_PID_CONTROL_TYPE__MixerHeater;DcHeaterId++) { + if (MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId])>HeaterDisasterTemp[DcHeaterId]) + { + if (HeaterCmd[DcHeaterId].targettemperatue) + Report("DC Disaster Temperature ",__FILE__,DcHeaterId,MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId]),RpWarning,HeaterDisasterTemp[DcHeaterId], DcHeaterId); + DeActivateHeater (DcHeaterId); + continue; + } + if ( MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId] 0) //heater active diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c index 22b30748f..2db4474f7 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c @@ -36,17 +36,17 @@ void PowerIdleSetIdle(void) { memcpy (&ActiveProcessParameters,&ProcessParametersKeep,sizeof(ProcessParameters)); ProcessParameters ProcessParametersClear; - ProcessParametersClear.dryerzone1temp = 80; - ProcessParametersClear.dryerzone2temp = 80; - ProcessParametersClear.dryerzone3temp = 80; - ProcessParametersClear.mixertemp = 0; - ProcessParametersClear.headzone1temp = 80; - ProcessParametersClear.headzone2temp = 80; - ProcessParametersClear.headzone3temp = 80; - ProcessParametersClear.headzone4temp = 80; - ProcessParametersClear.headzone5temp = 80; - ProcessParametersClear.headzone6temp = 80; - ProcessParametersClear.dyeingspeed = 40; + ProcessParametersClear.dryerzone1temp = (ActiveProcessParameters.dryerzone1temp<80)? ActiveProcessParameters.dryerzone1temp:80; + ProcessParametersClear.dryerzone2temp = (ActiveProcessParameters.dryerzone2temp<80)? ActiveProcessParameters.dryerzone2temp:80; + ProcessParametersClear.dryerzone3temp = (ActiveProcessParameters.dryerzone3temp<80)? ActiveProcessParameters.dryerzone3temp:80; + ProcessParametersClear.mixertemp = (ActiveProcessParameters.mixertemp <80)? ActiveProcessParameters.mixertemp :80; + ProcessParametersClear.headzone1temp = (ActiveProcessParameters.headzone1temp <80)? ActiveProcessParameters.headzone1temp :80; + ProcessParametersClear.headzone2temp = (ActiveProcessParameters.headzone2temp <80)? ActiveProcessParameters.headzone2temp :80; + ProcessParametersClear.headzone3temp = (ActiveProcessParameters.headzone3temp <80)? ActiveProcessParameters.headzone3temp :80; + ProcessParametersClear.headzone4temp = (ActiveProcessParameters.headzone4temp <80)? ActiveProcessParameters.headzone4temp :80; + ProcessParametersClear.headzone5temp = (ActiveProcessParameters.headzone5temp <80)? ActiveProcessParameters.headzone5temp :80; + ProcessParametersClear.headzone6temp = (ActiveProcessParameters.headzone6temp <80)? ActiveProcessParameters.headzone6temp :80; + ProcessParametersClear.dyeingspeed = (ActiveProcessParameters.dyeingspeed <40)? ActiveProcessParameters.dyeingspeed :40; if (HandleProcessParameters(&ProcessParametersClear)!= OK) { LOG_ERROR (1, "Turn Heaters idle failed"); @@ -75,7 +75,7 @@ uint32_t PowerIdleCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { Report("PowerIdle Idle activated ",__FILE__,__LINE__,(int)powerIdleSecondsLimit,RpWarning,(int)powerIdleSecondsCounter,0); powerIdleState = true; - //SetPowerMachineState(sttIDLE); + SetPowerMachineState(sttIDLE); //move to idle state PowerIdleSetIdle(); } @@ -103,7 +103,7 @@ void PowerIdleOutOfIdleState(void) if (powerIdleState == true) { powerIdleState = false; - //SetPowerMachineState(sttON); + SetPowerMachineState(sttON); if (HandleProcessParameters(&ActiveProcessParameters)!= OK) { LOG_ERROR (1, "Turn Heaters active failed"); -- cgit v1.3.1 From 3d49ec50e986dd17238ac272bbee450888ae318e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Apr 2019 19:18:31 +0300 Subject: Working on TCC.. --- .../colorcapture/controls/ToggleImageButton.java | 122 +++++++++++++++++++++ .../twine/colorcapture/mvvm/BindingAdapters.java | 9 ++ .../twine/colorcapture/mvvm/BindingConverters.java | 17 +++ .../colorcapture/views/home/HomeFragment.java | 39 ++++--- .../views/loading/LoadingFragmentVM.java | 4 +- .../colorcapture/views/main/MainActivity.java | 11 +- .../colorcapture/views/main/MainActivityVM.java | 25 +++++ .../app/src/main/res/drawable-hdpi/logo.png | Bin 0 -> 14712 bytes .../app/src/main/res/drawable-hdpi/more_normal.png | Bin 0 -> 2778 bytes .../src/main/res/drawable-hdpi/more_selected.png | Bin 0 -> 6366 bytes .../app/src/main/res/drawable-hdpi/my_colors.png | Bin 0 -> 3888 bytes .../app/src/main/res/drawable-hdpi/selected.png | Bin 0 -> 8549 bytes .../app/src/main/res/drawable-hdpi/twine_logo.png | Bin 0 -> 11261 bytes .../main/res/drawable-hdpi/twinesnap_normal.png | Bin 0 -> 3585 bytes .../main/res/drawable-hdpi/twinesnap_selected.png | Bin 0 -> 7914 bytes .../app/src/main/res/drawable-mdpi/logo.png | Bin 0 -> 9261 bytes .../app/src/main/res/drawable-mdpi/more_normal.png | Bin 0 -> 1658 bytes .../src/main/res/drawable-mdpi/more_selected.png | Bin 0 -> 3457 bytes .../app/src/main/res/drawable-mdpi/my_colors.png | Bin 0 -> 2340 bytes .../app/src/main/res/drawable-mdpi/selected.png | Bin 0 -> 4651 bytes .../app/src/main/res/drawable-mdpi/twine_logo.png | Bin 0 -> 7143 bytes .../main/res/drawable-mdpi/twinesnap_normal.png | Bin 0 -> 2208 bytes .../main/res/drawable-mdpi/twinesnap_selected.png | Bin 0 -> 4338 bytes .../app/src/main/res/drawable-xhdpi/logo.png | Bin 0 -> 21247 bytes .../src/main/res/drawable-xhdpi/more_normal.png | Bin 0 -> 3755 bytes .../src/main/res/drawable-xhdpi/more_selected.png | Bin 0 -> 9912 bytes .../app/src/main/res/drawable-xhdpi/my_colors.png | Bin 0 -> 5574 bytes .../app/src/main/res/drawable-xhdpi/selected.png | Bin 0 -> 12524 bytes .../app/src/main/res/drawable-xhdpi/twine_logo.png | Bin 0 -> 16023 bytes .../main/res/drawable-xhdpi/twinesnap_normal.png | Bin 0 -> 4973 bytes .../main/res/drawable-xhdpi/twinesnap_selected.png | Bin 0 -> 12333 bytes .../app/src/main/res/drawable-xxhdpi/logo.png | Bin 0 -> 35163 bytes .../src/main/res/drawable-xxhdpi/more_normal.png | Bin 0 -> 6055 bytes .../src/main/res/drawable-xxhdpi/more_selected.png | Bin 0 -> 19207 bytes .../app/src/main/res/drawable-xxhdpi/my_colors.png | Bin 0 -> 8326 bytes .../app/src/main/res/drawable-xxhdpi/selected.png | Bin 0 -> 23601 bytes .../src/main/res/drawable-xxhdpi/twine_logo.png | Bin 0 -> 26389 bytes .../main/res/drawable-xxhdpi/twinesnap_normal.png | Bin 0 -> 7911 bytes .../res/drawable-xxhdpi/twinesnap_selected.png | Bin 0 -> 23276 bytes .../app/src/main/res/drawable-xxxhdpi/logo.png | Bin 0 -> 51829 bytes .../src/main/res/drawable-xxxhdpi/more_normal.png | Bin 0 -> 8485 bytes .../main/res/drawable-xxxhdpi/more_selected.png | Bin 0 -> 31105 bytes .../src/main/res/drawable-xxxhdpi/my_colors.png | Bin 0 -> 11825 bytes .../app/src/main/res/drawable-xxxhdpi/selected.png | Bin 0 -> 37818 bytes .../src/main/res/drawable-xxxhdpi/twine_logo.png | Bin 0 -> 38186 bytes .../main/res/drawable-xxxhdpi/twinesnap_normal.png | Bin 0 -> 10943 bytes .../res/drawable-xxxhdpi/twinesnap_selected.png | Bin 0 -> 37678 bytes .../src/main/res/drawable/background_gradient.xml | 8 ++ .../app/src/main/res/drawable/border.xml | 8 ++ .../app/src/main/res/drawable/border_shadow.xml | 19 ++++ .../app/src/main/res/layout/activity_main.xml | 40 ++++--- .../app/src/main/res/layout/fragment_capture.xml | 26 +++-- .../app/src/main/res/layout/fragment_loading.xml | 50 ++++----- .../app/src/main/res/values/colors.xml | 2 + .../app/src/main/res/values/strings.xml | 2 + .../app/src/main/res/values/styles.xml | 6 + Software/Android_Studio/settings.jar | Bin 0 -> 5837 bytes Software/DB/TCC/TCC.mdf | Bin 8388608 -> 8388608 bytes Software/DB/TCC/TCC_log.ldf | Bin 8388608 -> 8388608 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Graphics/Mobile/zeplin/drawable-hdpi/logo.png | Bin 0 -> 14712 bytes .../Mobile/zeplin/drawable-hdpi/more_normal.png | Bin 0 -> 2778 bytes .../Mobile/zeplin/drawable-hdpi/more_selected.png | Bin 0 -> 6366 bytes .../Mobile/zeplin/drawable-hdpi/my_colors.png | Bin 0 -> 3888 bytes .../Mobile/zeplin/drawable-hdpi/selected.png | Bin 0 -> 8549 bytes .../zeplin/drawable-hdpi/twinesnap_normal.png | Bin 0 -> 3585 bytes .../zeplin/drawable-hdpi/twinesnap_selected.png | Bin 0 -> 7914 bytes .../Graphics/Mobile/zeplin/drawable-mdpi/logo.png | Bin 0 -> 9261 bytes .../Mobile/zeplin/drawable-mdpi/more_normal.png | Bin 0 -> 1658 bytes .../Mobile/zeplin/drawable-mdpi/more_selected.png | Bin 0 -> 3457 bytes .../Mobile/zeplin/drawable-mdpi/my_colors.png | Bin 0 -> 2340 bytes .../Mobile/zeplin/drawable-mdpi/selected.png | Bin 0 -> 4651 bytes .../zeplin/drawable-mdpi/twinesnap_normal.png | Bin 0 -> 2208 bytes .../zeplin/drawable-mdpi/twinesnap_selected.png | Bin 0 -> 4338 bytes .../Graphics/Mobile/zeplin/drawable-xhdpi/logo.png | Bin 0 -> 21247 bytes .../Mobile/zeplin/drawable-xhdpi/more_normal.png | Bin 0 -> 3755 bytes .../Mobile/zeplin/drawable-xhdpi/more_selected.png | Bin 0 -> 9912 bytes .../Mobile/zeplin/drawable-xhdpi/my_colors.png | Bin 0 -> 5574 bytes .../Mobile/zeplin/drawable-xhdpi/selected.png | Bin 0 -> 12524 bytes .../zeplin/drawable-xhdpi/twinesnap_normal.png | Bin 0 -> 4973 bytes .../zeplin/drawable-xhdpi/twinesnap_selected.png | Bin 0 -> 12333 bytes .../Mobile/zeplin/drawable-xxhdpi/logo.png | Bin 0 -> 35163 bytes .../Mobile/zeplin/drawable-xxhdpi/more_normal.png | Bin 0 -> 6055 bytes .../zeplin/drawable-xxhdpi/more_selected.png | Bin 0 -> 19207 bytes .../Mobile/zeplin/drawable-xxhdpi/my_colors.png | Bin 0 -> 8326 bytes .../Mobile/zeplin/drawable-xxhdpi/selected.png | Bin 0 -> 23601 bytes .../zeplin/drawable-xxhdpi/twinesnap_normal.png | Bin 0 -> 7911 bytes .../zeplin/drawable-xxhdpi/twinesnap_selected.png | Bin 0 -> 23276 bytes .../Mobile/zeplin/drawable-xxxhdpi/logo.png | Bin 0 -> 51829 bytes .../Mobile/zeplin/drawable-xxxhdpi/more_normal.png | Bin 0 -> 8485 bytes .../zeplin/drawable-xxxhdpi/more_selected.png | Bin 0 -> 31105 bytes .../Mobile/zeplin/drawable-xxxhdpi/my_colors.png | Bin 0 -> 11825 bytes .../Mobile/zeplin/drawable-xxxhdpi/selected.png | Bin 0 -> 37818 bytes .../zeplin/drawable-xxxhdpi/twinesnap_normal.png | Bin 0 -> 10943 bytes .../zeplin/drawable-xxxhdpi/twinesnap_selected.png | Bin 0 -> 37678 bytes 96 files changed, 319 insertions(+), 69 deletions(-) create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/ToggleImageButton.java create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingAdapters.java create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingConverters.java create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable/background_gradient.xml create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border.xml create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_shadow.xml create mode 100644 Software/Android_Studio/settings.jar create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/logo.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/more_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/more_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/my_colors.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/twinesnap_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-hdpi/twinesnap_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/logo.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/more_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/more_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/my_colors.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/twinesnap_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-mdpi/twinesnap_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/logo.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/more_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/more_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/my_colors.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/twinesnap_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xhdpi/twinesnap_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/logo.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/more_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/more_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/my_colors.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/twinesnap_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxhdpi/twinesnap_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/logo.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/more_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/more_selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/my_colors.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/selected.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/twinesnap_normal.png create mode 100644 Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/twinesnap_selected.png (limited to 'Software') diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/ToggleImageButton.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/ToggleImageButton.java new file mode 100644 index 000000000..466b6de7e --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/controls/ToggleImageButton.java @@ -0,0 +1,122 @@ +package com.twine.colorcapture.controls; + +import android.content.Context; +import android.content.res.TypedArray; +import android.databinding.BindingAdapter; +import android.databinding.BindingMethod; +import android.databinding.InverseBindingAdapter; +import android.databinding.InverseBindingListener; +import android.databinding.InverseBindingMethod; +import android.databinding.InverseBindingMethods; +import android.graphics.drawable.Drawable; +import android.util.AttributeSet; +import android.widget.Checkable; + +import com.twine.colorcapture.R; + +public class ToggleImageButton extends android.support.v7.widget.AppCompatImageButton implements Checkable +{ + private OnCheckedChangeListener onCheckedChangeListener; + private Drawable normalImage; + private Drawable checkedImage; + + public ToggleImageButton(Context context) + { + super(context); + } + + public ToggleImageButton(Context context, AttributeSet attrs) + { + super(context, attrs); + setAttributes(attrs); + } + + public ToggleImageButton(Context context, AttributeSet attrs, int defStyle) + { + super(context, attrs, defStyle); + setAttributes(attrs); + } + + private void setAttributes(AttributeSet attrs) + { + TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ToggleImageButton); + + normalImage = getContext().getDrawable(a.getResourceId(R.styleable.ToggleImageButton_normalImage, 0)); + checkedImage = getContext().getDrawable(a.getResourceId(R.styleable.ToggleImageButton_checkedImage, 0)); + + setChecked(a.getBoolean(R.styleable.ToggleImageButton_android_checked, false)); + a.recycle(); + } + + @Override + public boolean isChecked() + { + return isSelected(); + } + + @Override + public void setChecked(boolean checked) + { + setSelected(checked); + + if (checked) + { + setImageDrawable(checkedImage); + } + else + { + setImageDrawable(normalImage); + } + + if (onCheckedChangeListener != null) + { + onCheckedChangeListener.onCheckedChanged(this, checked); + } + } + + @Override + public void toggle() + { + setChecked(!isChecked()); + } + + @Override + public boolean performClick() + { + toggle(); + return super.performClick(); + } + + public OnCheckedChangeListener getOnCheckedChangeListener() + { + return onCheckedChangeListener; + } + + public void setOnCheckedChangeListener(OnCheckedChangeListener onCheckedChangeListener) + { + this.onCheckedChangeListener = onCheckedChangeListener; + } + + public static interface OnCheckedChangeListener + { + public void onCheckedChanged(ToggleImageButton buttonView, boolean isChecked); + } + + @BindingAdapter(value = "cccAttrChanged") + public static void createCheckedBinding(ToggleImageButton btn, InverseBindingListener listener) + { + btn.setOnCheckedChangeListener((e, r) -> listener.onChange()); + } + + @BindingAdapter("ccc") + public static void setChecked(ToggleImageButton view, boolean value) + { + view.setChecked(value); + } + + @InverseBindingAdapter(attribute = "ccc") + public static boolean getChecked(ToggleImageButton view) + { + return view.isChecked(); + } +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingAdapters.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingAdapters.java new file mode 100644 index 000000000..41bfb052b --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingAdapters.java @@ -0,0 +1,9 @@ +package com.twine.colorcapture.mvvm; + +import android.databinding.BindingConversion; +import android.databinding.InverseBindingMethod; + +public class BindingAdapters +{ + +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingConverters.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingConverters.java new file mode 100644 index 000000000..929d1ee0e --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/BindingConverters.java @@ -0,0 +1,17 @@ +package com.twine.colorcapture.mvvm; + +import android.databinding.BindingConversion; +import android.databinding.InverseBindingMethod; + +public class BindingConverters +{ +// @BindingConversion +// public static boolean toInt(Boolean value) { +// return value; +// } +// +// @InverseBindingMethod() +// public static int toObject(int number) { +// return number; +// } +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/home/HomeFragment.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/home/HomeFragment.java index 76bdfe20f..4dc05b81d 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/home/HomeFragment.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/home/HomeFragment.java @@ -1,4 +1,5 @@ package com.twine.colorcapture.views.home; + import android.Manifest; import android.content.pm.PackageManager; import android.os.Build; @@ -15,37 +16,39 @@ import com.twine.colorcapture.mvvm.FragmentBase; public class HomeFragment extends FragmentBase implements IHomeFragment { private IAction1 cameraAccessAction; - + public HomeFragment() { // Required empty public constructor } - + @Override protected int getLayoutId() { return R.layout.fragment_home; } - + @Override protected void inject() { App.getComponent().inject(this); } - + @Override public String getTitle() { return "Home"; } - + @Override public void requestCameraAccess(IAction1 action) { cameraAccessAction = action; - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - if (ContextCompat.checkSelfPermission(this.getActivity(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) + { + if (ContextCompat.checkSelfPermission(this.getActivity(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) + { ActivityCompat.requestPermissions(this.getActivity(), new String[]{Manifest.permission.CAMERA}, 1); @@ -56,17 +59,23 @@ public class HomeFragment extends FragmentBase 0 - && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + && grantResults[0] == PackageManager.PERMISSION_GRANTED) + { cameraAccessAction.invoke(true); - } else { + } + else + { cameraAccessAction.invoke(false); } } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/loading/LoadingFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/loading/LoadingFragmentVM.java index ecce7a74e..39a93450e 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/loading/LoadingFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/loading/LoadingFragmentVM.java @@ -31,7 +31,7 @@ public class LoadingFragmentVM extends ViewModelBase { super.onViewAttached(view); - new CountDownTimer(2000,50) + new CountDownTimer(5000,50) { @Override @@ -44,7 +44,7 @@ public class LoadingFragmentVM extends ViewModelBase public void onFinish() { loadingProgress.set(2000); - navigationProvider.navigateTo(NavigationView.Home, false); + navigationProvider.navigateTo(NavigationView.Capture, false); } }.start(); } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/MainActivity.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/MainActivity.java index 74e3d5707..5ff99751f 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/MainActivity.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/MainActivity.java @@ -8,6 +8,8 @@ import android.support.v4.widget.DrawerLayout; import android.util.Log; import android.view.Gravity; import android.view.View; +import android.view.Window; +import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; @@ -18,6 +20,7 @@ import android.widget.LinearLayout; import com.twine.colorcapture.App; import com.twine.colorcapture.R; +import com.twine.colorcapture.controls.ToggleImageButton; import com.twine.colorcapture.core.IAction; import com.twine.colorcapture.core.Task; import com.twine.colorcapture.databinding.ActivityMainBinding; @@ -42,7 +45,7 @@ public class MainActivity extends ActivityBase { private INavigationProvider navigationProvider; + + public DependencyProperty isMoreToggled; + public DependencyProperty isCaptureToggled; + public DependencyProperty isMyColorsToggled; @Inject public MainActivityVM(Bus eventBus, INotificationProvider notificationProvider, INavigationProvider navigationProvider) { this.navigationProvider = navigationProvider; + isMoreToggled = new DependencyProperty(false,this::onMoreToggled); + isCaptureToggled = new DependencyProperty(true,this::onCaptureToggled); + isMyColorsToggled = new DependencyProperty(false,this::onMyColorsToggled); + } + + private void onMyColorsToggled(DependencyProperty booleanDependencyProperty, Boolean value) + { + isMoreToggled.set(false); + isCaptureToggled.set(false); + } + + private void onCaptureToggled(DependencyProperty booleanDependencyProperty, Boolean value) + { + isMoreToggled.set(false); + isMyColorsToggled.set(false); + } + + private void onMoreToggled(DependencyProperty booleanDependencyProperty, Boolean value) + { + isCaptureToggled.set(false); + isMyColorsToggled.set(false); } } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/logo.png new file mode 100644 index 000000000..d603442d6 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_normal.png new file mode 100644 index 000000000..8f8c4e153 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_selected.png new file mode 100644 index 000000000..28b678a74 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/my_colors.png new file mode 100644 index 000000000..64433b097 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/selected.png new file mode 100644 index 000000000..59b34c80f Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twine_logo.png new file mode 100644 index 000000000..bad8273ba Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_normal.png new file mode 100644 index 000000000..79705e9ca Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_selected.png new file mode 100644 index 000000000..3ca5bf9b7 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-hdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/logo.png new file mode 100644 index 000000000..d9dc2cf15 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_normal.png new file mode 100644 index 000000000..6c8ce0b9a Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_selected.png new file mode 100644 index 000000000..179384dd0 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/my_colors.png new file mode 100644 index 000000000..c38fbefc1 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/selected.png new file mode 100644 index 000000000..0a5041bb9 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twine_logo.png new file mode 100644 index 000000000..0c56ba31b Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_normal.png new file mode 100644 index 000000000..3999dfb84 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_selected.png new file mode 100644 index 000000000..6bd9f3638 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-mdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/logo.png new file mode 100644 index 000000000..f6b3bf9be Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_normal.png new file mode 100644 index 000000000..a540c41be Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_selected.png new file mode 100644 index 000000000..60494cce8 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/my_colors.png new file mode 100644 index 000000000..2eae175fd Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/selected.png new file mode 100644 index 000000000..e1aa19889 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twine_logo.png new file mode 100644 index 000000000..9009dd34a Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_normal.png new file mode 100644 index 000000000..bf6509ea2 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_selected.png new file mode 100644 index 000000000..f71ff6ea5 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xhdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/logo.png new file mode 100644 index 000000000..fe384b6dd Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_normal.png new file mode 100644 index 000000000..edbed5b5e Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_selected.png new file mode 100644 index 000000000..263622f94 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/my_colors.png new file mode 100644 index 000000000..1570ddb97 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/selected.png new file mode 100644 index 000000000..6c4d944f2 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twine_logo.png new file mode 100644 index 000000000..ce0f15c34 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_normal.png new file mode 100644 index 000000000..6b098152f Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_selected.png new file mode 100644 index 000000000..94e490595 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxhdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/logo.png new file mode 100644 index 000000000..b173a3c86 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_normal.png new file mode 100644 index 000000000..1f009161c Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_selected.png new file mode 100644 index 000000000..80b2611cf Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/my_colors.png new file mode 100644 index 000000000..b816454ed Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/selected.png new file mode 100644 index 000000000..705b88dfe Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twine_logo.png new file mode 100644 index 000000000..d9ff791bc Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_normal.png new file mode 100644 index 000000000..f48411cb9 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_selected.png new file mode 100644 index 000000000..3741bdb4a Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-xxxhdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/background_gradient.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/background_gradient.xml new file mode 100644 index 000000000..9a95bd708 --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/background_gradient.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border.xml new file mode 100644 index 000000000..2f0177da9 --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_shadow.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_shadow.xml new file mode 100644 index 000000000..cf3d424af --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_shadow.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_main.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_main.xml index 1d7d77ad4..e650b8328 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_main.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_main.xml @@ -21,60 +21,64 @@ + android:visibility="visible"> - - -