Add e3 options for CR6 touch
This commit is contained in:
+10
-11
@@ -19,8 +19,7 @@
|
||||
|
||||
// Touchscreens in development, not tested
|
||||
//#define MachineCR5
|
||||
//#define MachineEnder3V2Touchscreen
|
||||
//#define MachineCR30Touchscreen
|
||||
//#define MachineEnder3Touchscreen
|
||||
|
||||
// Standard Display Atmega2560 machines (No bootloader required)
|
||||
//#define MachineEnder4
|
||||
@@ -596,7 +595,7 @@
|
||||
#define SHOW_BOOTSCREEN
|
||||
|
||||
// Show the bitmap in Marlin/_Bootscreen.h on startup.
|
||||
#if DISABLED(MachineEnder3V2, MachineCR6, MachineCR6Max)
|
||||
#if DISABLED(MachineEnder3V2, MachineCR6, MachineCR6Max, MachineEnder3Touchscreen)
|
||||
#define SHOW_CUSTOM_BOOTSCREEN
|
||||
// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
|
||||
#define CUSTOM_STATUS_SCREEN_IMAGE
|
||||
@@ -628,7 +627,7 @@
|
||||
#define LCD_SERIAL_PORT 0
|
||||
#define LCD_BAUDRATE 115200
|
||||
#define SERIAL_CATCHALL -1
|
||||
#elif ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo) && DISABLED(MachineEnder3V2)
|
||||
#elif ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo) && DISABLED(MachineEnder3V2, MachineEnder3Touchscreen)
|
||||
#define SERIAL_PORT_2 0
|
||||
#elif ENABLED(SKRMiniE3V2)
|
||||
#define SERIAL_PORT_2 2
|
||||
@@ -644,7 +643,7 @@
|
||||
#define LCD_SERIAL_PORT 3
|
||||
#define LCD_BAUDRATE 115200
|
||||
#define SERIAL_CATCHALL 1
|
||||
#elif ANY(Creality422, Creality427) && NONE(MachineEnder3V2, FORCE10SPRODISPLAY)
|
||||
#elif ANY(Creality422, Creality427) && NONE(MachineEnder3V2, FORCE10SPRODISPLAY, MachineEnder3Touchscreen)
|
||||
#define SERIAL_PORT_2 3
|
||||
#elif ANY(Creality422, Creality427) && ENABLED(FORCE10SPRODISPLAY)
|
||||
#define LCD_SERIAL_PORT 3
|
||||
@@ -663,7 +662,7 @@
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#if ANY(MachineEnder3V2, CrealityViewerKit, MachineCR6, MachineCR6Max)
|
||||
#if ANY(MachineEnder3V2, CrealityViewerKit, MachineCR6, MachineCR6Max, MachineEnder3Touchscreen)
|
||||
#define BAUDRATE 115200
|
||||
#else
|
||||
#define BAUDRATE 250000
|
||||
@@ -1688,7 +1687,7 @@
|
||||
*
|
||||
* :[2,3,4,5,6,7]
|
||||
*/
|
||||
#if ANY(MachineEnder5Plus, CableExtensionNoiseFilter, MachineCR6, MachineCR6Max)
|
||||
#if ANY(MachineEnder5Plus, CableExtensionNoiseFilter, MachineCR6, MachineCR6Max, MachineEnder6)
|
||||
#define ENDSTOP_NOISE_THRESHOLD 2
|
||||
#endif
|
||||
|
||||
@@ -2219,7 +2218,7 @@
|
||||
#define Z_AFTER_PROBING 5 // Z position after probing is done
|
||||
#endif
|
||||
|
||||
#define Z_PROBE_LOW_POINT -4 // Farthest distance below the trigger-point to go before stopping
|
||||
#define Z_PROBE_LOW_POINT -5 // Farthest distance below the trigger-point to go before stopping
|
||||
|
||||
// For M851 give a range for adjusting the Z probe offset
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -9
|
||||
@@ -3582,9 +3581,9 @@
|
||||
#define MKS_MINI_12864
|
||||
#elif ENABLED(MachineEnder3V2)
|
||||
#define DWIN_CREALITY_LCD
|
||||
#elif ANY(OrigLCD, MachineCR10Orig, MachineEnder3Pro422, MachineEnder3Pro427, MachineEnder3Max, SKRMiniE3V2, SKRE3Turbo) && DISABLED(GraphicLCD)
|
||||
#elif ANY(OrigLCD, MachineCR10Orig, MachineEnder3Pro422, MachineEnder3Pro427, MachineEnder3Max, SKRMiniE3V2, SKRE3Turbo) && DISABLED(GraphicLCD, MachineEnder3Touchscreen, FORCE10SPRODISPLAY)
|
||||
#define CR10_STOCKDISPLAY
|
||||
#elif NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, OrigLCD, MachineCR10Orig, SKRMiniE3V2, FORCE10SPRODISPLAY, MachineCR6, MachineCR6Max) || ENABLED(GraphicLCD)
|
||||
#elif NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, OrigLCD, MachineCR10Orig, SKRMiniE3V2, FORCE10SPRODISPLAY, MachineCR6, MachineCR6Max, MachineEnder3Touchscreen) || ENABLED(GraphicLCD)
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
#endif
|
||||
//
|
||||
@@ -3881,7 +3880,7 @@
|
||||
//
|
||||
// CR-6 OEM touch screen. A DWIN display with touch.
|
||||
//
|
||||
#if ANY(MachineCR6, MachineCR6Max)
|
||||
#if ANY(MachineCR6, MachineCR6Max, MachineEnder3Touchscreen)
|
||||
#define DGUS_LCD_UI_CREALITY_TOUCH
|
||||
#endif
|
||||
|
||||
|
||||
@@ -894,7 +894,7 @@
|
||||
* This feature was designed for Deltabots with very fast Z moves; however, higher speed Cartesians
|
||||
* might be able to use it. If the machine can't raise Z fast enough the BLTouch may go into ALARM.
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard, MachineCRX)
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard, MachineCRXs)
|
||||
#define BLTOUCH_HS_MODE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
#include "../../../sd/cardreader.h"
|
||||
#include "../../../libs/duration_t.h"
|
||||
#include "../../../module/printcounter.h"
|
||||
#include "../../../feature/caselight.h"
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
#include "../../../feature/caselight.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../../../feature/powerloss.h"
|
||||
@@ -154,9 +156,11 @@ void DGUSScreenHandler::LoadSettings(const char* buff) {
|
||||
SERIAL_ECHOLNPGM("Loading DWIN LCD setting from EEPROM");
|
||||
memcpy(&Settings, &eepromSettings, sizeof(creality_dwin_settings_t));
|
||||
|
||||
// Apply settings
|
||||
caselight.on = Settings.led_state;
|
||||
caselight.update(Settings.led_state);
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
// Apply settings
|
||||
caselight.on = Settings.led_state;
|
||||
caselight.update(Settings.led_state);
|
||||
#endif
|
||||
|
||||
#if HAS_COLOR_LEDS_PREFERENCES
|
||||
leds.set_color(Settings.LastLEDColor);
|
||||
@@ -171,8 +175,10 @@ void DGUSScreenHandler::StoreSettings(char* buff) {
|
||||
"Insufficient space in EEPROM for UI parameters"
|
||||
);
|
||||
|
||||
// Update settings from Marlin state, if necessary
|
||||
Settings.led_state = caselight.on;
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
// Update settings from Marlin state, if necessary
|
||||
Settings.led_state = caselight.on;
|
||||
#endif
|
||||
|
||||
#if HAS_COLOR_LEDS_PREFERENCES
|
||||
Settings.LastLEDColor = leds.color;
|
||||
@@ -1269,9 +1275,10 @@ void DGUSScreenHandler::HandleScreenVersionMismatchLEDFlash() {
|
||||
if (ELAPSED(ms, next_event_ms)) {
|
||||
next_event_ms = ms + VERSION_MISMATCH_LED_FLASH_DELAY;
|
||||
|
||||
caselight.on = !caselight.on;
|
||||
caselight.update(caselight.on);
|
||||
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
caselight.on = !caselight.on;
|
||||
caselight.update(caselight.on);
|
||||
#endif
|
||||
#if HAS_COLOR_LEDS
|
||||
if (caselight.on) {
|
||||
leds.set_color(LEDColorRed());
|
||||
@@ -1475,13 +1482,15 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleLEDToggle() {
|
||||
bool newState = !caselight.on;
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
bool newState = !caselight.on;
|
||||
|
||||
caselight.on = newState;
|
||||
caselight.update(newState);
|
||||
caselight.on = newState;
|
||||
caselight.update(newState);
|
||||
|
||||
RequestSaveSettings();
|
||||
ForceCompleteUpdate();
|
||||
RequestSaveSettings();
|
||||
ForceCompleteUpdate();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleToggleTouchScreenMute(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
@@ -736,7 +736,9 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
||||
VPHELPER(VP_FILCHANGE_ACTION_BUTTON, nullptr, FilamentLoadUnloadHandler::HandleLoadUnloadButton, nullptr),
|
||||
|
||||
// Icons
|
||||
VPHELPER(VP_LED_TOGGLE, &caselight.on, nullptr, (ScreenHandler.DGUSLCD_SendIconValue<ICON_LED_TOGGLE_ON, ICON_LED_TOGGLE_OFF>)),
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
VPHELPER(VP_LED_TOGGLE, &caselight.on, nullptr, (ScreenHandler.DGUSLCD_SendIconValue<ICON_LED_TOGGLE_ON, ICON_LED_TOGGLE_OFF>)),
|
||||
#endif
|
||||
VPHELPER(VP_STANDBY_BACKLIGHT_ICON, &ScreenHandler.Settings.display_standby, nullptr, (ScreenHandler.DGUSLCD_SendIconValue<ICON_TOGGLE_ON, ICON_TOGGLE_OFF>)),
|
||||
VPHELPER(VP_MUTE_ICON, &ScreenHandler.Settings.display_sound, nullptr, (ScreenHandler.DGUSLCD_SendIconValue<ICON_SOUND_TOGGLE_ON, ICON_SOUND_TOGGLE_OFF>)),
|
||||
|
||||
|
||||
@@ -114,6 +114,9 @@ bool hasPrintTimer = false;
|
||||
|
||||
void onFilamentRunout(const extruder_t extruder) {
|
||||
// Only navigate to filament runout screen when we don't use M600 for changing the filament - otherwise it gets confusing for the user
|
||||
#ifndef FILAMENT_RUNOUT_SCRIPT
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M25"
|
||||
#endif
|
||||
if (strcmp_P(FILAMENT_RUNOUT_SCRIPT, PSTR("M600")) != 0) {
|
||||
ScreenHandler.FilamentRunout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user