Temperature ISR synchronization, M600 - faster unload

This commit is contained in:
Robert Pelnar 2018-01-15 17:29:07 +01:00
parent 9d52d017df
commit 981a681e52
3 changed files with 30 additions and 18 deletions

View File

@ -11,7 +11,7 @@
#define FW_VERSION "3.1.1-RC4" #define FW_VERSION "3.1.1-RC4"
#define FW_COMMIT_NR 146 #define FW_COMMIT_NR 146
#define FW_DEV_VERSION FW_VERSION_RC #define FW_DEV_VERSION FW_VERSION_RC
#define FW_VERSION_FULL FW_VERSION "-" STR(FW_COMMIT_NR) #define FW_VERSION_FULL FW_VERSION "-" STR(FW_COMMIT_NR)"c"
#define FW_VERSION_UNKNOWN 4 #define FW_VERSION_UNKNOWN 4
#define FW_VERSION_ALPHA 3 #define FW_VERSION_ALPHA 3

View File

@ -5667,10 +5667,10 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5200 / 60, active_extruder); plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5200 / 60, active_extruder);
st_synchronize(); st_synchronize();
target[E_AXIS] -= 15; target[E_AXIS] -= 15;
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 160 / 60, active_extruder); plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 1000 / 60, active_extruder);
st_synchronize(); st_synchronize();
target[E_AXIS] -= 20; target[E_AXIS] -= 20;
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5000 / 60, active_extruder); plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 1000 / 60, active_extruder);
st_synchronize(); st_synchronize();
#endif // SNMM #endif // SNMM

View File

@ -335,22 +335,28 @@ uint8_t lcdDrawUpdate = 2; /* Set to none-zero when the LCD nee
// float raw_Ki, raw_Kd; // float raw_Ki, raw_Kd;
#endif #endif
static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder = 0, const bool feedback = true, bool reset_menu_state = true) { static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder = 0, const bool feedback = true, bool reset_menu_state = true)
if (currentMenu != menu) { {
currentMenu = menu; asm("cli");
encoderPosition = encoder; if (currentMenu != menu)
if (reset_menu_state) { {
// Resets the global shared C union. currentMenu = menu;
// This ensures, that the menu entered will find out, that it shall initialize itself. encoderPosition = encoder;
memset(&menuData, 0, sizeof(menuData)); asm("sei");
} if (reset_menu_state)
if (feedback) lcd_quick_feedback(); {
// Resets the global shared C union.
// For LCD_PROGRESS_BAR re-initialize the custom characters // This ensures, that the menu entered will find out, that it shall initialize itself.
memset(&menuData, 0, sizeof(menuData));
}
if (feedback) lcd_quick_feedback();
// For LCD_PROGRESS_BAR re-initialize the custom characters
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
lcd_set_custom_characters(menu == lcd_status_screen); lcd_set_custom_characters(menu == lcd_status_screen);
#endif #endif
} }
else
asm("sei");
} }
/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */ /* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
@ -5506,8 +5512,10 @@ void lcd_sdcard_menu()
} \ } \
static void menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) \ static void menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) \
{ \ { \
menuData.editMenuParentState.prevMenu = currentMenu; \ asm("cli"); \
menuData.editMenuParentState.prevMenu = currentMenu; \
menuData.editMenuParentState.prevEncoderPosition = encoderPosition; \ menuData.editMenuParentState.prevEncoderPosition = encoderPosition; \
asm("sei"); \
\ \
lcdDrawUpdate = 2; \ lcdDrawUpdate = 2; \
menuData.editMenuParentState.editLabel = pstr; \ menuData.editMenuParentState.editLabel = pstr; \
@ -6921,6 +6929,9 @@ void lcd_setcontrast(uint8_t value)
/* Warning: This function is called from interrupt context */ /* Warning: This function is called from interrupt context */
void lcd_buttons_update() void lcd_buttons_update()
{ {
static bool _lock = false;
if (_lock) return;
_lock = true;
#ifdef NEWPANEL #ifdef NEWPANEL
uint8_t newbutton = 0; uint8_t newbutton = 0;
if (READ(BTN_EN1) == 0) newbutton |= EN_A; if (READ(BTN_EN1) == 0) newbutton |= EN_A;
@ -7045,6 +7056,7 @@ void lcd_buttons_update()
} }
} }
lastEncoderBits = enc; lastEncoderBits = enc;
_lock = false;
} }
bool lcd_detected(void) bool lcd_detected(void)