Cleanup code and use clang-formatter to improve readabilty.
This commit is contained in:
@@ -6,25 +6,25 @@ AlignAfterOpenBracket: Align
|
|||||||
AlignArrayOfStructures: None
|
AlignArrayOfStructures: None
|
||||||
AlignConsecutiveAssignments:
|
AlignConsecutiveAssignments:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: true
|
AcrossComments: true
|
||||||
AlignCompound: true
|
AlignCompound: true
|
||||||
PadOperators: true
|
PadOperators: true
|
||||||
AlignConsecutiveBitFields:
|
AlignConsecutiveBitFields:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: true
|
AcrossComments: true
|
||||||
AlignCompound: false
|
AlignCompound: false
|
||||||
PadOperators: false
|
PadOperators: false
|
||||||
AlignConsecutiveDeclarations:
|
AlignConsecutiveDeclarations:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: true
|
AcrossComments: true
|
||||||
AlignCompound: false
|
AlignCompound: false
|
||||||
PadOperators: false
|
PadOperators: false
|
||||||
AlignConsecutiveMacros:
|
AlignConsecutiveMacros:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: true
|
AcrossComments: true
|
||||||
AlignCompound: false
|
AlignCompound: false
|
||||||
PadOperators: false
|
PadOperators: false
|
||||||
@@ -62,16 +62,15 @@ BraceWrapping:
|
|||||||
AfterObjCDeclaration: false
|
AfterObjCDeclaration: false
|
||||||
AfterStruct: false
|
AfterStruct: false
|
||||||
AfterUnion: false
|
AfterUnion: false
|
||||||
BeforeCatch: false
|
BeforeCatch: true
|
||||||
BeforeElse: false
|
BeforeElse: true
|
||||||
BeforeLambdaBody: false
|
BeforeLambdaBody: false
|
||||||
BeforeWhile: false
|
BeforeWhile: false
|
||||||
IndentBraces: false
|
IndentBraces: true
|
||||||
SplitEmptyFunction: true
|
SplitEmptyFunction: true
|
||||||
SplitEmptyRecord: true
|
SplitEmptyRecord: true
|
||||||
SplitEmptyNamespace: true
|
SplitEmptyNamespace: true
|
||||||
BreakAfterAttributes: Never
|
BreakAfterAttributes: Never
|
||||||
BreakAfterJavaFieldAnnotations: false
|
|
||||||
BreakArrays: true
|
BreakArrays: true
|
||||||
BreakBeforeBinaryOperators: None
|
BreakBeforeBinaryOperators: None
|
||||||
BreakBeforeConceptDeclarations: Always
|
BreakBeforeConceptDeclarations: Always
|
||||||
@@ -115,17 +114,17 @@ IncludeCategories:
|
|||||||
CaseSensitive: false
|
CaseSensitive: false
|
||||||
IncludeIsMainRegex: '(Test)?$'
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
IncludeIsMainSourceRegex: ''
|
IncludeIsMainSourceRegex: ''
|
||||||
IndentAccessModifiers: false
|
IndentAccessModifiers: true
|
||||||
IndentCaseBlocks: false
|
IndentCaseBlocks: true
|
||||||
IndentCaseLabels: false
|
IndentCaseLabels: true
|
||||||
IndentExternBlock: AfterExternBlock
|
IndentExternBlock: AfterExternBlock
|
||||||
IndentGotoLabels: true
|
IndentGotoLabels: true
|
||||||
IndentPPDirectives: None
|
IndentPPDirectives: BeforeHash
|
||||||
IndentRequiresClause: true
|
IndentRequiresClause: true
|
||||||
IndentWidth: 4
|
IndentWidth: 2
|
||||||
IndentWrappedFunctionNames: false
|
IndentWrappedFunctionNames: true
|
||||||
InsertBraces: false
|
InsertBraces: true
|
||||||
InsertNewlineAtEOF: false
|
InsertNewlineAtEOF: true
|
||||||
InsertTrailingCommas: None
|
InsertTrailingCommas: None
|
||||||
IntegerLiteralSeparator:
|
IntegerLiteralSeparator:
|
||||||
Binary: 0
|
Binary: 0
|
||||||
@@ -134,15 +133,13 @@ IntegerLiteralSeparator:
|
|||||||
DecimalMinDigits: 0
|
DecimalMinDigits: 0
|
||||||
Hex: 0
|
Hex: 0
|
||||||
HexMinDigits: 0
|
HexMinDigits: 0
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: true
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
LambdaBodyIndentation: Signature
|
LambdaBodyIndentation: Signature
|
||||||
LineEnding: DeriveLF
|
LineEnding: DeriveLF
|
||||||
MacroBlockBegin: ''
|
MacroBlockBegin: ''
|
||||||
MacroBlockEnd: ''
|
MacroBlockEnd: ''
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 2
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: All
|
||||||
ObjCBinPackProtocolList: Auto
|
ObjCBinPackProtocolList: Auto
|
||||||
ObjCBlockIndentWidth: 2
|
ObjCBlockIndentWidth: 2
|
||||||
ObjCBreakBeforeNestedBlockParam: true
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -24,16 +24,16 @@
|
|||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
#include "../../../module/probe.h"
|
#include "../../../module/probe.h"
|
||||||
|
|
||||||
char *itostr2(const uint8_t &x);
|
char* itostr2(const uint8_t& x);
|
||||||
|
|
||||||
#ifndef ULTRA_LCD
|
#ifndef ULTRA_LCD
|
||||||
char *itostr3(const int);
|
char* itostr3(const int);
|
||||||
char *ftostr32(const float &);
|
char* ftostr32(const float&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TFTBUFSIZE 4
|
#define TFTBUFSIZE 4
|
||||||
#define TFT_MAX_CMD_SIZE 96
|
#define TFT_MAX_CMD_SIZE 96
|
||||||
#define MSG_MY_VERSION CUSTOM_BUILD_VERSION
|
#define MSG_MY_VERSION CUSTOM_BUILD_VERSION
|
||||||
#define MAX_PRINTABLE_FILENAME_LEN 26
|
#define MAX_PRINTABLE_FILENAME_LEN 26
|
||||||
|
|
||||||
enum AnycubicMediaPrintState {
|
enum AnycubicMediaPrintState {
|
||||||
@@ -57,277 +57,276 @@ enum AnycubicMediaPauseState {
|
|||||||
AMPAUSESTATE_PAUSED
|
AMPAUSESTATE_PAUSED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define SM_DIR_UP_S "DIR_UP~1.GCO"
|
#define SM_DIR_UP_S "DIR_UP~1.GCO"
|
||||||
#define SM_SPECIAL_MENU_S "<SPECI~1.GCO"
|
#define SM_SPECIAL_MENU_S "<SPECI~1.GCO"
|
||||||
#define SM_PID_HOTEND_S "<PIDTU~1.GCO"
|
#define SM_PID_HOTEND_S "<PIDTU~1.GCO"
|
||||||
#define SM_PID_BED_S "<PIDTU~2.GCO"
|
#define SM_PID_BED_S "<PIDTU~2.GCO"
|
||||||
#define SM_SAVE_EEPROM_S "<SAVEE~1.GCO"
|
#define SM_SAVE_EEPROM_S "<SAVEE~1.GCO"
|
||||||
#define SM_LOAD_DEFAULTS_S "<LOADF~1.GCO"
|
#define SM_LOAD_DEFAULTS_S "<LOADF~1.GCO"
|
||||||
#define SM_PREHEAT_BED_S "<PREHE~1.GCO"
|
#define SM_PREHEAT_BED_S "<PREHE~1.GCO"
|
||||||
#define SM_MESH_MENU_S "<MESHL~1.GCO"
|
#define SM_MESH_MENU_S "<MESHL~1.GCO"
|
||||||
#define SM_MESH_START_S "<START~1.GCO"
|
#define SM_MESH_START_S "<START~1.GCO"
|
||||||
#define SM_MESH_NEXT_S "<NEXTM~1.GCO"
|
#define SM_MESH_NEXT_S "<NEXTM~1.GCO"
|
||||||
#define SM_Z_UP_01_S "<ZUP01~1.GCO"
|
#define SM_Z_UP_01_S "<ZUP01~1.GCO"
|
||||||
#define SM_Z_DN_01_S "<ZDOWN~1.GCO"
|
#define SM_Z_DN_01_S "<ZDOWN~1.GCO"
|
||||||
#define SM_Z_UP_002_S "<ZUP00~1.GCO"
|
#define SM_Z_UP_002_S "<ZUP00~1.GCO"
|
||||||
#define SM_Z_DN_002_S "<ZDOWN~2.GCO"
|
#define SM_Z_DN_002_S "<ZDOWN~2.GCO"
|
||||||
#define SM_Z_UP_001_S "<ZUP00~2.GCO"
|
#define SM_Z_UP_001_S "<ZUP00~2.GCO"
|
||||||
#define SM_Z_DN_001_S "<ZDOWN~3.GCO"
|
#define SM_Z_DN_001_S "<ZDOWN~3.GCO"
|
||||||
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
||||||
#define SM_RESETLV_S "<RSTLV~1.GCO"
|
#define SM_RESETLV_S "<RSTLV~1.GCO"
|
||||||
#define SM_PAUSE_S "<FILCH~2.GCO"
|
#define SM_PAUSE_S "<FILCH~2.GCO"
|
||||||
#define SM_RESUME_S "<FILCH~1.GCO"
|
#define SM_RESUME_S "<FILCH~1.GCO"
|
||||||
#define SM_DIS_FILSENS_S "<DISAB~1.GCO"
|
#define SM_DIS_FILSENS_S "<DISAB~1.GCO"
|
||||||
#define SM_EN_FILSENS_S "<ENABL~1.GCO"
|
#define SM_EN_FILSENS_S "<ENABL~1.GCO"
|
||||||
#define SM_EXIT_S "<EXIT_~1.GCO"
|
#define SM_EXIT_S "<EXIT_~1.GCO"
|
||||||
#define SM_BACK_S "<BACK_~1.GCO"
|
#define SM_BACK_S "<BACK_~1.GCO"
|
||||||
#define SM_FLOWMENU_S "<SETFLO1.GCO"
|
#define SM_FLOWMENU_S "<SETFLO1.GCO"
|
||||||
#define SM_FLOW_DISP_S "<FLDISPL.GCO"
|
#define SM_FLOW_DISP_S "<FLDISPL.GCO"
|
||||||
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
||||||
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
||||||
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
||||||
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
||||||
#define SM_EZLVL_P1_S "<EZLPA01.GCO"
|
#define SM_EZLVL_P1_S "<EZLPA01.GCO"
|
||||||
#define SM_EZLVL_P2_S "<EZLPB01.GCO"
|
#define SM_EZLVL_P2_S "<EZLPB01.GCO"
|
||||||
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
||||||
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
||||||
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
||||||
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
||||||
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
||||||
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
||||||
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
||||||
#define SM_BLTZ_EXIT_S "<EXTABLM.GCO"
|
#define SM_BLTZ_EXIT_S "<EXTABLM.GCO"
|
||||||
#define SM_HS_DISABLE_S "<HSDISAB.GCO"
|
#define SM_HS_DISABLE_S "<HSDISAB.GCO"
|
||||||
#define SM_HS_ENABLE_S "<HSENABL.GCO"
|
#define SM_HS_ENABLE_S "<HSENABL.GCO"
|
||||||
|
|
||||||
|
|
||||||
#if DISABLED(KNUTWURST_DGUS2_TFT)
|
#if DISABLED(KNUTWURST_DGUS2_TFT)
|
||||||
#define SM_DIR_UP_L "/.."
|
#define SM_DIR_UP_L "/.."
|
||||||
#define SM_SPECIAL_MENU_L "<Special Menu>"
|
#define SM_SPECIAL_MENU_L "<Special Menu>"
|
||||||
#define SM_PID_HOTEND_L "<PID Tune Hotend>"
|
#define SM_PID_HOTEND_L "<PID Tune Hotend>"
|
||||||
#define SM_PID_BED_L "<PID Tune Ultrabase>"
|
#define SM_PID_BED_L "<PID Tune Ultrabase>"
|
||||||
#define SM_SAVE_EEPROM_L "<Save EEPROM>"
|
#define SM_SAVE_EEPROM_L "<Save EEPROM>"
|
||||||
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults>"
|
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults>"
|
||||||
#define SM_PREHEAT_BED_L "<Preheat Ultrabase>"
|
#define SM_PREHEAT_BED_L "<Preheat Ultrabase>"
|
||||||
#define SM_MESH_MENU_L "<Mesh Leveling>"
|
#define SM_MESH_MENU_L "<Mesh Leveling>"
|
||||||
#define SM_MESH_START_L "<Start Mesh Leveling>"
|
#define SM_MESH_START_L "<Start Mesh Leveling>"
|
||||||
#define SM_MESH_NEXT_L "<Next Mesh Point>"
|
#define SM_MESH_NEXT_L "<Next Mesh Point>"
|
||||||
#define SM_Z_UP_01_L "<Z Up 0.1>"
|
#define SM_Z_UP_01_L "<Z Up 0.1>"
|
||||||
#define SM_Z_DN_01_L "<Z Down 0.1>"
|
#define SM_Z_DN_01_L "<Z Down 0.1>"
|
||||||
#define SM_Z_UP_002_L "<Z Up 0.02>"
|
#define SM_Z_UP_002_L "<Z Up 0.02>"
|
||||||
#define SM_Z_DN_002_L "<Z Down 0.02>"
|
#define SM_Z_DN_002_L "<Z Down 0.02>"
|
||||||
#define SM_Z_UP_001_L "<Z Up 0.01>"
|
#define SM_Z_UP_001_L "<Z Up 0.01>"
|
||||||
#define SM_Z_DN_001_L "<Z Down 0.01>"
|
#define SM_Z_DN_001_L "<Z Down 0.01>"
|
||||||
#define SM_BLTOUCH_L "<Start Auto Leveling>"
|
#define SM_BLTOUCH_L "<Start Auto Leveling>"
|
||||||
#define SM_RESETLV_L "<Reset Level Grid>"
|
#define SM_RESETLV_L "<Reset Level Grid>"
|
||||||
#define SM_PAUSE_L "<Fil. Change Pause>"
|
#define SM_PAUSE_L "<Fil. Change Pause>"
|
||||||
#define SM_RESUME_L "<Fil. Change Resume>"
|
#define SM_RESUME_L "<Fil. Change Resume>"
|
||||||
#define SM_DIS_FILSENS_L "<Disable Fil. Sensor>"
|
#define SM_DIS_FILSENS_L "<Disable Fil. Sensor>"
|
||||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>"
|
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>"
|
||||||
#define SM_EXIT_L "<Exit>"
|
#define SM_EXIT_L "<Exit>"
|
||||||
#define SM_BACK_L "<End Mesh Leveling>"
|
#define SM_BACK_L "<End Mesh Leveling>"
|
||||||
#define SM_FLOWMENU_L "<Set Flowrate>"
|
#define SM_FLOWMENU_L "<Set Flowrate>"
|
||||||
#define SM_FLOW_DISP_L "<Flow is XXX>"
|
#define SM_FLOW_DISP_L "<Flow is XXX>"
|
||||||
#define SM_FLOW_UP_L "<Up>"
|
#define SM_FLOW_UP_L "<Up>"
|
||||||
#define SM_FLOW_DN_L "<Down>"
|
#define SM_FLOW_DN_L "<Down>"
|
||||||
#define SM_FLOW_EXIT_L "<Exit Flow Settings>"
|
#define SM_FLOW_EXIT_L "<Exit Flow Settings>"
|
||||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>"
|
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>"
|
||||||
#define SM_EZLVL_P1_L "<Point A>"
|
#define SM_EZLVL_P1_L "<Point A>"
|
||||||
#define SM_EZLVL_P2_L "<Point B>"
|
#define SM_EZLVL_P2_L "<Point B>"
|
||||||
#define SM_EZLVL_P3_L "<Point C>"
|
#define SM_EZLVL_P3_L "<Point C>"
|
||||||
#define SM_EZLVL_P4_L "<Point D>"
|
#define SM_EZLVL_P4_L "<Point D>"
|
||||||
#define SM_EZLVL_EXIT_L "<Exit Easy Level>"
|
#define SM_EZLVL_EXIT_L "<Exit Easy Level>"
|
||||||
#define SM_BLTZMENU_L "<Auto Leveling>"
|
#define SM_BLTZMENU_L "<Auto Leveling>"
|
||||||
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX>"
|
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX>"
|
||||||
#define SM_BLTZ_UP_L "<Up>"
|
#define SM_BLTZ_UP_L "<Up>"
|
||||||
#define SM_BLTZ_DN_L "<Down>"
|
#define SM_BLTZ_DN_L "<Down>"
|
||||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
|
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
|
||||||
#define SM_HS_DISABLE_L "<Disable HiSpeed Mode>"
|
#define SM_HS_DISABLE_L "<Disable HiSpeed Mode>"
|
||||||
#define SM_HS_ENABLE_L "<Enable HiSpeed Mode>"
|
#define SM_HS_ENABLE_L "<Enable HiSpeed Mode>"
|
||||||
#endif // !KNUTWURST_DGUS2_TFT
|
#endif // !KNUTWURST_DGUS2_TFT
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||||
#define SM_DIR_UP_L "/.. .gcode"
|
#define SM_DIR_UP_L "/.. .gcode"
|
||||||
#define SM_SPECIAL_MENU_L "<Special Menu> .gcode"
|
#define SM_SPECIAL_MENU_L "<Special Menu> .gcode"
|
||||||
#define SM_PID_HOTEND_L "<PID Tune Hotend> .gcode"
|
#define SM_PID_HOTEND_L "<PID Tune Hotend> .gcode"
|
||||||
#define SM_PID_BED_L "<PID Tune Ultrabase>.gcode"
|
#define SM_PID_BED_L "<PID Tune Ultrabase>.gcode"
|
||||||
#define SM_SAVE_EEPROM_L "<Save EEPROM> .gcode"
|
#define SM_SAVE_EEPROM_L "<Save EEPROM> .gcode"
|
||||||
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults> .gcode"
|
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults> .gcode"
|
||||||
#define SM_PREHEAT_BED_L "<Preheat Ultrabase> .gcode"
|
#define SM_PREHEAT_BED_L "<Preheat Ultrabase> .gcode"
|
||||||
#define SM_MESH_MENU_L "<Mesh Leveling> .gcode"
|
#define SM_MESH_MENU_L "<Mesh Leveling> .gcode"
|
||||||
#define SM_MESH_START_L "<Start MeshLeveling>.gcode"
|
#define SM_MESH_START_L "<Start MeshLeveling>.gcode"
|
||||||
#define SM_MESH_NEXT_L "<Next Mesh Point> .gcode"
|
#define SM_MESH_NEXT_L "<Next Mesh Point> .gcode"
|
||||||
#define SM_Z_UP_01_L "<Z Up 0.1> .gcode"
|
#define SM_Z_UP_01_L "<Z Up 0.1> .gcode"
|
||||||
#define SM_Z_DN_01_L "<Z Down 0.1> .gcode"
|
#define SM_Z_DN_01_L "<Z Down 0.1> .gcode"
|
||||||
#define SM_Z_UP_002_L "<Z Up 0.02> .gcode"
|
#define SM_Z_UP_002_L "<Z Up 0.02> .gcode"
|
||||||
#define SM_Z_DN_002_L "<Z Down 0.02> .gcode"
|
#define SM_Z_DN_002_L "<Z Down 0.02> .gcode"
|
||||||
#define SM_Z_UP_001_L "<Z Up 0.01> .gcode"
|
#define SM_Z_UP_001_L "<Z Up 0.01> .gcode"
|
||||||
#define SM_Z_DN_001_L "<Z Down 0.01> .gcode"
|
#define SM_Z_DN_001_L "<Z Down 0.01> .gcode"
|
||||||
#define SM_BLTOUCH_L "<Start AutoLeveling>.gcode"
|
#define SM_BLTOUCH_L "<Start AutoLeveling>.gcode"
|
||||||
#define SM_RESETLV_L "<Reset Level Grid> .gcode"
|
#define SM_RESETLV_L "<Reset Level Grid> .gcode"
|
||||||
#define SM_PAUSE_L "<Fil. Change Pause> .gcode"
|
#define SM_PAUSE_L "<Fil. Change Pause> .gcode"
|
||||||
#define SM_RESUME_L "<Fil. Change Resume>.gcode"
|
#define SM_RESUME_L "<Fil. Change Resume>.gcode"
|
||||||
#define SM_DIS_FILSENS_L "<Disable Fil.Sensor>.gcode"
|
#define SM_DIS_FILSENS_L "<Disable Fil.Sensor>.gcode"
|
||||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>.gcode"
|
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>.gcode"
|
||||||
#define SM_EXIT_L "<Exit> .gcode"
|
#define SM_EXIT_L "<Exit> .gcode"
|
||||||
#define SM_BACK_L "<End Mesh Leveling> .gcode"
|
#define SM_BACK_L "<End Mesh Leveling> .gcode"
|
||||||
#define SM_FLOWMENU_L "<Set Flowrate> .gcode"
|
#define SM_FLOWMENU_L "<Set Flowrate> .gcode"
|
||||||
#define SM_FLOW_DISP_L "<Flow is XXX%> .gcode"
|
#define SM_FLOW_DISP_L "<Flow is XXX%> .gcode"
|
||||||
#define SM_FLOW_UP_L "<Up> .gcode"
|
#define SM_FLOW_UP_L "<Up> .gcode"
|
||||||
#define SM_FLOW_DN_L "<Down> .gcode"
|
#define SM_FLOW_DN_L "<Down> .gcode"
|
||||||
#define SM_FLOW_EXIT_L "<Exit Flow Settings>.gcode"
|
#define SM_FLOW_EXIT_L "<Exit Flow Settings>.gcode"
|
||||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
||||||
#define SM_EZLVL_P1_L "<Point A> .gcode"
|
#define SM_EZLVL_P1_L "<Point A> .gcode"
|
||||||
#define SM_EZLVL_P2_L "<Point B> .gcode"
|
#define SM_EZLVL_P2_L "<Point B> .gcode"
|
||||||
#define SM_EZLVL_P3_L "<Point C> .gcode"
|
#define SM_EZLVL_P3_L "<Point C> .gcode"
|
||||||
#define SM_EZLVL_P4_L "<Point D> .gcode"
|
#define SM_EZLVL_P4_L "<Point D> .gcode"
|
||||||
#define SM_EZLVL_EXIT_L "<Exit Easy Leveling>.gcode"
|
#define SM_EZLVL_EXIT_L "<Exit Easy Leveling>.gcode"
|
||||||
#define SM_BLTZMENU_L "<Auto Leveling> .gcode"
|
#define SM_BLTZMENU_L "<Auto Leveling> .gcode"
|
||||||
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX> .gcode"
|
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX> .gcode"
|
||||||
#define SM_BLTZ_UP_L "<Up> .gcode"
|
#define SM_BLTZ_UP_L "<Up> .gcode"
|
||||||
#define SM_BLTZ_DN_L "<Down> .gcode"
|
#define SM_BLTZ_DN_L "<Down> .gcode"
|
||||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
|
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
|
||||||
#define SM_HS_DISABLE_L "<Disable HiSpeed> .gcode"
|
#define SM_HS_DISABLE_L "<Disable HiSpeed> .gcode"
|
||||||
#define SM_HS_ENABLE_L "<Enable HiSpeed> .gcode"
|
#define SM_HS_ENABLE_L "<Enable HiSpeed> .gcode"
|
||||||
#endif // KNUTWURST_DGUS2_TFT
|
#endif // KNUTWURST_DGUS2_TFT
|
||||||
|
|
||||||
class AnycubicTouchscreenClass {
|
class AnycubicTouchscreenClass {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AnycubicTouchscreenClass();
|
AnycubicTouchscreenClass();
|
||||||
|
|
||||||
void Setup();
|
void Setup();
|
||||||
void CommandScan();
|
void CommandScan();
|
||||||
void FilamentRunout();
|
void FilamentRunout();
|
||||||
void DoFilamentRunoutCheck();
|
void DoFilamentRunoutCheck();
|
||||||
void UserConfirmRequired(const char *);
|
void UserConfirmRequired(const char*);
|
||||||
void SDCardStateChange(bool);
|
void SDCardStateChange(bool);
|
||||||
void SDCardError();
|
void SDCardError();
|
||||||
void KillTFT();
|
void KillTFT();
|
||||||
void OnPrintTimerStarted();
|
void OnPrintTimerStarted();
|
||||||
void OnPrintTimerPaused();
|
void OnPrintTimerPaused();
|
||||||
void OnPrintTimerStopped();
|
void OnPrintTimerStopped();
|
||||||
|
|
||||||
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
||||||
void Command(const char * const command);
|
void Command(const char* const command);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
#if ENABLED(KNUTWURST_CHIRON)
|
||||||
void LevelingDone();
|
void LevelingDone();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
||||||
int TFTbuflen = 0;
|
int TFTbuflen = 0;
|
||||||
int TFTbufindr = 0;
|
int TFTbufindr = 0;
|
||||||
int TFTbufindw = 0;
|
int TFTbufindw = 0;
|
||||||
char serial3_char;
|
char serial3_char;
|
||||||
int serial3_count = 0;
|
int serial3_count = 0;
|
||||||
char *TFTstrchr_pointer;
|
char* TFTstrchr_pointer;
|
||||||
char FlagResumFromOutage = 0;
|
char FlagResumFromOutage = 0;
|
||||||
uint8_t tmp_extruder = 0;
|
uint8_t tmp_extruder = 0;
|
||||||
uint16_t HeaterCheckCount = 0;
|
uint16_t HeaterCheckCount = 0;
|
||||||
int currentFlowRate = 0;
|
int currentFlowRate = 0;
|
||||||
bool PrintdoneAndPowerOFF = true;
|
bool PrintdoneAndPowerOFF = true;
|
||||||
bool powerOFFflag = 0;
|
bool powerOFFflag = 0;
|
||||||
xy_uint8_t selectedmeshpoint;
|
xy_uint8_t selectedmeshpoint;
|
||||||
float live_Zoffset;
|
float live_Zoffset;
|
||||||
|
|
||||||
static AnycubicMediaPrintState mediaPrintingState;
|
static AnycubicMediaPrintState mediaPrintingState;
|
||||||
static AnycubicMediaPauseState mediaPauseState;
|
static AnycubicMediaPauseState mediaPauseState;
|
||||||
|
|
||||||
#if defined(POWER_OUTAGE_TEST)
|
#if defined(POWER_OUTAGE_TEST)
|
||||||
struct OutageDataStruct {
|
struct OutageDataStruct {
|
||||||
char OutageDataVersion;
|
char OutageDataVersion;
|
||||||
char OutageFlag;
|
char OutageFlag;
|
||||||
float last_position[XYZE];
|
float last_position[XYZE];
|
||||||
float last_bed_temp;
|
float last_bed_temp;
|
||||||
float last_hotend_temp;
|
float last_hotend_temp;
|
||||||
long lastSDposition;
|
long lastSDposition;
|
||||||
}
|
} OutageData;
|
||||||
OutageData;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int CodeValueInt();
|
int CodeValueInt();
|
||||||
float CodeValue();
|
float CodeValue();
|
||||||
bool CodeSeen(char);
|
bool CodeSeen(char);
|
||||||
void StartPrint();
|
void StartPrint();
|
||||||
void PausePrint();
|
void PausePrint();
|
||||||
void ResumePrint();
|
void ResumePrint();
|
||||||
void StopPrint();
|
void StopPrint();
|
||||||
void GetCommandFromTFT();
|
void GetCommandFromTFT();
|
||||||
void CheckHeaterError();
|
void CheckHeaterError();
|
||||||
void FilamentChangePause();
|
void FilamentChangePause();
|
||||||
void HandleSpecialMenu();
|
void HandleSpecialMenu();
|
||||||
void RenderCurrentFileList();
|
void RenderCurrentFileList();
|
||||||
void RenderSpecialMenu(uint16_t);
|
void RenderSpecialMenu(uint16_t);
|
||||||
void RenderCurrentFolder(uint16_t);
|
void RenderCurrentFolder(uint16_t);
|
||||||
|
|
||||||
char currentTouchscreenSelection[64];
|
char currentTouchscreenSelection[64];
|
||||||
char currentFileOrDirectory[64];
|
char currentFileOrDirectory[64];
|
||||||
String flowRateBuffer;
|
String flowRateBuffer;
|
||||||
String zOffsetBuffer;
|
String zOffsetBuffer;
|
||||||
|
|
||||||
uint8_t SpecialMenu = false;
|
uint8_t SpecialMenu = false;
|
||||||
uint8_t MMLMenu = false;
|
uint8_t MMLMenu = false;
|
||||||
uint8_t FlowMenu = false;
|
uint8_t FlowMenu = false;
|
||||||
uint8_t BLTouchMenu = false;
|
uint8_t BLTouchMenu = false;
|
||||||
uint8_t LevelMenu = false;
|
uint8_t LevelMenu = false;
|
||||||
uint8_t CaseLight = true;
|
uint8_t CaseLight = true;
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_P_LASER)
|
#if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char bfType[2];
|
unsigned char bfType[2];
|
||||||
unsigned char bfSize[4];
|
unsigned char bfSize[4];
|
||||||
unsigned char bfReserved1[2];
|
unsigned char bfReserved1[2];
|
||||||
unsigned char bfReserved2[2];
|
unsigned char bfReserved2[2];
|
||||||
unsigned char bfOffBits[4];
|
unsigned char bfOffBits[4];
|
||||||
unsigned char biSize[4];
|
unsigned char biSize[4];
|
||||||
unsigned char biWidth[4];
|
unsigned char biWidth[4];
|
||||||
unsigned char biHeight[4];
|
unsigned char biHeight[4];
|
||||||
unsigned char biPlanes[2];
|
unsigned char biPlanes[2];
|
||||||
unsigned char biBitCount[2];
|
unsigned char biBitCount[2];
|
||||||
unsigned char biCompression[4];
|
unsigned char biCompression[4];
|
||||||
unsigned char biSizeImage[4];
|
unsigned char biSizeImage[4];
|
||||||
unsigned char biXPelsPerMeter[4];
|
unsigned char biXPelsPerMeter[4];
|
||||||
unsigned char biYPelsPerMeter[4];
|
unsigned char biYPelsPerMeter[4];
|
||||||
unsigned char biClrUsed[4];
|
unsigned char biClrUsed[4];
|
||||||
unsigned char biClrImportant[4];
|
unsigned char biClrImportant[4];
|
||||||
} BMP_HEAD;
|
} BMP_HEAD;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long pic_file_size;
|
unsigned long pic_file_size;
|
||||||
unsigned long pic_ptr;
|
unsigned long pic_ptr;
|
||||||
unsigned long pic_start;
|
unsigned long pic_start;
|
||||||
|
|
||||||
float pic_pixel_distance;
|
float pic_pixel_distance;
|
||||||
float laser_height;
|
float laser_height;
|
||||||
float x_offset;
|
float x_offset;
|
||||||
float y_offset;
|
float y_offset;
|
||||||
|
|
||||||
unsigned int pic_real_width;
|
unsigned int pic_real_width;
|
||||||
unsigned int pic_width;
|
unsigned int pic_width;
|
||||||
unsigned int pic_height;
|
unsigned int pic_height;
|
||||||
unsigned char pic_bit;
|
unsigned char pic_bit;
|
||||||
unsigned char pic_width_odd;
|
unsigned char pic_width_odd;
|
||||||
unsigned char pic_height_odd;
|
unsigned char pic_height_odd;
|
||||||
|
|
||||||
unsigned char pic_print_status;
|
unsigned char pic_print_status;
|
||||||
unsigned char pic_dir;
|
unsigned char pic_dir;
|
||||||
|
|
||||||
unsigned char pic_vector;
|
unsigned char pic_vector;
|
||||||
unsigned char pic_x_mirror;
|
unsigned char pic_x_mirror;
|
||||||
unsigned char pic_y_mirror;
|
unsigned char pic_y_mirror;
|
||||||
unsigned char pic_laser_time;
|
unsigned char pic_laser_time;
|
||||||
} PRINTER_STRUCT;
|
} PRINTER_STRUCT;
|
||||||
|
|
||||||
#define PIC_FIXED 0.1f // // POINT/MM
|
#define PIC_FIXED 0.1f // // POINT/MM
|
||||||
#define PIC_OPEN 50 // // ms
|
#define PIC_OPEN 50 // // ms
|
||||||
#define PIC_SPEDD 20000
|
#define PIC_SPEDD 20000
|
||||||
#define MIN_GRAY_VLAUE 20
|
#define MIN_GRAY_VLAUE 20
|
||||||
#define LASER_PRINT_SPEED 30 // 50*60
|
#define LASER_PRINT_SPEED 30 // 50*60
|
||||||
#endif // if ENABLED(KNUTWURST_MEGA_P_LASER)
|
#endif // if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||||
};
|
};
|
||||||
|
|
||||||
extern AnycubicTouchscreenClass AnycubicTouchscreen;
|
extern AnycubicTouchscreenClass AnycubicTouchscreen;
|
||||||
|
Reference in New Issue
Block a user