AddToggles

This commit is contained in:
InsanityAutomation
2022-02-06 12:01:08 -05:00
parent c13d290934
commit 43bc8c3865
3 changed files with 62 additions and 6 deletions
+5 -4
View File
@@ -2006,7 +2006,7 @@
* The probe replaces the Z-MIN endstop and is used for Z homing.
* (Automatically enables USE_PROBE_FOR_Z_HOMING.)
*/
#if NONE(Creality422, Creality427, MachineEnder6) && DISABLED(Creality42XUseZMin) || DISABLED(ABL_BLTOUCH)
#if NONE(Creality422, Creality427, MachineEnder6, MachineEnder7) && DISABLED(Creality42XUseZMin) || DISABLED(ABL_BLTOUCH)
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#endif
// Force the use of the probe for Z-axis homing
@@ -4133,7 +4133,7 @@
// Third-party or vendor-customized controller interfaces.
// Sources should be installed in 'src/lcd/extui'.
//
#if ANY(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, MachineEnder6, MachineEnder7, MachineSermoonD1) && (NONE(GraphicLCD, SKRMiniE3V2, OrigLCD) || ENABLED(FORCE10SPRODISPLAY))
#if ANY(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, MachineEnder6, MachineEnder7, MachineSermoonD1, MachineCR10Smart) && (NONE(GraphicLCD, SKRMiniE3V2, OrigLCD) || ENABLED(FORCE10SPRODISPLAY))
#ifndef FORCE10SPRODISPLAY
#define FORCE10SPRODISPLAY
#endif
@@ -4341,8 +4341,9 @@
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM
#if ANY(SKRPRO11, SKRMiniE3V2, MachineEnder6, MachineEnder7, Creality427, Creality422, SKR_CR6, CR6_452, MachineCR30, MachineCR6, MachineCR6Max, MachineCR10Smart)
#define FAN_SOFT_PWM
#endif
// Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
// However, control resolution will be halved for each increment;
+1 -1
View File
@@ -281,7 +281,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
// Show "Purge More" / "Resume" menu and wait for reply
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = false;
#if EITHER(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI)
#if ANY(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI)
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
#else
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
@@ -273,6 +273,28 @@ void onIdle()
rtscheck.RTS_SndData(2, AutoLevelIcon); /*Off*/
#endif
#if HAS_FILAMENT_SENSOR
if(getFilamentRunoutEnabled())
rtscheck.RTS_SndData(3, RunoutToggle); /*On*/
else
rtscheck.RTS_SndData(2, RunoutToggle); /*Off*/
#endif
#if ENABLED(CASE_LIGHT_ENABLE)
if(getCaseLightState())
rtscheck.RTS_SndData(3, LedToggle); /*On*/
else
rtscheck.RTS_SndData(2, LedToggle); /*Off*/
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
if(getPowerLossRecoveryEnabled())
rtscheck.RTS_SndData(3, PowerLossToggle); /*On*/
else
rtscheck.RTS_SndData(2, PowerLossToggle); /*Off*/
#endif
if (startprogress == 0)
{
startprogress += 25;
@@ -787,6 +809,9 @@ void RTSSHOW::RTS_HandleData()
case Jerk_Y:
case Jerk_Z:
case Jerk_E:
case RunoutToggle:
case PowerLossToggle:
case LedToggle:
Checkkey = ManualSetTemp;
break;
}
@@ -1190,6 +1215,36 @@ void RTSSHOW::RTS_HandleData()
}
#endif
#if HAS_FILAMENT_SENSOR
else if(recdat.addr == RunoutToggle){
if(getFilamentRunoutEnabled())
setFilamentRunoutEnabled(false);
else
setFilamentRunoutEnabled(true);
}
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
else if(recdat.addr == PowerLossToggle){
if(getPowerLossRecoveryEnabled())
setPowerLossRecoveryEnabled(false);
else
setPowerLossRecoveryEnabled(true);
}
#endif
#if ENABLED(CASE_LIGHT_ENABLE)
else if(recdat.addr == LedToggle){
if(getCaseLightState())
setCaseLightState(false);
else
setCaseLightState(true);
}
#endif
#if HAS_PID_HEATING
else if (recdat.addr == HotendPID_P) {
setPIDValues(tmp_float_handling*10, getPIDValues_Ki(getActiveTool()), getPIDValues_Kd(getActiveTool()), getActiveTool());
@@ -1271,7 +1326,7 @@ void RTSSHOW::RTS_HandleData()
else if (recdat.data[0] == 3) //Move
{
AxisPagenum = 0;
RTS_SndData(ExchangePageBase + 21, ExchangepageAddr);
RTS_SndData(ExchangePageBase + 71, ExchangepageAddr);
}
else if (recdat.data[0] == 4) //Language
{