long press init
This commit is contained in:
parent
e7dfb98a4f
commit
31c7469b79
2 changed files with 53 additions and 18 deletions
|
@ -2765,19 +2765,6 @@ void process_commands()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/**
|
|
||||||
* G80: Mesh-based Z probe, probes a grid and produces a
|
|
||||||
* mesh to compensate for variable bed height
|
|
||||||
*
|
|
||||||
* The S0 report the points as below
|
|
||||||
*
|
|
||||||
* +----> X-axis
|
|
||||||
* |
|
|
||||||
* |
|
|
||||||
* v Y-axis
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef DIS
|
#ifdef DIS
|
||||||
case 77:
|
case 77:
|
||||||
{
|
{
|
||||||
|
@ -2808,6 +2795,18 @@ void process_commands()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* G80: Mesh-based Z probe, probes a grid and produces a
|
||||||
|
* mesh to compensate for variable bed height
|
||||||
|
*
|
||||||
|
* The S0 report the points as below
|
||||||
|
*
|
||||||
|
* +----> X-axis
|
||||||
|
* |
|
||||||
|
* |
|
||||||
|
* v Y-axis
|
||||||
|
*
|
||||||
|
*/
|
||||||
case 80:
|
case 80:
|
||||||
case_G80:
|
case_G80:
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,6 +106,8 @@ int farm_status = 0;
|
||||||
unsigned long allert_timer = millis();
|
unsigned long allert_timer = millis();
|
||||||
bool printer_connected = true;
|
bool printer_connected = true;
|
||||||
|
|
||||||
|
bool long_press = false;
|
||||||
|
long long_press_timer = millis();
|
||||||
|
|
||||||
bool menuExiting = false;
|
bool menuExiting = false;
|
||||||
|
|
||||||
|
@ -4413,11 +4415,12 @@ void lcd_update_enable(bool enabled)
|
||||||
|
|
||||||
void lcd_update(uint8_t lcdDrawUpdateOverride)
|
void lcd_update(uint8_t lcdDrawUpdateOverride)
|
||||||
{
|
{
|
||||||
if (lcdDrawUpdate < lcdDrawUpdateOverride)
|
|
||||||
lcdDrawUpdate = lcdDrawUpdateOverride;
|
|
||||||
|
|
||||||
if (! lcd_update_enabled)
|
if (lcdDrawUpdate < lcdDrawUpdateOverride)
|
||||||
return;
|
lcdDrawUpdate = lcdDrawUpdateOverride;
|
||||||
|
|
||||||
|
if (!lcd_update_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
#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
|
||||||
|
@ -4484,8 +4487,41 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
|
||||||
encoderDiff = 0;
|
encoderDiff = 0;
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
}
|
}
|
||||||
if (LCD_CLICKED)
|
|
||||||
|
if (LCD_CLICKED) {
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
}/*
|
||||||
|
for (int i = 0; i < 500; i++) {
|
||||||
|
//lcd_buttons_update();
|
||||||
|
if (!LCD_CLICKED) i = 1000;
|
||||||
|
else delay(50);
|
||||||
|
|
||||||
|
|
||||||
|
// if (i >= 500) lcd_goto_menu(lcd_calibration_menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*if(LCD_CLICKED){
|
||||||
|
SERIAL_ECHOLNPGM("ok");
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
if (long_press == false) {
|
||||||
|
long_press = true;
|
||||||
|
long_press_timer = millis();
|
||||||
|
SERIAL_ECHOLNPGM("Su zde!");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ((millis() - long_press_timer) > LONG_PRESS_TIME) {
|
||||||
|
SERIAL_ECHOLNPGM("Su tady!");
|
||||||
|
lcd_goto_menu(lcd_settings_menu);
|
||||||
|
long_press = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
long_press = false;
|
||||||
|
SERIAL_ECHOLNPGM("Jaj!");
|
||||||
|
}*/
|
||||||
#endif//ULTIPANEL
|
#endif//ULTIPANEL
|
||||||
|
|
||||||
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
||||||
|
|
Loading…
Reference in a new issue