Browse Source

lcd menue "move_axis" added

pull/1/head
Christian Thalhammer 13 years ago
parent
commit
4cc8e37bf1
  1. 3
      Marlin/ultralcd.h
  2. 55
      Marlin/ultralcd.pde

3
Marlin/ultralcd.h

@ -54,7 +54,7 @@
#define blocktime 500 #define blocktime 500
#define lcdslow 5 #define lcdslow 5
enum MainStatus{Main_Status, Main_Menu, Main_Prepare, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl}; enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl};
class MainMenu{ class MainMenu{
public: public:
@ -71,6 +71,7 @@
void showControl(); void showControl();
void showControlMotion(); void showControlMotion();
void showControlTemp(); void showControlTemp();
void showAxisMove();
void showSD(); void showSD();
bool force_lcd_update; bool force_lcd_update;
int lastencoderpos; int lastencoderpos;

55
Marlin/ultralcd.pde

@ -457,7 +457,7 @@ void MainMenu::showStatus()
force_lcd_update=false; force_lcd_update=false;
} }
enum {ItemP_exit, ItemP_autostart,ItemP_disstep,ItemP_home, ItemP_origin, ItemP_preheat, ItemP_cooldown,ItemP_extrude}; enum {ItemP_exit, ItemP_autostart,ItemP_disstep,ItemP_home, ItemP_origin, ItemP_preheat, ItemP_cooldown,/*ItemP_extrude,*/ItemP_move};
//any action must not contain a ',' character anywhere, or this breaks: //any action must not contain a ',' character anywhere, or this breaks:
#define MENUITEM(repaint_action, click_action) \ #define MENUITEM(repaint_action, click_action) \
@ -496,17 +496,54 @@ void MainMenu::showPrepare()
case ItemP_cooldown: case ItemP_cooldown:
MENUITEM( lcdprintPGM(" Cooldown") , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ; MENUITEM( lcdprintPGM(" Cooldown") , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
break; break;
case ItemP_extrude: // case ItemP_extrude:
MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ; // MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
// break;
case ItemP_move:
MENUITEM( lcdprintPGM(" Move Axis \x7E") , BLOCK;status=Sub_PrepareMove;beepshort(); );
break; break;
default:
default:
break; break;
} }
line++; line++;
} }
updateActiveLines(ItemP_extrude,encoderpos); updateActiveLines(ItemP_move,encoderpos);
}
enum {
ItemAM_exit,
ItemAM_X, ItemAM_Y, ItemAM_Z, ItemAM_E
};
void MainMenu::showAxisMove()
{
uint8_t line=0;
clearIfNecessary();
for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
{
switch(i)
{
case ItemAM_exit:
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemAM_X:
MENUITEM( lcdprintPGM(" X+") , BLOCK;enquecommand("G92 X0");enquecommand("G1 F700 X10");beepshort(); ) ;
break;
case ItemAM_Y:
MENUITEM( lcdprintPGM(" Y+") , BLOCK;enquecommand("G92 Y0");enquecommand("G1 F700 Y10");beepshort(); ) ;
break;
case ItemAM_Z:
MENUITEM( lcdprintPGM(" Z+") , BLOCK;enquecommand("G92 Z0");enquecommand("G1 F700 Z10");beepshort(); ) ;
break;
case ItemAM_E:
MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
break;
default:
break;
}
line++;
}
updateActiveLines(ItemAM_Z,encoderpos);
} }
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle, enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
@ -1813,6 +1850,10 @@ void MainMenu::update()
showPrepare(); showPrepare();
} }
}break; }break;
case Sub_PrepareMove:
{
showAxisMove();
}break;
case Main_Control: case Main_Control:
{ {
showControl(); showControl();

Loading…
Cancel
Save