Add screen state to gcode_M600()
- Allowing resume after M600 via on screen button: - Adding check for TFT state status - Setting flag when print was started via TFT
This commit is contained in:
parent
2bd6f2f23a
commit
b447245ddd
|
@ -55,6 +55,9 @@ public:
|
||||||
void HeatingStart();
|
void HeatingStart();
|
||||||
void FilamentRunout();
|
void FilamentRunout();
|
||||||
void KillTFT();
|
void KillTFT();
|
||||||
|
char TFTstate=ANYCUBIC_TFT_STATE_IDLE;
|
||||||
|
bool PausedByRunout=false;
|
||||||
|
bool PausedByFilamentChange=false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
||||||
|
@ -64,7 +67,6 @@ private:
|
||||||
char serial3_char;
|
char serial3_char;
|
||||||
int serial3_count = 0;
|
int serial3_count = 0;
|
||||||
char *TFTstrchr_pointer;
|
char *TFTstrchr_pointer;
|
||||||
char TFTstate=ANYCUBIC_TFT_STATE_IDLE;
|
|
||||||
char FlagResumFromOutage=0;
|
char FlagResumFromOutage=0;
|
||||||
uint16_t filenumber=0;
|
uint16_t filenumber=0;
|
||||||
unsigned long starttime=0;
|
unsigned long starttime=0;
|
||||||
|
@ -72,8 +74,6 @@ private:
|
||||||
uint8_t tmp_extruder=0;
|
uint8_t tmp_extruder=0;
|
||||||
char LastSDstatus=0;
|
char LastSDstatus=0;
|
||||||
uint16_t HeaterCheckCount=0;
|
uint16_t HeaterCheckCount=0;
|
||||||
bool PausedByRunout=false;
|
|
||||||
bool PausedByFilamentChange=false;
|
|
||||||
|
|
||||||
struct OutageDataStruct {
|
struct OutageDataStruct {
|
||||||
char OutageDataVersion;
|
char OutageDataVersion;
|
||||||
|
|
|
@ -10992,6 +10992,12 @@ inline void gcode_M502() {
|
||||||
* Default values are used for omitted arguments.
|
* Default values are used for omitted arguments.
|
||||||
*/
|
*/
|
||||||
inline void gcode_M600() {
|
inline void gcode_M600() {
|
||||||
|
#ifdef SDSUPPORT
|
||||||
|
if ((AnycubicTFT.TFTstate==ANYCUBIC_TFT_STATE_SDPRINT)){
|
||||||
|
AnycubicTFT.TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ;
|
||||||
|
AnycubicTFT.PausedByFilamentChange=true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
point_t park_point = NOZZLE_PARK_POINT;
|
point_t park_point = NOZZLE_PARK_POINT;
|
||||||
|
|
||||||
if (get_target_extruder_from_command(600)) return;
|
if (get_target_extruder_from_command(600)) return;
|
||||||
|
|
Loading…
Reference in New Issue