advanced pause improvements

This commit is contained in:
InsanityAutomation
2022-04-30 10:22:52 -04:00
parent 00152be921
commit 01ab324a12
3 changed files with 39 additions and 3 deletions
+1 -1
View File
@@ -944,7 +944,7 @@
* differs, a mode set eeprom write will be completed at initialization.
* Use the option below to force an eeprom write to a V3.1 probe regardless.
*/
#if NONE(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRMiniE3V2, MachineEnder3S1, Creality422, Creality427, MachineEnder6, MachineEnder7, MachineSermoonD1, MachineCR30, MachineCR6, MachineCR6Max, MachineCR10SmartPro)
#if NONE(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRMiniE3V2, MachineEnder3S1, Creality422, Creality427, MachineEnder6, MachineEnder7, MachineSermoonD1, MachineCR30, MachineCR6, MachineCR6Max, MachineCR10SmartPro, MachineEnder2Pro)
#define BLTOUCH_SET_5V_MODE
#endif
/**
@@ -65,6 +65,7 @@ namespace ExtUI
bool FanStatus = true;
bool AutohomeKey = false;
unsigned char AutoHomeIconNum;
int16_t userConfValidation = 0;
uint8_t lastPauseMsgState = 0;
@@ -75,6 +76,7 @@ namespace ExtUI
uint8_t reEntryCount = 0;
uint16_t idleThrottling = 0;
bool pause_resume_selected = false;
#if HAS_PID_HEATING
uint16_t pid_hotendAutoTemp = 150;
@@ -176,7 +178,7 @@ void onIdle()
rtscheck.RTS_SndData(getTargetTemp_celsius(H0), NozzlePreheat);
rtscheck.RTS_SndData(getTargetTemp_celsius(BED), BedPreheat);
if(awaitingUserConfirm() && lastPauseMsgState!=ExtUI::pauseModeStatus)
if(awaitingUserConfirm() && (lastPauseMsgState!=ExtUI::pauseModeStatus || userConfValidation > 2000))
{
switch(ExtUI::pauseModeStatus)
{
@@ -199,8 +201,23 @@ void onIdle()
case PAUSE_MESSAGE_STATUS: SERIAL_ECHOLNPGM_P(PSTR("PauseStatus")); break;
default: onUserConfirmRequired(PSTR("Confirm Continue")); break;
}
userConfValidation = 0;
} else if (pause_resume_selected && !awaitingUserConfirm()) {
rtscheck.RTS_SndData(ExchangePageBase + 53, ExchangepageAddr);
pause_resume_selected = false;
userConfValidation = 0;
}
else if (awaitingUserConfirm() && !pause_resume_selected)
{
userConfValidation++;
}
else if (awaitingUserConfirm() && pause_resume_selected)
{
pause_resume_selected = false;
userConfValidation = 2001;
}
reEntryPrevent = true;
idleThrottling = 0;
@@ -1795,7 +1812,7 @@ void RTSSHOW::RTS_HandleData()
setUserConfirmed();
RTS_SndData(1 + CEIconGrap, IconPrintstatus);
PrinterStatusKey[1] = 3;
RTS_SndData(ExchangePageBase + 53, ExchangepageAddr);
pause_resume_selected = true;
//reEntryPrevent = false;
}
}
+19
View File
@@ -393,6 +393,7 @@ default_envs =
SermoonD1_BLT_ZM
CR10Smart
Ender2Pro
Ender2Pro_BLT
CR5Pro
CR5Pro_BLT
@@ -3956,6 +3957,24 @@ build_flags = ${stm32_variant.build_flags}
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 -DMachineEnder2Pro
[env:Ender2Pro_BLT]
extends = stm32_variant
board_build.variant = MARLIN_F103Rx
board_build.offset = 0x7000
board_upload.offset_address = 0x08007000
build_unflags = ${stm32_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC
extra_scripts = ${stm32_variant.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py
monitor_speed = 115200
debug_tool = jlink
upload_protocol = jlink
board = genericSTM32F103RC
build_flags = ${stm32_variant.build_flags}
-DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 -DMachineEnder2Pro -DABL_BLTOUCH
[env:CR5Pro]
platform = atmelavr
extends = common_avr8