|
@ -29,9 +29,16 @@ |
|
|
#include "rotary_encoder.h" |
|
|
#include "rotary_encoder.h" |
|
|
#include "../../../libs/BL24CXX.h" |
|
|
#include "../../../libs/BL24CXX.h" |
|
|
|
|
|
|
|
|
#include <stdint.h> |
|
|
#include "../../../inc/MarlinConfigPre.h" |
|
|
|
|
|
|
|
|
enum processID { |
|
|
#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT |
|
|
|
|
|
#define HAS_PREHEAT 1 |
|
|
|
|
|
#if PREHEAT_COUNT < 2 |
|
|
|
|
|
#error "Creality DWIN requires two material preheat presets." |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
enum processID : uint8_t { |
|
|
// Process ID
|
|
|
// Process ID
|
|
|
MainMenu, |
|
|
MainMenu, |
|
|
SelectFile, |
|
|
SelectFile, |
|
@ -44,7 +51,7 @@ enum processID { |
|
|
Motion, |
|
|
Motion, |
|
|
Info, |
|
|
Info, |
|
|
Tune, |
|
|
Tune, |
|
|
#if HAS_HOTEND |
|
|
#if HAS_PREHEAT |
|
|
PLAPreheat, |
|
|
PLAPreheat, |
|
|
ABSPreheat, |
|
|
ABSPreheat, |
|
|
#endif |
|
|
#endif |
|
@ -218,7 +225,7 @@ enum processID { |
|
|
#define BarFill_Color 0x10E4 // fill color of progress bar
|
|
|
#define BarFill_Color 0x10E4 // fill color of progress bar
|
|
|
#define Select_Color 0x33BB // selected color
|
|
|
#define Select_Color 0x33BB // selected color
|
|
|
|
|
|
|
|
|
extern int checkkey, last_checkkey; |
|
|
extern uint8_t checkkey; |
|
|
extern float zprobe_zoffset; |
|
|
extern float zprobe_zoffset; |
|
|
extern char print_filename[16]; |
|
|
extern char print_filename[16]; |
|
|
|
|
|
|
|
@ -227,7 +234,7 @@ extern millis_t dwin_heat_time; |
|
|
typedef struct { |
|
|
typedef struct { |
|
|
TERN_(HAS_HOTEND, int16_t E_Temp = 0); |
|
|
TERN_(HAS_HOTEND, int16_t E_Temp = 0); |
|
|
TERN_(HAS_HEATED_BED, int16_t Bed_Temp = 0); |
|
|
TERN_(HAS_HEATED_BED, int16_t Bed_Temp = 0); |
|
|
TERN_(HAS_FAN, int16_t Fan_speed = 0); |
|
|
TERN_(HAS_PREHEAT, int16_t Fan_speed = 0); |
|
|
int16_t print_speed = 100; |
|
|
int16_t print_speed = 100; |
|
|
float Max_Feedspeed = 0; |
|
|
float Max_Feedspeed = 0; |
|
|
float Max_Acceleration = 0; |
|
|
float Max_Acceleration = 0; |
|
@ -236,7 +243,7 @@ typedef struct { |
|
|
float Move_X_scale = 0; |
|
|
float Move_X_scale = 0; |
|
|
float Move_Y_scale = 0; |
|
|
float Move_Y_scale = 0; |
|
|
float Move_Z_scale = 0; |
|
|
float Move_Z_scale = 0; |
|
|
#if EXTRUDERS |
|
|
#if HAS_HOTEND |
|
|
float Move_E_scale = 0; |
|
|
float Move_E_scale = 0; |
|
|
#endif |
|
|
#endif |
|
|
float offset_value = 0; |
|
|
float offset_value = 0; |
|
@ -246,33 +253,27 @@ typedef struct { |
|
|
typedef struct { |
|
|
typedef struct { |
|
|
bool language_chinese; // 0: EN, 1: CN
|
|
|
bool language_chinese; // 0: EN, 1: CN
|
|
|
bool pause_flag:1; |
|
|
bool pause_flag:1; |
|
|
|
|
|
bool pause_action:1; |
|
|
bool print_finish:1; |
|
|
bool print_finish:1; |
|
|
bool confirm_flag:1; |
|
|
bool done_confirm_flag:1; |
|
|
bool select_flag:1; |
|
|
bool select_flag:1; |
|
|
bool home_flag:1; |
|
|
bool home_flag:1; |
|
|
bool heat_flag:1; // 0: heating done 1: during heating
|
|
|
bool heat_flag:1; // 0: heating done 1: during heating
|
|
|
#if HAS_HOTEND |
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION) |
|
|
bool ETempTooLow_flag:1; |
|
|
bool ETempTooLow_flag:1; |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_LEVELING |
|
|
#if HAS_LEVELING |
|
|
bool leveling_offset_flag:1; |
|
|
bool leveling_offset_flag:1; |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_FAN |
|
|
#if HAS_FAN |
|
|
AxisEnum feedspeed_flag; |
|
|
AxisEnum feedspeed_axis; |
|
|
#endif |
|
|
#endif |
|
|
AxisEnum acc_flag; |
|
|
AxisEnum acc_axis, jerk_axis, step_axis; |
|
|
AxisEnum jerk_flag; |
|
|
|
|
|
AxisEnum step_flag; |
|
|
|
|
|
} HMI_Flag; |
|
|
} HMI_Flag; |
|
|
|
|
|
|
|
|
extern HMI_value_t HMI_ValueStruct; |
|
|
extern HMI_value_t HMI_ValueStruct; |
|
|
extern HMI_Flag HMI_flag; |
|
|
extern HMI_Flag HMI_flag; |
|
|
|
|
|
|
|
|
// Language
|
|
|
|
|
|
void HMI_SetLanguage(void); |
|
|
|
|
|
void HMI_SetAndSaveLanguageWestern(void); |
|
|
|
|
|
void HMI_SetAndSaveLanguageChinese(void); |
|
|
|
|
|
|
|
|
|
|
|
// Show ICO
|
|
|
// Show ICO
|
|
|
void ICON_Print(bool show); |
|
|
void ICON_Print(bool show); |
|
|
void ICON_Prepare(bool show); |
|
|
void ICON_Prepare(bool show); |
|
@ -285,44 +286,47 @@ void ICON_Pause(bool show); |
|
|
void ICON_Continue(bool show); |
|
|
void ICON_Continue(bool show); |
|
|
void ICON_Stop(bool show); |
|
|
void ICON_Stop(bool show); |
|
|
|
|
|
|
|
|
// Popup window tips
|
|
|
#if HAS_HOTEND || HAS_HEATED_BED |
|
|
|
|
|
// Popup message window
|
|
|
|
|
|
void DWIN_Popup_Temperature(const bool toohigh); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_HOTEND |
|
|
#if HAS_HOTEND |
|
|
void Popup_Window_Temperature(const bool toohigh); |
|
|
void Popup_Window_ETempTooLow(); |
|
|
void Popup_Window_ETempTooLow(void); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
void Popup_Window_Resume(void); |
|
|
void Popup_Window_Resume(); |
|
|
void Popup_Window_Home(void); |
|
|
void Popup_Window_Home(const bool parking=false); |
|
|
void Popup_Window_Leveling(void); |
|
|
void Popup_Window_Leveling(); |
|
|
|
|
|
|
|
|
void Goto_PrintProcess(void); |
|
|
void Goto_PrintProcess(); |
|
|
void Goto_MainMenu(void); |
|
|
void Goto_MainMenu(); |
|
|
|
|
|
|
|
|
// Variable control
|
|
|
// Variable control
|
|
|
void HMI_Move_X(void); |
|
|
void HMI_Move_X(); |
|
|
void HMI_Move_Y(void); |
|
|
void HMI_Move_Y(); |
|
|
void HMI_Move_Z(void); |
|
|
void HMI_Move_Z(); |
|
|
void HMI_Move_E(void); |
|
|
void HMI_Move_E(); |
|
|
|
|
|
|
|
|
void HMI_Zoffset(void); |
|
|
void HMI_Zoffset(); |
|
|
|
|
|
|
|
|
TERN_(HAS_HOTEND, void HMI_ETemp(void)); |
|
|
TERN_(HAS_HOTEND, void HMI_ETemp()); |
|
|
TERN_(HAS_HEATED_BED, void HMI_BedTemp(void)); |
|
|
TERN_(HAS_HEATED_BED, void HMI_BedTemp()); |
|
|
TERN_(HAS_FAN, void HMI_FanSpeed(void)); |
|
|
TERN_(HAS_FAN, void HMI_FanSpeed()); |
|
|
|
|
|
|
|
|
void HMI_PrintSpeed(void); |
|
|
void HMI_PrintSpeed(); |
|
|
|
|
|
|
|
|
void HMI_MaxFeedspeedXYZE(void); |
|
|
void HMI_MaxFeedspeedXYZE(); |
|
|
void HMI_MaxAccelerationXYZE(void); |
|
|
void HMI_MaxAccelerationXYZE(); |
|
|
void HMI_MaxJerkXYZE(void); |
|
|
void HMI_MaxJerkXYZE(); |
|
|
void HMI_StepXYZE(void); |
|
|
void HMI_StepXYZE(); |
|
|
|
|
|
|
|
|
void update_variable(void); |
|
|
void update_variable(); |
|
|
void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); |
|
|
void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); |
|
|
|
|
|
|
|
|
// SD Card
|
|
|
// SD Card
|
|
|
void HMI_SDCardInit(void); |
|
|
void HMI_SDCardInit(); |
|
|
void HMI_SDCardUpdate(void); |
|
|
void HMI_SDCardUpdate(); |
|
|
|
|
|
|
|
|
// Main Process
|
|
|
// Main Process
|
|
|
void Icon_print(bool value); |
|
|
void Icon_print(bool value); |
|
@ -333,32 +337,32 @@ void Icon_leveling(bool value); |
|
|
// Other
|
|
|
// Other
|
|
|
bool Pause_HeatStatus(); |
|
|
bool Pause_HeatStatus(); |
|
|
void HMI_StartFrame(const bool with_update); // Startup screen
|
|
|
void HMI_StartFrame(const bool with_update); // Startup screen
|
|
|
void HMI_MainMenu(void); // Main process screen
|
|
|
void HMI_MainMenu(); // Main process screen
|
|
|
void HMI_SelectFile(void); // File page
|
|
|
void HMI_SelectFile(); // File page
|
|
|
void HMI_Printing(void); // Print page
|
|
|
void HMI_Printing(); // Print page
|
|
|
void HMI_Prepare(void); // Prepare page
|
|
|
void HMI_Prepare(); // Prepare page
|
|
|
void HMI_Control(void); // Control page
|
|
|
void HMI_Control(); // Control page
|
|
|
void HMI_Leveling(void); // Level the page
|
|
|
void HMI_Leveling(); // Level the page
|
|
|
void HMI_AxisMove(void); // Axis movement menu
|
|
|
void HMI_AxisMove(); // Axis movement menu
|
|
|
void HMI_Temperature(void); // Temperature menu
|
|
|
void HMI_Temperature(); // Temperature menu
|
|
|
void HMI_Motion(void); // Sports menu
|
|
|
void HMI_Motion(); // Sports menu
|
|
|
void HMI_Info(void); // Information menu
|
|
|
void HMI_Info(); // Information menu
|
|
|
void HMI_Tune(void); // Adjust the menu
|
|
|
void HMI_Tune(); // Adjust the menu
|
|
|
|
|
|
|
|
|
#if HAS_HOTEND |
|
|
#if HAS_PREHEAT |
|
|
void HMI_PLAPreheatSetting(void); // PLA warm-up setting
|
|
|
void HMI_PLAPreheatSetting(); // PLA warm-up setting
|
|
|
void HMI_ABSPreheatSetting(void); // ABS warm-up setting
|
|
|
void HMI_ABSPreheatSetting(); // ABS warm-up setting
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
void HMI_MaxSpeed(void); // Maximum speed submenu
|
|
|
void HMI_MaxSpeed(); // Maximum speed submenu
|
|
|
void HMI_MaxAcceleration(void); // Maximum acceleration submenu
|
|
|
void HMI_MaxAcceleration(); // Maximum acceleration submenu
|
|
|
void HMI_MaxJerk(void); // Maximum jerk speed submenu
|
|
|
void HMI_MaxJerk(); // Maximum jerk speed submenu
|
|
|
void HMI_Step(void); // Transmission ratio
|
|
|
void HMI_Step(); // Transmission ratio
|
|
|
|
|
|
|
|
|
void HMI_Init(void); |
|
|
void HMI_Init(); |
|
|
void DWIN_Update(void); |
|
|
void DWIN_Update(); |
|
|
void EachMomentUpdate(void); |
|
|
void EachMomentUpdate(); |
|
|
void DWIN_HandleScreen(void); |
|
|
void DWIN_HandleScreen(); |
|
|
|
|
|
|
|
|
void DWIN_CompletedHoming(void); |
|
|
void DWIN_CompletedHoming(); |
|
|
void DWIN_CompletedLeveling(void); |
|
|
void DWIN_CompletedLeveling(); |
|
|