smaller changes
This commit is contained in:
parent
4cc8e37bf1
commit
0e3631ff4b
3 changed files with 301 additions and 85 deletions
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
|
|
||||||
// This determines the communication speed of the printer
|
// This determines the communication speed of the printer
|
||||||
#define BAUDRATE 250000
|
//#define BAUDRATE 250000
|
||||||
//#define BAUDRATE 115200
|
#define BAUDRATE 115200
|
||||||
//#define BAUDRATE 230400
|
//#define BAUDRATE 230400
|
||||||
|
|
||||||
#define EXTRUDERS 1
|
#define EXTRUDERS 1
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
// MEGA/RAMPS up to 1.2 = 3,
|
// MEGA/RAMPS up to 1.2 = 3,
|
||||||
// RAMPS 1.3 = 33
|
// RAMPS 1.3 = 33
|
||||||
// Gen6 = 5,
|
// Gen6 = 5,
|
||||||
// Sanguinololu 1.2 and above = 62,
|
// Sanguinololu 1.2 and above = 62
|
||||||
// Ultimaker = 7,
|
|
||||||
// Gen7 = 77,
|
// Gen7 = 77,
|
||||||
|
// Ultimaker = 7,
|
||||||
// Teensylu = 8
|
// Teensylu = 8
|
||||||
#define MOTHERBOARD 7
|
#define MOTHERBOARD 77
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//=============================Thermal Settings ============================
|
//=============================Thermal Settings ============================
|
||||||
|
@ -45,20 +45,20 @@
|
||||||
// 6 is EPCOS 100k
|
// 6 is EPCOS 100k
|
||||||
// 7 is 100k Honeywell thermistor 135-104LAG-J01
|
// 7 is 100k Honeywell thermistor 135-104LAG-J01
|
||||||
|
|
||||||
//#define THERMISTORHEATER_0 3
|
#define THERMISTORHEATER_0 1
|
||||||
//#define THERMISTORHEATER_1 1
|
//#define THERMISTORHEATER_1 1
|
||||||
//#define THERMISTORHEATER_2 1
|
//#define THERMISTORHEATER_2 1
|
||||||
|
|
||||||
//#define HEATER_0_USES_THERMISTOR
|
#define HEATER_0_USES_THERMISTOR
|
||||||
//#define HEATER_1_USES_THERMISTOR
|
//#define HEATER_1_USES_THERMISTOR
|
||||||
//#define HEATER_2_USES_THERMISTOR
|
//#define HEATER_2_USES_THERMISTOR
|
||||||
#define HEATER_0_USES_AD595
|
//#define HEATER_0_USES_AD595
|
||||||
//#define HEATER_1_USES_AD595
|
//#define HEATER_1_USES_AD595
|
||||||
//#define HEATER_2_USES_AD595
|
//#define HEATER_2_USES_AD595
|
||||||
|
|
||||||
// Select one of these only to define how the bed temp is read.
|
// Select one of these only to define how the bed temp is read.
|
||||||
//#define THERMISTORBED 1
|
#define THERMISTORBED 1
|
||||||
//#define BED_USES_THERMISTOR
|
#define BED_USES_THERMISTOR
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
#ifdef BED_LIMIT_SWITCHING
|
#ifdef BED_LIMIT_SWITCHING
|
||||||
#define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
|
#define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
|
||||||
|
@ -75,10 +75,10 @@
|
||||||
|
|
||||||
// Actual temperature must be close to target for this long before M109 returns success
|
// Actual temperature must be close to target for this long before M109 returns success
|
||||||
#define TEMP_RESIDENCY_TIME 30 // (seconds)
|
#define TEMP_RESIDENCY_TIME 30 // (seconds)
|
||||||
#define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one
|
#define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one
|
||||||
|
|
||||||
//// The minimal temperature defines the temperature below which the heater will not be enabled
|
//// The minimal temperature defines the temperature below which the heater will not be enabled
|
||||||
#define HEATER_0_MINTEMP 5
|
//#define HEATER_0_MINTEMP 5
|
||||||
//#define HEATER_1_MINTEMP 5
|
//#define HEATER_1_MINTEMP 5
|
||||||
//#define HEATER_2_MINTEMP 5
|
//#define HEATER_2_MINTEMP 5
|
||||||
//#define BED_MINTEMP 5
|
//#define BED_MINTEMP 5
|
||||||
|
@ -184,9 +184,9 @@
|
||||||
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
|
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
|
||||||
|
|
||||||
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
|
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
|
||||||
const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
||||||
const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
||||||
const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
||||||
// For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
|
// For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
|
||||||
|
|
||||||
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
|
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
|
||||||
|
@ -209,9 +209,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||||
//#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
|
//#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
|
||||||
//#define INVERT_E*_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false, used for all extruders
|
//#define INVERT_E*_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false, used for all extruders
|
||||||
|
|
||||||
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
|
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
|
||||||
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
|
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
|
||||||
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
|
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
|
||||||
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
||||||
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
||||||
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
||||||
|
@ -256,7 +256,8 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
|
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
|
||||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0
|
#define DEFAULT_MINTRAVELFEEDRATE 0.0
|
||||||
|
|
||||||
// minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while printing high speed & high detail. It will slowdown on the detailed stuff.
|
// minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while
|
||||||
|
//printing high speed & high detail. It will slowdown on the detailed stuff.
|
||||||
#define DEFAULT_MINSEGMENTTIME 20000 // Obsolete delete this
|
#define DEFAULT_MINSEGMENTTIME 20000 // Obsolete delete this
|
||||||
#define DEFAULT_XYJERK 20.0 // (mm/sec)
|
#define DEFAULT_XYJERK 20.0 // (mm/sec)
|
||||||
#define DEFAULT_ZJERK 0.4 // (mm/sec)
|
#define DEFAULT_ZJERK 0.4 // (mm/sec)
|
||||||
|
@ -321,9 +322,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||||
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
|
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
|
||||||
#define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
|
#define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
|
||||||
|
|
||||||
//#define ULTIPANEL
|
#define ULTIPANEL
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
//#define NEWPANEL //enable this if you have a click-encoder panel
|
#define NEWPANEL //enable this if you have a click-encoder panel
|
||||||
#define SDSUPPORT
|
#define SDSUPPORT
|
||||||
#define ULTRA_LCD
|
#define ULTRA_LCD
|
||||||
#define LCD_WIDTH 20
|
#define LCD_WIDTH 20
|
||||||
|
@ -359,7 +360,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||||
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
|
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
|
||||||
//can be software-disabled for whatever purposes by
|
//can be software-disabled for whatever purposes by
|
||||||
#define PREVENT_DANGEROUS_EXTRUDE
|
#define PREVENT_DANGEROUS_EXTRUDE
|
||||||
#define EXTRUDE_MINTEMP 190
|
#define EXTRUDE_MINTEMP 0
|
||||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||||
|
|
||||||
const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -392,3 +393,5 @@ const int dropsegments=5; //everything with less than this number of steps will
|
||||||
#include "thermistortables.h"
|
#include "thermistortables.h"
|
||||||
|
|
||||||
#endif //__CONFIGURATION_H
|
#endif //__CONFIGURATION_H
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -237,9 +237,11 @@ void setup_photpin()
|
||||||
void setup_powerhold()
|
void setup_powerhold()
|
||||||
{
|
{
|
||||||
#ifdef SUICIDE_PIN
|
#ifdef SUICIDE_PIN
|
||||||
|
#if (SUICIDE_PIN> -1)
|
||||||
SET_OUTPUT(SUICIDE_PIN);
|
SET_OUTPUT(SUICIDE_PIN);
|
||||||
WRITE(SUICIDE_PIN, HIGH);
|
WRITE(SUICIDE_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void suicide()
|
void suicide()
|
||||||
|
|
|
@ -527,23 +527,119 @@ void MainMenu::showAxisMove()
|
||||||
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
|
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
|
||||||
break;
|
break;
|
||||||
case ItemAM_X:
|
case ItemAM_X:
|
||||||
MENUITEM( lcdprintPGM(" X+") , BLOCK;enquecommand("G92 X0");enquecommand("G1 F700 X10");beepshort(); ) ;
|
// MENUITEM( lcdprintPGM(" X+") , BLOCK;enquecommand("G92 X0");enquecommand("G1 F700 X10");beepshort(); ) ;
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" X:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(ftostr3(current_position[X_AXIS]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=current_position[X_AXIS];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enquecommand("G1 F700 X"+encoderpos);
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<1) encoderpos=1;
|
||||||
|
if(encoderpos>200) encoderpos=200;
|
||||||
|
lcd.setCursor(13,line);lcd.print(current_position[X_AXIS]);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ItemAM_Y:
|
case ItemAM_Y:
|
||||||
MENUITEM( lcdprintPGM(" Y+") , BLOCK;enquecommand("G92 Y0");enquecommand("G1 F700 Y10");beepshort(); ) ;
|
//MENUITEM( lcdprintPGM(" Y+") , BLOCK;enquecommand("G92 Y0");enquecommand("G1 F700 Y10");beepshort(); ) ;
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" Y:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(ftostr3(current_position[Y_AXIS]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=current_position[Y_AXIS];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enquecommand("G1 F700 Y"+encoderpos);
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<1) encoderpos=1;
|
||||||
|
if(encoderpos>200) encoderpos=200;
|
||||||
|
lcd.setCursor(13,line);lcd.print(current_position[Y_AXIS]);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ItemAM_Z:
|
case ItemAM_Z:
|
||||||
MENUITEM( lcdprintPGM(" Z+") , BLOCK;enquecommand("G92 Z0");enquecommand("G1 F700 Z10");beepshort(); ) ;
|
//MENUITEM( lcdprintPGM(" Z+") , BLOCK;enquecommand("G92 Z0");enquecommand("G1 F700 Z10");beepshort(); ) ;
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" Z:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(ftostr3(current_position[Z_AXIS]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=current_position[Z_AXIS];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enquecommand("G1 F700 Z"+encoderpos);
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<1) encoderpos=1;
|
||||||
|
if(encoderpos>170) encoderpos=170;
|
||||||
|
lcd.setCursor(13,line);lcd.print(current_position[Z_AXIS]);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ItemAM_E:
|
case ItemAM_E:
|
||||||
MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
|
MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E10");beepshort(); ) ;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
updateActiveLines(ItemAM_Z,encoderpos);
|
updateActiveLines(ItemAM_E,encoderpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
|
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
|
||||||
|
@ -1189,7 +1285,7 @@ enum {
|
||||||
ItemCM_vmaxx, ItemCM_vmaxy, ItemCM_vmaxz, ItemCM_vmaxe,
|
ItemCM_vmaxx, ItemCM_vmaxy, ItemCM_vmaxz, ItemCM_vmaxe,
|
||||||
ItemCM_vtravmin,ItemCM_vmin,
|
ItemCM_vtravmin,ItemCM_vmin,
|
||||||
ItemCM_amaxx, ItemCM_amaxy, ItemCM_amaxz, ItemCM_amaxe,
|
ItemCM_amaxx, ItemCM_amaxy, ItemCM_amaxz, ItemCM_amaxe,
|
||||||
ItemCM_aret,ItemCM_esteps
|
ItemCM_aret, ItemCM_xsteps,ItemCM_ysteps, ItemCM_zsteps, ItemCM_esteps
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1465,6 +1561,121 @@ void MainMenu::showControlMotion()
|
||||||
}
|
}
|
||||||
|
|
||||||
}break;
|
}break;
|
||||||
|
case ItemCM_xsteps://axis_steps_per_unit[i] = code_value();
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" X steps/mm:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=(int)axis_steps_per_unit[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float factor=float(encoderpos)/float(axis_steps_per_unit[0]);
|
||||||
|
position[X_AXIS]=lround(position[X_AXIS]*factor);
|
||||||
|
//current_position[3]*=factor;
|
||||||
|
axis_steps_per_unit[X_AXIS]= encoderpos;
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<5) encoderpos=5;
|
||||||
|
if(encoderpos>9999) encoderpos=9999;
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
|
||||||
|
}
|
||||||
|
|
||||||
|
}break;
|
||||||
|
case ItemCM_ysteps://axis_steps_per_unit[i] = code_value();
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" Y steps/mm:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=(int)axis_steps_per_unit[1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float factor=float(encoderpos)/float(axis_steps_per_unit[1]);
|
||||||
|
position[Y_AXIS]=lround(position[Y_AXIS]*factor);
|
||||||
|
//current_position[3]*=factor;
|
||||||
|
axis_steps_per_unit[Y_AXIS]= encoderpos;
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<5) encoderpos=5;
|
||||||
|
if(encoderpos>9999) encoderpos=9999;
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
|
||||||
|
}
|
||||||
|
|
||||||
|
}break;
|
||||||
|
case ItemCM_zsteps://axis_steps_per_unit[i] = code_value();
|
||||||
|
{
|
||||||
|
if(force_lcd_update)
|
||||||
|
{
|
||||||
|
lcd.setCursor(0,line);lcdprintPGM(" Z steps/mm:");
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[2]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((activeline!=line) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(CLICKED)
|
||||||
|
{
|
||||||
|
linechanging=!linechanging;
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
encoderpos=(int)axis_steps_per_unit[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float factor=float(encoderpos)/float(axis_steps_per_unit[2]);
|
||||||
|
position[Z_AXIS]=lround(position[Z_AXIS]*factor);
|
||||||
|
//current_position[3]*=factor;
|
||||||
|
axis_steps_per_unit[Z_AXIS]= encoderpos;
|
||||||
|
encoderpos=activeline*lcdslow;
|
||||||
|
|
||||||
|
}
|
||||||
|
BLOCK;
|
||||||
|
beepshort();
|
||||||
|
}
|
||||||
|
if(linechanging)
|
||||||
|
{
|
||||||
|
if(encoderpos<5) encoderpos=5;
|
||||||
|
if(encoderpos>9999) encoderpos=9999;
|
||||||
|
lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
|
||||||
|
}
|
||||||
|
|
||||||
|
}break;
|
||||||
|
|
||||||
case ItemCM_esteps://axis_steps_per_unit[i] = code_value();
|
case ItemCM_esteps://axis_steps_per_unit[i] = code_value();
|
||||||
{
|
{
|
||||||
if(force_lcd_update)
|
if(force_lcd_update)
|
||||||
|
|
Reference in a new issue