Selaa lähdekoodia

Merge pull request #5942 from thinkyhead/rc_cleanup_finish_5887

Clean up and finish #5887
Scott Lahteine 8 vuotta sitten
vanhempi
commit
e309e980ce

+ 4
- 9
Marlin/Configuration_adv.h Näytä tiedosto

@@ -1128,17 +1128,12 @@
1128 1128
  */
1129 1129
 //#define EXTENDED_CAPABILITIES_REPORT
1130 1130
 
1131
-
1132 1131
 /**
1133
- * Double Clicking of LCD Panel's Encoder Wheel while at the Status Screen will jump
1134
- * to the Z-BabyStepping menu.
1132
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1135 1133
  */
1136
-//#define DOUBLE_CLICK_JUMPS_TO_Z_BABYSTEPPING
1137
-#define DOUBLE_CLICK_TIME_WINDOW 1250   // How quickly the double click must be done in miliseconds.
1138
-                                        // Please notice this time must be a little bit longer than what
1139
-                                        // is actually desired because there is some latency in detecting a
1140
-                                        // change in LCD Panel Button Status.
1141
-
1134
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1135
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1136
+                                        // Note: You may need to add extra time to mitigate controller latency.
1142 1137
 
1143 1138
 /**
1144 1139
  * Volumetric extrusion default state

+ 7
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Näytä tiedosto

@@ -1109,6 +1109,13 @@
1109 1109
 //#define EXTENDED_CAPABILITIES_REPORT
1110 1110
 
1111 1111
 /**
1112
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1113
+ */
1114
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1115
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1116
+                                        // Note: You may need to add extra time to mitigate controller latency.
1117
+
1118
+/**
1112 1119
  * Volumetric extrusion default state
1113 1120
  * Activate to make volumetric extrusion the default method,
1114 1121
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/K8200/Configuration_adv.h Näytä tiedosto

@@ -1139,6 +1139,13 @@
1139 1139
 //#define EXTENDED_CAPABILITIES_REPORT
1140 1140
 
1141 1141
 /**
1142
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1143
+ */
1144
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1145
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1146
+                                        // Note: You may need to add extra time to mitigate controller latency.
1147
+
1148
+/**
1142 1149
  * Volumetric extrusion default state
1143 1150
  * Activate to make volumetric extrusion the default method,
1144 1151
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/K8400/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h Näytä tiedosto

@@ -1134,6 +1134,13 @@
1134 1134
 //#define EXTENDED_CAPABILITIES_REPORT
1135 1135
 
1136 1136
 /**
1137
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1138
+ */
1139
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1140
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1141
+                                        // Note: You may need to add extra time to mitigate controller latency.
1142
+
1143
+/**
1137 1144
  * Volumetric extrusion default state
1138 1145
  * Activate to make volumetric extrusion the default method,
1139 1146
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h Näytä tiedosto

@@ -1128,6 +1128,13 @@
1128 1128
 //#define EXTENDED_CAPABILITIES_REPORT
1129 1129
 
1130 1130
 /**
1131
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1132
+ */
1133
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1134
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1135
+                                        // Note: You may need to add extra time to mitigate controller latency.
1136
+
1137
+/**
1131 1138
  * Volumetric extrusion default state
1132 1139
  * Activate to make volumetric extrusion the default method,
1133 1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Näytä tiedosto

@@ -1128,6 +1128,13 @@
1128 1128
 //#define EXTENDED_CAPABILITIES_REPORT
1129 1129
 
1130 1130
 /**
1131
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1132
+ */
1133
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1134
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1135
+                                        // Note: You may need to add extra time to mitigate controller latency.
1136
+
1137
+/**
1131 1138
  * Volumetric extrusion default state
1132 1139
  * Activate to make volumetric extrusion the default method,
1133 1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Näytä tiedosto

@@ -1133,6 +1133,13 @@
1133 1133
 //#define EXTENDED_CAPABILITIES_REPORT
1134 1134
 
1135 1135
 /**
1136
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1137
+ */
1138
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1139
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1140
+                                        // Note: You may need to add extra time to mitigate controller latency.
1141
+
1142
+/**
1136 1143
  * Volumetric extrusion default state
1137 1144
  * Activate to make volumetric extrusion the default method,
1138 1145
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Näytä tiedosto

@@ -1128,6 +1128,13 @@
1128 1128
 //#define EXTENDED_CAPABILITIES_REPORT
1129 1129
 
1130 1130
 /**
1131
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1132
+ */
1133
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1134
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1135
+                                        // Note: You may need to add extra time to mitigate controller latency.
1136
+
1137
+/**
1131 1138
  * Volumetric extrusion default state
1132 1139
  * Activate to make volumetric extrusion the default method,
1133 1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/makibox/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Näytä tiedosto

@@ -1126,6 +1126,13 @@
1126 1126
 //#define EXTENDED_CAPABILITIES_REPORT
1127 1127
 
1128 1128
 /**
1129
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1130
+ */
1131
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1132
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1133
+                                        // Note: You may need to add extra time to mitigate controller latency.
1134
+
1135
+/**
1129 1136
  * Volumetric extrusion default state
1130 1137
  * Activate to make volumetric extrusion the default method,
1131 1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 13
- 16
Marlin/ultralcd.cpp Näytä tiedosto

@@ -51,7 +51,6 @@ int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2
51 51
 
52 52
 #if ENABLED(BABYSTEPPING)
53 53
   long babysteps_done = 0;
54
-  millis_t status_screen_click_time = 0;
55 54
   static void lcd_babystep_z();
56 55
 #endif
57 56
 
@@ -417,22 +416,20 @@ uint16_t max_display_update_time = 0;
417 416
    * General function to go directly to a screen
418 417
    */
419 418
   void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) {
420
-    #ifdef DOUBLE_CLICK_JUMPS_TO_Z_BABYSTEPPING
421
-      #if ENABLED(BABYSTEPPING) 
422
-        if (currentScreen==lcd_status_screen && screen==lcd_main_menu)  // We are in leaving the status screen to goto the main_menu  
423
-          status_screen_click_time = millis();       // screen.  Mark the time so we know how quick the user is 
424
-                     // pressing buttons. 
425
-        if (currentScreen==lcd_main_menu)  { 
426
-          if ( screen==lcd_status_screen && status_screen_click_time+DOUBLE_CLICK_TIME_WINDOW>millis() ) { 
427
-            lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; 
428
-            status_screen_click_time = 0; 
429
-            lcd_babystep_z(); 
430
-          return; 
431
-          } 
432
-        } 
433
-      #endif 
434
-    #endif 
435 419
     if (currentScreen != screen) {
420
+
421
+      #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) && ENABLED(BABYSTEPPING)
422
+        static millis_t doubleclick_expire_ms = 0;
423
+        // Going to lcd_main_menu from status screen? Remember first click time.
424
+        // Going back to status screen within a very short time? Go to Z babystepping.
425
+        if (screen == lcd_main_menu) {
426
+          if (currentScreen == lcd_status_screen)
427
+            doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
428
+        }
429
+        else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms))
430
+          screen = lcd_babystep_z;
431
+      #endif 
432
+
436 433
       currentScreen = screen;
437 434
       encoderPosition = encoder;
438 435
       if (screen == lcd_status_screen) {

Loading…
Peruuta
Tallenna