From 30b9452d7d554b26ac78746cf6ad0a290b0a4ed3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 10 May 2019 08:51:34 +0300 Subject: Implemented MS color capture emulator. Working on TCC... --- .../Android_Studio/ColorCapture/app/build.gradle | 2 +- .../ColorCapture/app/src/main/AndroidManifest.xml | 6 +- .../colorcapture/views/main/IMainActivity.java | 2 +- .../colorcapture/views/main/MainActivity.java | 2 +- .../colorcapture/views/main/MainActivityVM.java | 4 +- .../src/main/res/drawable-sw600dp-mdpi/about.png | Bin 0 -> 2748 bytes .../main/res/drawable-sw600dp-mdpi/darkening.png | Bin 0 -> 19232 bytes .../main/res/drawable-sw600dp-mdpi/delete_thin.png | Bin 0 -> 2827 bytes .../src/main/res/drawable-sw600dp-mdpi/down.png | Bin 0 -> 531 bytes .../src/main/res/drawable-sw600dp-mdpi/email.png | Bin 0 -> 3051 bytes .../src/main/res/drawable-sw600dp-mdpi/error.png | Bin 0 -> 9549 bytes .../src/main/res/drawable-sw600dp-mdpi/got_it.png | Bin 0 -> 12540 bytes .../src/main/res/drawable-sw600dp-mdpi/how_to.png | Bin 0 -> 3118 bytes .../src/main/res/drawable-sw600dp-mdpi/icon.png | Bin 0 -> 2545 bytes .../res/drawable-sw600dp-mdpi/icon_twine_card.png | Bin 0 -> 2661 bytes .../res/drawable-sw600dp-mdpi/icons_arrow_up.png | Bin 0 -> 539 bytes .../main/res/drawable-sw600dp-mdpi/icons_close.png | Bin 0 -> 424 bytes .../res/drawable-sw600dp-mdpi/icons_delete.png | Bin 0 -> 3094 bytes .../res/drawable-sw600dp-mdpi/icons_rename.png | Bin 0 -> 2382 bytes .../src/main/res/drawable-sw600dp-mdpi/info.png | Bin 0 -> 2417 bytes .../src/main/res/drawable-sw600dp-mdpi/logo.png | Bin 0 -> 21247 bytes .../main/res/drawable-sw600dp-mdpi/more_normal.png | Bin 0 -> 3755 bytes .../res/drawable-sw600dp-mdpi/more_selected.png | Bin 0 -> 9912 bytes .../main/res/drawable-sw600dp-mdpi/my_colors.png | Bin 0 -> 5574 bytes .../main/res/drawable-sw600dp-mdpi/selected.png | Bin 0 -> 12524 bytes .../main/res/drawable-sw600dp-mdpi/snapmatch.png | Bin 0 -> 281457 bytes .../src/main/res/drawable-sw600dp-mdpi/success.png | Bin 0 -> 9419 bytes .../main/res/drawable-sw600dp-mdpi/twine_card.png | Bin 0 -> 5560 bytes .../res/drawable-sw600dp-mdpi/twine_card_icon.png | Bin 0 -> 7906 bytes .../main/res/drawable-sw600dp-mdpi/twine_logo.png | Bin 0 -> 16023 bytes .../res/drawable-sw600dp-mdpi/twinesnap_normal.png | Bin 0 -> 4973 bytes .../drawable-sw600dp-mdpi/twinesnap_selected.png | Bin 0 -> 12333 bytes .../app/src/main/res/layout/activity_loading.xml | 4 +- .../app/src/main/res/layout/activity_main.xml | 12 +- .../src/main/res/layout/circle_action_button.xml | 9 +- .../app/src/main/res/layout/color_result_item.xml | 14 +- .../app/src/main/res/layout/dialog_confirm.xml | 10 +- .../app/src/main/res/layout/dialog_error.xml | 12 +- .../app/src/main/res/layout/dialog_processing.xml | 6 +- .../app/src/main/res/layout/dialog_progress.xml | 12 +- .../app/src/main/res/layout/dialog_success.xml | 12 +- .../app/src/main/res/layout/dialog_welcome.xml | 15 +- .../src/main/res/layout/external_machine_item.xml | 10 +- .../app/src/main/res/layout/fragment_capture.xml | 6 +- .../app/src/main/res/layout/fragment_mycolors.xml | 2 +- .../app/src/main/res/layout/fragment_register.xml | 8 +- .../app/src/main/res/layout/fragment_rename.xml | 8 +- .../app/src/main/res/layout/fragment_result.xml | 352 +++++----- .../src/main/res/layout/fragment_send_to_email.xml | 14 +- .../main/res/layout/fragment_send_to_machine.xml | 4 +- .../app/src/main/res/layout/side_menu.xml | 13 +- .../app/src/main/res/values-large/fonts.xml | 6 + .../app/src/main/res/values-large/sizes.xml | 8 + .../ColorCapture/app/src/main/res/values/fonts.xml | 6 + .../ColorCapture/app/src/main/res/values/sizes.xml | 8 + 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 .../Build/Shortcuts/Machine Studio.lnk | Bin 1518 -> 1581 bytes .../Properties/Resources.Designer.cs | 45 +- .../Properties/Resources.resx | 26 +- .../Tango.MachineStudio.ColorCapture.csproj | 3 + .../ViewModels/MainViewVM.cs | 127 +++- .../Views/MainView.xaml | 712 ++++++++++++--------- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/MainView.xaml | 2 +- .../TCC/Tango.TCC.BL/ColorDetector.cs | 2 +- .../Tango.SharedUI/Controls/NavigationControl.cs | 59 +- 69 files changed, 935 insertions(+), 610 deletions(-) create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/about.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/darkening.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/delete_thin.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/down.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/email.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/error.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/got_it.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/how_to.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon_twine_card.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_arrow_up.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_close.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_delete.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_rename.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/info.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/more_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/more_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/my_colors.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/snapmatch.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/success.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card_icon.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_logo.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twinesnap_normal.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twinesnap_selected.png create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/values-large/fonts.xml create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/values-large/sizes.xml create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/values/fonts.xml create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/res/values/sizes.xml diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle index b74f3a18c..495158238 100644 --- a/Software/Android_Studio/ColorCapture/app/build.gradle +++ b/Software/Android_Studio/ColorCapture/app/build.gradle @@ -23,7 +23,7 @@ android { buildTypes { debug { - buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://192.168.1.229:45455/api/\"" + buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://10.100.102.214:45455/api/\"" buildConfigField "String", "WEB_SERVICE_APP_ID", "\"Tdf793i4ughsiduf8749509237885ehgfdlkghlT\"" } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/AndroidManifest.xml b/Software/Android_Studio/ColorCapture/app/src/main/AndroidManifest.xml index bbea0549e..d21611173 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/AndroidManifest.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/AndroidManifest.xml @@ -28,7 +28,8 @@ android:theme="@style/AppTheme"> + android:noHistory="true" + android:screenOrientation="portrait"> @@ -45,8 +46,7 @@ android:host="twine-s.com" /> - - + \ No newline at end of file diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/IMainActivity.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/IMainActivity.java index 0835d4eef..9d1e33fa3 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/IMainActivity.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/main/IMainActivity.java @@ -4,5 +4,5 @@ import com.twine.colorcapture.mvvm.IView; public interface IMainActivity extends IView { - void cloneMenu(); + void closeMenu(); } 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 4190175ce..2e6b70c02 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 @@ -129,7 +129,7 @@ public class MainActivity extends ActivityBase private void handleHowToUseCommand() { - view.cloneMenu(); + view.closeMenu(); notificationProvider.showDialog(new WelcomeDialog(), (vm) -> { }); } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/about.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/about.png new file mode 100644 index 000000000..d5701a483 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/about.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/darkening.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/darkening.png new file mode 100644 index 000000000..f50441f22 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/darkening.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/delete_thin.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/delete_thin.png new file mode 100644 index 000000000..b6b951c0a Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/delete_thin.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/down.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/down.png new file mode 100644 index 000000000..b1e67433d Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/down.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/email.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/email.png new file mode 100644 index 000000000..341d122a6 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/email.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/error.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/error.png new file mode 100644 index 000000000..41fa3df55 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/error.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/got_it.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/got_it.png new file mode 100644 index 000000000..46e9288d6 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/got_it.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/how_to.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/how_to.png new file mode 100644 index 000000000..fbeb31818 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/how_to.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon.png new file mode 100644 index 000000000..40e46cd1f Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon_twine_card.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon_twine_card.png new file mode 100644 index 000000000..48e6595fa Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icon_twine_card.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_arrow_up.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_arrow_up.png new file mode 100644 index 000000000..dc4d23f98 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_arrow_up.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_close.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_close.png new file mode 100644 index 000000000..f4e9e1c50 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_close.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_delete.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_delete.png new file mode 100644 index 000000000..55753d24a Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_delete.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_rename.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_rename.png new file mode 100644 index 000000000..070a2f6e7 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/icons_rename.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/info.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/info.png new file mode 100644 index 000000000..3e33de5a6 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/info.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/logo.png new file mode 100644 index 000000000..f6b3bf9be Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/more_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/more_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/more_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/more_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/my_colors.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/my_colors.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/selected.png new file mode 100644 index 000000000..e1aa19889 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/snapmatch.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/snapmatch.png new file mode 100644 index 000000000..994d77ffe Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/snapmatch.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/success.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/success.png new file mode 100644 index 000000000..50819ef94 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/success.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card.png new file mode 100644 index 000000000..4eb5dc787 Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card_icon.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card_icon.png new file mode 100644 index 000000000..ff3f1c99c Binary files /dev/null and b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_card_icon.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twine_logo.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/twine_logo.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twinesnap_normal.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/twinesnap_normal.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/twinesnap_selected.png b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable-sw600dp-mdpi/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-sw600dp-mdpi/twinesnap_selected.png differ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_loading.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_loading.xml index 4e6183a4a..4adc4b6a2 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_loading.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/activity_loading.xml @@ -58,8 +58,8 @@ android:layout_marginTop="30dp" android:layout_below="@id/imageView2" android:layout_centerInParent="true" - android:layout_width="80dp" - android:layout_height="80dp" + android:layout_width="@dimen/progress_size" + android:layout_height="@dimen/progress_size" android:indeterminate="true" android:indeterminateDuration="500" android:indeterminateDrawable="@drawable/progress_ring_background"/> 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 7c55188cc..9830c53db 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 @@ -37,8 +37,8 @@ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml index 9be44f3da..139ddc5b3 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml @@ -34,8 +34,8 @@ @@ -83,7 +83,7 @@ android:fontFamily="@font/flexo_light" android:letterSpacing="0.07" android:text="RGB:" - android:textSize="15.4sp" /> + android:textSize="@dimen/medium_font_size" /> + android:textSize="@dimen/medium_font_size" /> @@ -110,8 +110,8 @@ diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_confirm.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_confirm.xml index 1bad9d630..267b16249 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_confirm.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_confirm.xml @@ -15,8 +15,8 @@ android:background="@color/colorBlueMask"> @@ -64,7 +64,7 @@ android:fontFamily="@font/flexo_light" android:gravity="center" android:letterSpacing="0.07" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" tools:text="Success message" android:text="@{vm.message}"/> @@ -78,7 +78,7 @@ bind:text="@{vm.confirmText}" bind:command="@{vm.confirmCommand}" tools:text="Delete" - bind:textSize="15.3sp" + bind:textSize="@dimen/medium_font_size" bind:src="@drawable/icons_delete" android:clickable="true" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_error.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_error.xml index eee19cd3b..4e172c584 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_error.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_error.xml @@ -15,8 +15,8 @@ android:background="@color/colorBlueMask"> @@ -48,15 +48,15 @@ android:fontFamily="@font/flexo_bold" android:gravity="center" android:letterSpacing="0.07" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" tools:text="Error title" android:text="@{vm.title}" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_processing.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_processing.xml index 2d891b99b..d2218a018 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_processing.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_processing.xml @@ -17,8 +17,8 @@ @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_marginTop="20dp" android:gravity="center" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" android:letterSpacing="0.07" android:fontFamily="@font/flexo_medium" android:text="@string/processing_message"/> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_progress.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_progress.xml index 34fe35210..b0cd8215a 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_progress.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_progress.xml @@ -15,8 +15,8 @@ android:background="@color/colorBlueMask"> @@ -30,14 +30,14 @@ android:fontFamily="@font/flexo_bold" android:gravity="center" android:letterSpacing="0.07" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" tools:text="Progress title" android:text="@{vm.title}" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_success.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_success.xml index aa4fb6639..8e6bfb3fc 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_success.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_success.xml @@ -15,8 +15,8 @@ android:background="@color/colorBlueMask"> @@ -48,15 +48,15 @@ android:fontFamily="@font/flexo_bold" android:gravity="center" android:letterSpacing="0.07" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" tools:text="Success Title" android:text="@{vm.title}" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_welcome.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_welcome.xml index bcc964288..44bc25f51 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_welcome.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/dialog_welcome.xml @@ -27,7 +27,8 @@ android:layout_marginLeft="30dp" android:layout_marginRight="30dp" android:layout_marginTop="50dp" - android:layout_marginBottom="100dp"> + android:layout_marginBottom="100dp" + > @@ -38,7 +39,7 @@ android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_margin="30dp" - android:textSize="17.3sp" + android:textSize="@dimen/large_font_size" android:textStyle="bold" android:fontFamily="@font/flexo_bold" android:text="@string/welcome_title" /> @@ -62,7 +63,7 @@ android:layout_marginTop="20dp" android:layout_marginEnd="20dp" android:gravity="center" - android:textSize="15.4sp" + android:textSize="@dimen/medium_font_size" android:letterSpacing="0.08" android:lineSpacingExtra="7.7sp" android:fontFamily="@font/flexo_regular" @@ -75,14 +76,16 @@ @@ -34,7 +35,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@{machine.serialNumber}" - android:textSize="18sp" + android:textSize="@dimen/large_font_size" tools:text="Serial Number" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml index a4c4affc8..23de66c2d 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml @@ -117,14 +117,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" - android:textSize="13.4sp" + android:textSize="@dimen/small_font_size" android:fontFamily="@font/flexo_medium" android:text="@string/twine_snap_message" android:visibility="@{vm.isCardDetected ? View.GONE : View.VISIBLE}"/> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_mycolors.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_mycolors.xml index 1fdcb2710..40b223a4e 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_mycolors.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_mycolors.xml @@ -28,7 +28,7 @@ android:fontFamily="@font/flexo_bold" android:letterSpacing="0.07" android:text="My colors" - android:textSize="17.3sp" /> + android:textSize="@dimen/large_font_size" /> + android:textSize="@dimen/large_font_size" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_rename.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_rename.xml index fb95f1c14..341227a22 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_rename.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_rename.xml @@ -32,7 +32,7 @@ android:letterSpacing="0.07" android:layout_gravity="left|center" android:text="Rename my color" - android:textSize="17.3sp" /> + android:textSize="@dimen/large_font_size" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_result.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_result.xml index 8ca28f881..a0716cb13 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_result.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_result.xml @@ -12,119 +12,41 @@ - - - - - - - - - - - - - + android:layoutDirection="ltr"> + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - Similarity - - + + + + + + + + + + R + + + + + G + + + + + B + + + + + + + + + + + + + + Similarity + + - - - - - - - - - - - - - - - - - Rectified Image - - - - - Calculated Averages - - - + + + - - - - - + + + + + + + + + + + + Rectified Image + + + - - - Captured Color - - - - - - - - - - - - - - - + Calculated Averages + + + - - - Processed Color - - - - - - - - - - - - - - - - - - Barcode: - - - + + + + + - - Delta E Reference Point - + - L: - + Captured Color + + + + + + + + + + + + + + + + - A: - + Processed Color + + + + + + + + + + + + + + - - B: - - - - + + Barcode: + + + + + + Delta E Reference Point + + + L: + + + + + A: + + + + + B: + + + + + - - - - - - - - - - - Snapshots - + + + + + + + + + + Snapshots + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Delta E Distance - + + + Delta E Distance + ( ) - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 82a57a22b..13d0e56d5 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -283,7 +283,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml index 9899e60d4..005edb182 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -82,7 +82,7 @@ - + diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/ColorDetector.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/ColorDetector.cs index d8a7f9dc7..5637512c6 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/ColorDetector.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/ColorDetector.cs @@ -114,7 +114,7 @@ namespace Tango.TCC.BL } else { - g.DrawRectangle(linePen, rect_width * columnIndex, rect_height * rowIndex, rect_width, rect_height); + //g.DrawRectangle(linePen, rect_width * columnIndex, rect_height * rowIndex, rect_width, rect_height); } if (drawProcessedColor && currentIndex == detectionInput.TargetIndex) diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs index 1ec273e43..b3869daff 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs @@ -233,6 +233,16 @@ namespace Tango.SharedUI.Controls public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register("SelectedIndex", typeof(int), typeof(NavigationControl), new PropertyMetadata(0, (d, e) => (d as NavigationControl).OnSelectedIndexChanged())); + public bool UseDefferedRendering + { + get { return (bool)GetValue(UseDefferedRenderingProperty); } + set { SetValue(UseDefferedRenderingProperty, value); } + } + public static readonly DependencyProperty UseDefferedRenderingProperty = + DependencyProperty.Register("UseDefferedRendering", typeof(bool), typeof(NavigationControl), new PropertyMetadata(false)); + + + private void OnSelectedIndexChanged() { SelectedElement = Elements[SelectedIndex > Elements.Count - 1 ? 0 : SelectedIndex]; @@ -342,34 +352,47 @@ namespace Tango.SharedUI.Controls toRemove.ForEach(x => _grid.Children.Remove(x)); - foreach (var x in toAdd) + if (UseDefferedRendering) { - var navigationElement = new NavigationElement() + foreach (var x in toAdd) { - RenderTransformOrigin = new Point(0.5, 0.5), - Element = x, - Content = x, - }; - - _grid.Children.Add(navigationElement); + var navigationElement = new NavigationElement() + { + RenderTransformOrigin = new Point(0.5, 0.5), + Element = x, + Content = x, + }; - if (!KeepElementsAttached) - { - bool loaded = false; + _grid.Children.Add(navigationElement); - navigationElement.Loaded += (_, __) => + if (!KeepElementsAttached) { - if (!loaded) + bool loaded = false; + + navigationElement.Loaded += (_, __) => { - if (x != SelectedElement) + if (!loaded) { - loaded = true; - navigationElement.Content = null; + if (x != SelectedElement) + { + loaded = true; + navigationElement.Content = null; + } } - } - }; + }; + } } } + else + { + toAdd.ForEach(x => _grid.Children.Add( + new NavigationElement() + { + RenderTransformOrigin = new Point(0.5, 0.5), + Element = x, + Content = KeepElementsAttached ? x : null, + })); + } } if (!Elements.Contains(SelectedElement)) -- cgit v1.3.1 From 39bb4d802486e86cf534a18e781b267b048c293f Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Fri, 10 May 2019 12:00:21 +0300 Subject: File system errors reporting, alarm handling task resilience. --- .../Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 2 +- Software/Embedded_SW/Embedded/Common/Utilities/Utils.c | 2 +- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 11 +++++++---- Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 17 +++++++++-------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index 1cf86c705..4acfe8d4c 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -188,7 +188,7 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer) status = ERROR_CODE__FILE_NOT_FOUND; }*/ - responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, false, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size); + responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, FileDone, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size); if (Fresult!= OK) { responseContainer.error = getErrorCode(Fresult); diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c index 078aa5f53..341a43704 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c +++ b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c @@ -43,7 +43,7 @@ void *my_malloc(size_t _size) malloc_time[malloc_index] = msec_millisecondCounter; } */ - if (addr) + if ((addr)&&(_size>400)) { malloc_addr[malloc_index] = addr; malloc_size[malloc_index] = _size; diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 37db3f84c..931b6674f 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -671,14 +671,15 @@ uint32_t AlarmHandling_ControlTrigger(uint32_t IfIndex, uint32_t ReadValue) } void AlarmHandlingSetAlarm(uint32_t AlarmId, bool value) { - AlarmHandlingMessageStruc Message; + AlarmHandlingInternalSetAlarm( AlarmId, value); + /*AlarmHandlingMessageStruc Message; //send message to the Millisec task Message.messageId = AlarmHandlingAlarm; Message.AlarmId = AlarmId; Message.Value = value; if (AlarmHandlingMsgQ != NULL) - Mailbox_post(AlarmHandlingMsgQ , &Message, BIOS_NO_WAIT); + Mailbox_post(AlarmHandlingMsgQ , &Message, BIOS_NO_WAIT);*/ } void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value) { @@ -702,7 +703,7 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value) AlarmState[Alarm_i].EventPtr->message = AlarmItem[Alarm_i].EventName; AlarmState[Alarm_i].Status = value; } - Report("Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); + Report("Alarm ON ", __FILE__,AlarmState[Alarm_i].EventPtr,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); } else { @@ -1042,7 +1043,7 @@ void SendEventNotifications(void) } response.n_events = 0; - + UInt Key = Task_disable(); for (i = 0;i 1.0) + if (GetDispenserPressure(i) > 0.80) NumofReadyDispensers++; } } @@ -632,8 +632,8 @@ c. Go to step 2.a x Segment.BrushStopsCount. } PrepeareSpeed = JobTicket->processparameters->dyeingspeed*JobTicket->processparameters->maxinkuptake*1.30; - REPORT_MSG((int)JobTicket->processparameters->dyeingspeed, "dyeing speed"); - REPORT_MSG((int)JobTicket->processparameters->maxinkuptake, "max ink uptake"); + //REPORT_MSG((int)JobTicket->processparameters->dyeingspeed, "dyeing speed"); + //REPORT_MSG((int)JobTicket->processparameters->maxinkuptake, "max ink uptake"); if (HeaterCheckReady() == true) { @@ -669,7 +669,8 @@ c. Go to step 2.a x Segment.BrushStopsCount. for (i = 0; i < MAX_DYE_DISPENSERS; i++) { dispenserspeed = PrepeareSpeed/MotorsCfg[DispenserIdToMotorId[i]].microstep; - REPORT_MSG((int)dispenserspeed, "Prepare Speed"); + dispenserspeed = 480; + Report("Prepare Speed",__FILE__,__LINE__,i,RpWarning,(int)dispenserspeed,0); //IDS_StopHomeDispenser(i); if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers { @@ -678,7 +679,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. } } DispenserBuildTimeCounter = 0; - DispenserPrepareControlId = AddControlCallback( IDS_Prepare_Callback, eOneSecond,TemplateDataReadCBFunction ,0, 0, 0 ); + DispenserPrepareControlId = AddControlCallback( IDS_Prepare_Callback, 500,TemplateDataReadCBFunction ,0, 0, 0 ); } //******************************************************************************************************************** -- cgit v1.3.1