Browse Source

Clean up and finish #5887

Scott Lahteine 8 years ago
parent
commit
fb4aead2b1

+ 4
- 9
Marlin/Configuration_adv.h View File

1128
  */
1128
  */
1129
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1139
  * Volumetric extrusion default state

+ 7
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

1109
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1119
  * Volumetric extrusion default state
1113
  * Activate to make volumetric extrusion the default method,
1120
  * Activate to make volumetric extrusion the default method,
1114
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1121
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

1139
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1149
  * Volumetric extrusion default state
1143
  * Activate to make volumetric extrusion the default method,
1150
  * Activate to make volumetric extrusion the default method,
1144
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1151
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

1134
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1144
  * Volumetric extrusion default state
1138
  * Activate to make volumetric extrusion the default method,
1145
  * Activate to make volumetric extrusion the default method,
1139
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1146
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

1128
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1138
  * Volumetric extrusion default state
1132
  * Activate to make volumetric extrusion the default method,
1139
  * Activate to make volumetric extrusion the default method,
1133
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

1128
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1138
  * Volumetric extrusion default state
1132
  * Activate to make volumetric extrusion the default method,
1139
  * Activate to make volumetric extrusion the default method,
1133
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

1133
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1143
  * Volumetric extrusion default state
1137
  * Activate to make volumetric extrusion the default method,
1144
  * Activate to make volumetric extrusion the default method,
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1145
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

1128
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1138
  * Volumetric extrusion default state
1132
  * Activate to make volumetric extrusion the default method,
1139
  * Activate to make volumetric extrusion the default method,
1133
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1140
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 7
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

1126
 //#define EXTENDED_CAPABILITIES_REPORT
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
  * Volumetric extrusion default state
1136
  * Volumetric extrusion default state
1130
  * Activate to make volumetric extrusion the default method,
1137
  * Activate to make volumetric extrusion the default method,
1131
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1138
  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.

+ 13
- 16
Marlin/ultralcd.cpp View File

51
 
51
 
52
 #if ENABLED(BABYSTEPPING)
52
 #if ENABLED(BABYSTEPPING)
53
   long babysteps_done = 0;
53
   long babysteps_done = 0;
54
-  millis_t status_screen_click_time = 0;
55
   static void lcd_babystep_z();
54
   static void lcd_babystep_z();
56
 #endif
55
 #endif
57
 
56
 
417
    * General function to go directly to a screen
416
    * General function to go directly to a screen
418
    */
417
    */
419
   void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) {
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
     if (currentScreen != screen) {
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
       currentScreen = screen;
433
       currentScreen = screen;
437
       encoderPosition = encoder;
434
       encoderPosition = encoder;
438
       if (screen == lcd_status_screen) {
435
       if (screen == lcd_status_screen) {

Loading…
Cancel
Save