Added posibility to set ENCODER_STEPS_PER_MENU_ITEM in Configuration.h like ENCODER_PULSES_PER_STEP as it depends on it for usability
This commit is contained in:
parent
b7eadb9f37
commit
e5d3044801
@ -8,9 +8,9 @@
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= DELTA Printer ===============================
|
//============================= DELTA Printer ===============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// For a Delta printer rplace the configuration files wilth the files in the
|
// For a Delta printer rplace the configuration files wilth the files in the
|
||||||
// example_configurations/delta directory.
|
// example_configurations/delta directory.
|
||||||
//
|
//
|
||||||
|
|
||||||
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
@ -37,7 +37,7 @@
|
|||||||
// 12 = Gen7 v1.3
|
// 12 = Gen7 v1.3
|
||||||
// 13 = Gen7 v1.4
|
// 13 = Gen7 v1.4
|
||||||
// 2 = Cheaptronic v1.0
|
// 2 = Cheaptronic v1.0
|
||||||
// 20 = Sethi 3D_1
|
// 20 = Sethi 3D_1
|
||||||
// 3 = MEGA/RAMPS up to 1.2 = 3
|
// 3 = MEGA/RAMPS up to 1.2 = 3
|
||||||
// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
|
// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
|
||||||
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
|
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
|
||||||
@ -336,9 +336,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
|
|
||||||
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
|
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
|
||||||
// Be sure you have this distance over your Z_MAX_POS in case
|
// Be sure you have this distance over your Z_MAX_POS in case
|
||||||
|
|
||||||
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
|
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
|
||||||
|
|
||||||
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
|
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
|
||||||
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
|
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
|
||||||
|
|
||||||
@ -347,26 +347,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
|
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
|
||||||
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
|
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
|
||||||
|
|
||||||
// #define PROBE_SERVO_DEACTIVATION_DELAY 300
|
// #define PROBE_SERVO_DEACTIVATION_DELAY 300
|
||||||
|
|
||||||
|
|
||||||
//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
|
//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
|
||||||
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
|
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
|
||||||
|
|
||||||
#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
|
#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
|
||||||
// When defined, it will:
|
// When defined, it will:
|
||||||
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
|
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
|
||||||
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
|
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
|
||||||
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
|
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
|
||||||
// - Block Z homing only when the probe is outside bed area.
|
// - Block Z homing only when the probe is outside bed area.
|
||||||
|
|
||||||
#ifdef Z_SAFE_HOMING
|
#ifdef Z_SAFE_HOMING
|
||||||
|
|
||||||
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
|
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
|
||||||
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
|
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -435,6 +435,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
||||||
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
|
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
|
||||||
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
|
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
|
||||||
|
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
||||||
//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
|
//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
|
||||||
//#define ULTIPANEL //the ultipanel as on thingiverse
|
//#define ULTIPANEL //the ultipanel as on thingiverse
|
||||||
|
|
||||||
@ -541,7 +542,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// Shift register panels
|
// Shift register panels
|
||||||
// ---------------------
|
// ---------------------
|
||||||
// 2 wire Non-latching LCD SR from:
|
// 2 wire Non-latching LCD SR from:
|
||||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||||
//#define SR_LCD
|
//#define SR_LCD
|
||||||
#ifdef SR_LCD
|
#ifdef SR_LCD
|
||||||
#define SR_LCD_2W_NL // Non latching 2 wire shiftregister
|
#define SR_LCD_2W_NL // Non latching 2 wire shiftregister
|
||||||
|
@ -90,12 +90,16 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
|
|||||||
#define ENCODER_FEEDRATE_DEADZONE 10
|
#define ENCODER_FEEDRATE_DEADZONE 10
|
||||||
|
|
||||||
#if !defined(LCD_I2C_VIKI)
|
#if !defined(LCD_I2C_VIKI)
|
||||||
#define ENCODER_STEPS_PER_MENU_ITEM 5
|
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||||
|
#define ENCODER_STEPS_PER_MENU_ITEM 5
|
||||||
|
#endif
|
||||||
#ifndef ENCODER_PULSES_PER_STEP
|
#ifndef ENCODER_PULSES_PER_STEP
|
||||||
#define ENCODER_PULSES_PER_STEP 1
|
#define ENCODER_PULSES_PER_STEP 1
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
|
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||||
|
#define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
|
||||||
|
#endif
|
||||||
#ifndef ENCODER_PULSES_PER_STEP
|
#ifndef ENCODER_PULSES_PER_STEP
|
||||||
#define ENCODER_PULSES_PER_STEP 1
|
#define ENCODER_PULSES_PER_STEP 1
|
||||||
#endif
|
#endif
|
||||||
@ -207,7 +211,7 @@ static void lcd_status_screen()
|
|||||||
else if (feedmultiply == 100 && int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE)
|
else if (feedmultiply == 100 && int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE)
|
||||||
{
|
{
|
||||||
feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
|
feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
|
||||||
encoderPosition = 0;
|
encoderPosition = 0;
|
||||||
}
|
}
|
||||||
else if (feedmultiply != 100)
|
else if (feedmultiply != 100)
|
||||||
{
|
{
|
||||||
@ -407,7 +411,7 @@ static void lcd_tune_menu()
|
|||||||
#endif
|
#endif
|
||||||
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||||
MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
|
MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
|
||||||
|
|
||||||
#ifdef BABYSTEPPING
|
#ifdef BABYSTEPPING
|
||||||
#ifdef BABYSTEP_XY
|
#ifdef BABYSTEP_XY
|
||||||
MENU_ITEM(submenu, "Babystep X", lcd_babystep_x);
|
MENU_ITEM(submenu, "Babystep X", lcd_babystep_x);
|
||||||
@ -719,7 +723,7 @@ static void lcd_control_motion_menu()
|
|||||||
MENU_ITEM_EDIT(float52, MSG_XSTEPS, &axis_steps_per_unit[X_AXIS], 5, 9999);
|
MENU_ITEM_EDIT(float52, MSG_XSTEPS, &axis_steps_per_unit[X_AXIS], 5, 9999);
|
||||||
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
|
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
|
||||||
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
|
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
|
||||||
MENU_ITEM_EDIT(float51, MSG_ESTEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);
|
MENU_ITEM_EDIT(float51, MSG_ESTEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);
|
||||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||||
MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
|
MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
|
||||||
#endif
|
#endif
|
||||||
@ -781,7 +785,7 @@ static void lcd_sd_updir()
|
|||||||
|
|
||||||
void lcd_sdcard_menu()
|
void lcd_sdcard_menu()
|
||||||
{
|
{
|
||||||
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
||||||
return; // nothing to do (so don't thrash the SD card)
|
return; // nothing to do (so don't thrash the SD card)
|
||||||
uint16_t fileCnt = card.getnrfilenames();
|
uint16_t fileCnt = card.getnrfilenames();
|
||||||
START_MENU();
|
START_MENU();
|
||||||
@ -795,7 +799,7 @@ void lcd_sdcard_menu()
|
|||||||
}else{
|
}else{
|
||||||
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
|
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint16_t i=0;i<fileCnt;i++)
|
for(uint16_t i=0;i<fileCnt;i++)
|
||||||
{
|
{
|
||||||
if (_menuItemNr == _lineNr)
|
if (_menuItemNr == _lineNr)
|
||||||
@ -982,14 +986,14 @@ void lcd_init()
|
|||||||
|
|
||||||
#ifdef NEWPANEL
|
#ifdef NEWPANEL
|
||||||
pinMode(BTN_EN1,INPUT);
|
pinMode(BTN_EN1,INPUT);
|
||||||
pinMode(BTN_EN2,INPUT);
|
pinMode(BTN_EN2,INPUT);
|
||||||
pinMode(SDCARDDETECT,INPUT);
|
pinMode(SDCARDDETECT,INPUT);
|
||||||
WRITE(BTN_EN1,HIGH);
|
WRITE(BTN_EN1,HIGH);
|
||||||
WRITE(BTN_EN2,HIGH);
|
WRITE(BTN_EN2,HIGH);
|
||||||
#if BTN_ENC > 0
|
#if BTN_ENC > 0
|
||||||
pinMode(BTN_ENC,INPUT);
|
pinMode(BTN_ENC,INPUT);
|
||||||
WRITE(BTN_ENC,HIGH);
|
WRITE(BTN_ENC,HIGH);
|
||||||
#endif
|
#endif
|
||||||
#ifdef REPRAPWORLD_KEYPAD
|
#ifdef REPRAPWORLD_KEYPAD
|
||||||
pinMode(SHIFT_CLK,OUTPUT);
|
pinMode(SHIFT_CLK,OUTPUT);
|
||||||
pinMode(SHIFT_LD,OUTPUT);
|
pinMode(SHIFT_LD,OUTPUT);
|
||||||
@ -1007,9 +1011,9 @@ void lcd_init()
|
|||||||
pinMode(SHIFT_EN,OUTPUT);
|
pinMode(SHIFT_EN,OUTPUT);
|
||||||
pinMode(SHIFT_OUT,INPUT);
|
pinMode(SHIFT_OUT,INPUT);
|
||||||
WRITE(SHIFT_OUT,HIGH);
|
WRITE(SHIFT_OUT,HIGH);
|
||||||
WRITE(SHIFT_LD,HIGH);
|
WRITE(SHIFT_LD,HIGH);
|
||||||
WRITE(SHIFT_EN,LOW);
|
WRITE(SHIFT_EN,LOW);
|
||||||
#endif // SR_LCD_2W_NL
|
#endif // SR_LCD_2W_NL
|
||||||
#endif//!NEWPANEL
|
#endif//!NEWPANEL
|
||||||
|
|
||||||
#if (SDCARDDETECT > 0)
|
#if (SDCARDDETECT > 0)
|
||||||
@ -1020,28 +1024,28 @@ void lcd_init()
|
|||||||
slow_buttons = 0;
|
slow_buttons = 0;
|
||||||
#endif
|
#endif
|
||||||
lcd_buttons_update();
|
lcd_buttons_update();
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
encoderDiff = 0;
|
encoderDiff = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_update()
|
void lcd_update()
|
||||||
{
|
{
|
||||||
static unsigned long timeoutToStatus = 0;
|
static unsigned long timeoutToStatus = 0;
|
||||||
|
|
||||||
#ifdef LCD_HAS_SLOW_BUTTONS
|
#ifdef LCD_HAS_SLOW_BUTTONS
|
||||||
slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
|
slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lcd_buttons_update();
|
lcd_buttons_update();
|
||||||
|
|
||||||
#if (SDCARDDETECT > 0)
|
#if (SDCARDDETECT > 0)
|
||||||
if((IS_SD_INSERTED != lcd_oldcardstatus))
|
if((IS_SD_INSERTED != lcd_oldcardstatus))
|
||||||
{
|
{
|
||||||
lcdDrawUpdate = 2;
|
lcdDrawUpdate = 2;
|
||||||
lcd_oldcardstatus = IS_SD_INSERTED;
|
lcd_oldcardstatus = IS_SD_INSERTED;
|
||||||
lcd_implementation_init(); // to maybe revive the lcd if static electricty killed it.
|
lcd_implementation_init(); // to maybe revive the lcd if static electricty killed it.
|
||||||
|
|
||||||
if(lcd_oldcardstatus)
|
if(lcd_oldcardstatus)
|
||||||
{
|
{
|
||||||
card.initsd();
|
card.initsd();
|
||||||
@ -1054,7 +1058,7 @@ void lcd_update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif//CARDINSERTED
|
#endif//CARDINSERTED
|
||||||
|
|
||||||
if (lcd_next_update_millis < millis())
|
if (lcd_next_update_millis < millis())
|
||||||
{
|
{
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
@ -1095,7 +1099,7 @@ void lcd_update()
|
|||||||
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
||||||
blink++; // Variable for fan animation and alive dot
|
blink++; // Variable for fan animation and alive dot
|
||||||
u8g.firstPage();
|
u8g.firstPage();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
u8g.setFont(u8g_font_6x10_marlin);
|
u8g.setFont(u8g_font_6x10_marlin);
|
||||||
u8g.setPrintPos(125,0);
|
u8g.setPrintPos(125,0);
|
||||||
@ -1105,7 +1109,7 @@ void lcd_update()
|
|||||||
(*currentMenu)();
|
(*currentMenu)();
|
||||||
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
||||||
} while( u8g.nextPage() );
|
} while( u8g.nextPage() );
|
||||||
#else
|
#else
|
||||||
(*currentMenu)();
|
(*currentMenu)();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1159,7 +1163,7 @@ void lcd_reset_alert_level()
|
|||||||
void lcd_setcontrast(uint8_t value)
|
void lcd_setcontrast(uint8_t value)
|
||||||
{
|
{
|
||||||
lcd_contrast = value & 63;
|
lcd_contrast = value & 63;
|
||||||
u8g.setContrast(lcd_contrast);
|
u8g.setContrast(lcd_contrast);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1199,7 +1203,7 @@ void lcd_buttons_update()
|
|||||||
WRITE(SHIFT_LD,HIGH);
|
WRITE(SHIFT_LD,HIGH);
|
||||||
unsigned char tmp_buttons=0;
|
unsigned char tmp_buttons=0;
|
||||||
for(int8_t i=0;i<8;i++)
|
for(int8_t i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
newbutton = newbutton>>1;
|
newbutton = newbutton>>1;
|
||||||
if(READ(SHIFT_OUT))
|
if(READ(SHIFT_OUT))
|
||||||
newbutton|=(1<<7);
|
newbutton|=(1<<7);
|
||||||
@ -1249,14 +1253,14 @@ void lcd_buttons_update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void lcd_buzz(long duration, uint16_t freq)
|
void lcd_buzz(long duration, uint16_t freq)
|
||||||
{
|
{
|
||||||
#ifdef LCD_USE_I2C_BUZZER
|
#ifdef LCD_USE_I2C_BUZZER
|
||||||
lcd.buzz(duration,freq);
|
lcd.buzz(duration,freq);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lcd_clicked()
|
bool lcd_clicked()
|
||||||
{
|
{
|
||||||
return LCD_CLICKED;
|
return LCD_CLICKED;
|
||||||
}
|
}
|
||||||
#endif//ULTIPANEL
|
#endif//ULTIPANEL
|
||||||
|
Loading…
Reference in New Issue
Block a user