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
   #define blocktime 500
54
   #define blocktime 500
55
   #define lcdslow 5
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
   class MainMenu{
59
   class MainMenu{
60
   public:
60
   public:
71
     void showControl();
71
     void showControl();
72
     void showControlMotion();
72
     void showControlMotion();
73
     void showControlTemp();
73
     void showControlTemp();
74
+    void showAxisMove();
74
     void showSD();
75
     void showSD();
75
     bool force_lcd_update;
76
     bool force_lcd_update;
76
     int lastencoderpos;
77
     int lastencoderpos;

+ 48
- 7
Marlin/ultralcd.pde View File

457
   force_lcd_update=false;
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
 //any action must not contain a ',' character anywhere, or this breaks:
462
 //any action must not contain a ',' character anywhere, or this breaks:
463
 #define MENUITEM(repaint_action, click_action) \
463
 #define MENUITEM(repaint_action, click_action) \
496
     case ItemP_cooldown:
496
     case ItemP_cooldown:
497
       MENUITEM(  lcdprintPGM(" Cooldown")  ,  BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
497
       MENUITEM(  lcdprintPGM(" Cooldown")  ,  BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
498
       break;
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
       break;
504
       break;
502
-    
503
-    
504
-    default:   
505
+        default:   
505
       break;
506
       break;
506
   }
507
   }
507
   line++;
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
 enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
549
 enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
1813
           showPrepare(); 
1850
           showPrepare(); 
1814
         }
1851
         }
1815
       }break;
1852
       }break;
1853
+      case Sub_PrepareMove:
1854
+      {        
1855
+            showAxisMove();
1856
+      }break;
1816
       case Main_Control:
1857
       case Main_Control:
1817
       {
1858
       {
1818
         showControl(); 
1859
         showControl(); 

Loading…
Cancel
Save