Pārlūkot izejas kodu

Reprapworld Keypad: F1 opens the Move Axis menu

Scott Lahteine 8 gadus atpakaļ
vecāks
revīzija
2bad02e60d
2 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 4
    0
      Marlin/ultralcd.cpp
  2. 1
    0
      Marlin/ultralcd.h

+ 4
- 0
Marlin/ultralcd.cpp Parādīt failu

@@ -2295,6 +2295,7 @@ void kill_screen(const char* lcd_msg) {
2295 2295
       currentScreen = menu_edit_callback_ ## _name; \
2296 2296
       callbackFunc = callback; \
2297 2297
     }
2298
+
2298 2299
   menu_edit_type(int, int3, itostr3, 1);
2299 2300
   menu_edit_type(float, float3, ftostr3, 1);
2300 2301
   menu_edit_type(float, float32, ftostr32, 100);
@@ -2326,6 +2327,7 @@ void kill_screen(const char* lcd_msg) {
2326 2327
     static void reprapworld_keypad_move_y_up()    { _reprapworld_keypad_move(Y_AXIS, -1); }
2327 2328
     static void reprapworld_keypad_move_y_down()  { _reprapworld_keypad_move(Y_AXIS,  1); }
2328 2329
     static void reprapworld_keypad_move_home()    { enqueue_and_echo_commands_P(PSTR("G28")); } // move all axes home and wait
2330
+    static void reprapworld_keypad_move_menu()    { lcd_goto_screen(lcd_move_menu); }
2329 2331
   #endif // REPRAPWORLD_KEYPAD
2330 2332
 
2331 2333
   /**
@@ -2592,6 +2594,8 @@ void lcd_update() {
2592 2594
         else if (!keypad_debounce) {
2593 2595
           keypad_debounce = 2;
2594 2596
 
2597
+          if (REPRAPWORLD_KEYPAD_MOVE_MENU)       reprapworld_keypad_move_menu();
2598
+
2595 2599
           #if DISABLED(DELTA) && Z_HOME_DIR == -1
2596 2600
             if (REPRAPWORLD_KEYPAD_MOVE_Z_UP)     reprapworld_keypad_move_z_up();
2597 2601
           #endif

+ 1
- 0
Marlin/ultralcd.h Parādīt failu

@@ -117,6 +117,7 @@
117 117
 
118 118
     #define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN  (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F3)
119 119
     #define REPRAPWORLD_KEYPAD_MOVE_Z_UP    (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F2)
120
+    #define REPRAPWORLD_KEYPAD_MOVE_MENU    (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F1)
120 121
     #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN  (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN)
121 122
     #define REPRAPWORLD_KEYPAD_MOVE_X_RIGHT (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT)
122 123
     #define REPRAPWORLD_KEYPAD_MOVE_HOME    (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_MIDDLE)

Notiek ielāde…
Atcelt
Saglabāt