Browse Source

lcd menue "move_axis" added

Christian Thalhammer 12 years ago
parent
commit
4cc8e37bf1
2 changed files with 50 additions and 8 deletions
  1. 2
    1
      Marlin/ultralcd.h
  2. 48
    7
      Marlin/ultralcd.pde

+ 2
- 1
Marlin/ultralcd.h View File

@@ -54,7 +54,7 @@
54 54
   #define blocktime 500
55 55
   #define lcdslow 5
56 56
     
57
-  enum MainStatus{Main_Status, Main_Menu, Main_Prepare, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl};
57
+  enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl};
58 58
 
59 59
   class MainMenu{
60 60
   public:
@@ -71,6 +71,7 @@
71 71
     void showControl();
72 72
     void showControlMotion();
73 73
     void showControlTemp();
74
+    void showAxisMove();
74 75
     void showSD();
75 76
     bool force_lcd_update;
76 77
     int lastencoderpos;

+ 48
- 7
Marlin/ultralcd.pde View File

@@ -457,7 +457,7 @@ void MainMenu::showStatus()
457 457
   force_lcd_update=false;
458 458
 }
459 459
 
460
-enum {ItemP_exit, ItemP_autostart,ItemP_disstep,ItemP_home, ItemP_origin, ItemP_preheat, ItemP_cooldown,ItemP_extrude};
460
+enum {ItemP_exit, ItemP_autostart,ItemP_disstep,ItemP_home, ItemP_origin, ItemP_preheat, ItemP_cooldown,/*ItemP_extrude,*/ItemP_move};
461 461
 
462 462
 //any action must not contain a ',' character anywhere, or this breaks:
463 463
 #define MENUITEM(repaint_action, click_action) \
@@ -496,17 +496,54 @@ void MainMenu::showPrepare()
496 496
     case ItemP_cooldown:
497 497
       MENUITEM(  lcdprintPGM(" Cooldown")  ,  BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
498 498
       break;
499
-    case ItemP_extrude:
500
-      MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
499
+//    case ItemP_extrude:
500
+  //    MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
501
+    //  break;
502
+    case ItemP_move:
503
+      MENUITEM(  lcdprintPGM(" Move Axis      \x7E") , BLOCK;status=Sub_PrepareMove;beepshort(); );
501 504
       break;
502
-    
503
-    
504
-    default:   
505
+        default:   
505 506
       break;
506 507
   }
507 508
   line++;
508 509
  }
509
- updateActiveLines(ItemP_extrude,encoderpos);
510
+ updateActiveLines(ItemP_move,encoderpos);
511
+}
512
+
513
+enum {
514
+  ItemAM_exit,
515
+  ItemAM_X, ItemAM_Y, ItemAM_Z, ItemAM_E
516
+};
517
+
518
+void MainMenu::showAxisMove()
519
+{
520
+   uint8_t line=0;
521
+   clearIfNecessary();
522
+   for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
523
+   {
524
+     switch(i)
525
+      {
526
+          case ItemAM_exit:
527
+          MENUITEM(  lcdprintPGM(" Main \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
528
+          break;
529
+          case ItemAM_X:
530
+          MENUITEM(  lcdprintPGM(" X+")  ,  BLOCK;enquecommand("G92 X0");enquecommand("G1 F700 X10");beepshort(); ) ;
531
+          break;
532
+          case ItemAM_Y:
533
+          MENUITEM(  lcdprintPGM(" Y+")  ,  BLOCK;enquecommand("G92 Y0");enquecommand("G1 F700 Y10");beepshort(); ) ;
534
+          break;
535
+          case ItemAM_Z:
536
+          MENUITEM(  lcdprintPGM(" Z+")  ,  BLOCK;enquecommand("G92 Z0");enquecommand("G1 F700 Z10");beepshort(); ) ;
537
+          break;
538
+          case ItemAM_E:
539
+          MENUITEM(  lcdprintPGM(" Extrude")  ,  BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
540
+          break;
541
+          default:
542
+          break;
543
+      }
544
+      line++;
545
+   }
546
+   updateActiveLines(ItemAM_Z,encoderpos);
510 547
 }
511 548
 
512 549
 enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
@@ -1813,6 +1850,10 @@ void MainMenu::update()
1813 1850
           showPrepare(); 
1814 1851
         }
1815 1852
       }break;
1853
+      case Sub_PrepareMove:
1854
+      {        
1855
+            showAxisMove();
1856
+      }break;
1816 1857
       case Main_Control:
1817 1858
       {
1818 1859
         showControl(); 

Loading…
Cancel
Save