apply uncrust to anycubic_touchscreen
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,9 @@
|
||||
#ifndef anycubic_touchscreen_h
|
||||
#define anycubic_touchscreen_h
|
||||
|
||||
//#include <stdio.h>
|
||||
//#include "../inc/MarlinConfig.h"
|
||||
//#include "../module/configuration_store.h"
|
||||
// #include <stdio.h>
|
||||
// #include "../inc/MarlinConfig.h"
|
||||
// #include "../module/configuration_store.h"
|
||||
|
||||
#include "./src/inc/MarlinConfigPre.h"
|
||||
#include "./src/feature/bedlevel/bedlevel.h"
|
||||
@@ -38,8 +38,8 @@ void initializeGrid();
|
||||
char *itostr2(const uint8_t &x);
|
||||
|
||||
#ifndef ULTRA_LCD
|
||||
char *itostr3(const int);
|
||||
char *ftostr32(const float &);
|
||||
char *itostr3(const int);
|
||||
char *ftostr32(const float &);
|
||||
#endif
|
||||
|
||||
#define TFTBUFSIZE 4
|
||||
@@ -244,22 +244,22 @@ char *ftostr32(const float &);
|
||||
#endif
|
||||
|
||||
class AnycubicTouchscreenClass {
|
||||
public:
|
||||
AnycubicTouchscreenClass();
|
||||
void Setup();
|
||||
void CommandScan();
|
||||
void BedHeatingStart();
|
||||
void BedHeatingDone();
|
||||
void HeatingDone();
|
||||
void HeatingStart();
|
||||
void FilamentRunout();
|
||||
void KillTFT();
|
||||
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
||||
public:
|
||||
AnycubicTouchscreenClass();
|
||||
void Setup();
|
||||
void CommandScan();
|
||||
void BedHeatingStart();
|
||||
void BedHeatingDone();
|
||||
void HeatingDone();
|
||||
void HeatingStart();
|
||||
void FilamentRunout();
|
||||
void KillTFT();
|
||||
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
||||
void Command(const char * const command);
|
||||
#endif
|
||||
char TFTstate = ANYCUBIC_TFT_STATE_IDLE;
|
||||
#endif
|
||||
char TFTstate = ANYCUBIC_TFT_STATE_IDLE;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Anycubic TFT pause states:
|
||||
*
|
||||
* 0 - printing / stopped
|
||||
@@ -270,29 +270,29 @@ class AnycubicTouchscreenClass {
|
||||
* 5 - nozzle timeout on M600 // OBSOLETE
|
||||
* 6 - nozzle timeout on filament runout // OBSOLETE
|
||||
*/
|
||||
uint8_t ai3m_pause_state = 0;
|
||||
uint8_t ai3m_pause_state = 0;
|
||||
|
||||
private:
|
||||
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
||||
int TFTbuflen = 0;
|
||||
int TFTbufindr = 0;
|
||||
int TFTbufindw = 0;
|
||||
char serial3_char;
|
||||
int serial3_count = 0;
|
||||
char *TFTstrchr_pointer;
|
||||
char FlagResumFromOutage = 0;
|
||||
int filenumber = 0;
|
||||
unsigned long starttime = 0;
|
||||
unsigned long stoptime = 0;
|
||||
uint8_t tmp_extruder = 0;
|
||||
char LastSDstatus = 0;
|
||||
uint16_t HeaterCheckCount = 0;
|
||||
bool IsParked = false;
|
||||
int currentFlowRate = 0;
|
||||
bool PrintdoneAndPowerOFF = true;
|
||||
bool powerOFFflag = 0;
|
||||
private:
|
||||
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
||||
int TFTbuflen = 0;
|
||||
int TFTbufindr = 0;
|
||||
int TFTbufindw = 0;
|
||||
char serial3_char;
|
||||
int serial3_count = 0;
|
||||
char *TFTstrchr_pointer;
|
||||
char FlagResumFromOutage = 0;
|
||||
int filenumber = 0;
|
||||
unsigned long starttime = 0;
|
||||
unsigned long stoptime = 0;
|
||||
uint8_t tmp_extruder = 0;
|
||||
char LastSDstatus = 0;
|
||||
uint16_t HeaterCheckCount = 0;
|
||||
bool IsParked = false;
|
||||
int currentFlowRate = 0;
|
||||
bool PrintdoneAndPowerOFF = true;
|
||||
bool powerOFFflag = 0;
|
||||
|
||||
#if defined(POWER_OUTAGE_TEST)
|
||||
#if defined(POWER_OUTAGE_TEST)
|
||||
struct OutageDataStruct {
|
||||
char OutageDataVersion;
|
||||
char OutageFlag;
|
||||
@@ -300,48 +300,49 @@ class AnycubicTouchscreenClass {
|
||||
float last_bed_temp;
|
||||
float last_hotend_temp;
|
||||
long lastSDposition;
|
||||
} OutageData;
|
||||
#endif
|
||||
}
|
||||
OutageData;
|
||||
#endif
|
||||
|
||||
int CodeValueInt();
|
||||
float CodeValue();
|
||||
bool CodeSeen(char);
|
||||
void PrintList();
|
||||
void StartPrint();
|
||||
void PausePrint();
|
||||
void StopPrint();
|
||||
void StateHandler();
|
||||
void GetCommandFromTFT();
|
||||
void CheckSDCardChange();
|
||||
void CheckHeaterError();
|
||||
void HandleSpecialMenu();
|
||||
void FilamentChangePause();
|
||||
void FilamentChangeResume();
|
||||
void ReheatNozzle();
|
||||
void ParkAfterStop();
|
||||
int CodeValueInt();
|
||||
float CodeValue();
|
||||
bool CodeSeen(char);
|
||||
void PrintList();
|
||||
void StartPrint();
|
||||
void PausePrint();
|
||||
void StopPrint();
|
||||
void StateHandler();
|
||||
void GetCommandFromTFT();
|
||||
void CheckSDCardChange();
|
||||
void CheckHeaterError();
|
||||
void HandleSpecialMenu();
|
||||
void FilamentChangePause();
|
||||
void FilamentChangeResume();
|
||||
void ReheatNozzle();
|
||||
void ParkAfterStop();
|
||||
|
||||
char currentTouchscreenSelection[64];
|
||||
char currentFileOrDirectory[64];
|
||||
String flowRateBuffer;
|
||||
String zOffsetBuffer;
|
||||
uint16_t MyFileNrCnt = 0;
|
||||
uint8_t FilamentSensorEnabled = true;
|
||||
char currentTouchscreenSelection[64];
|
||||
char currentFileOrDirectory[64];
|
||||
String flowRateBuffer;
|
||||
String zOffsetBuffer;
|
||||
uint16_t MyFileNrCnt = 0;
|
||||
uint8_t FilamentSensorEnabled = true;
|
||||
|
||||
uint8_t SpecialMenu = false;
|
||||
uint8_t MMLMenu = false;
|
||||
uint8_t FlowMenu = false;
|
||||
uint8_t BLTouchMenu = false;
|
||||
uint8_t LevelMenu = false;
|
||||
uint8_t CaseLight = true;
|
||||
uint8_t SpecialMenu = false;
|
||||
uint8_t MMLMenu = false;
|
||||
uint8_t FlowMenu = false;
|
||||
uint8_t BLTouchMenu = false;
|
||||
uint8_t LevelMenu = false;
|
||||
uint8_t CaseLight = true;
|
||||
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
char FilamentTestStatus = false;
|
||||
char FilamentTestLastStatus = false;
|
||||
bool FilamentSetMillis = true;
|
||||
int FilamentRunoutCounter = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||
#if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||
typedef struct {
|
||||
unsigned char bfType[2];
|
||||
unsigned char bfSize[4];
|
||||
@@ -391,10 +392,10 @@ class AnycubicTouchscreenClass {
|
||||
#define PIC_OPEN 50 // // ms
|
||||
#define PIC_SPEDD 20000
|
||||
#define MIN_GRAY_VLAUE 20
|
||||
#define LASER_PRINT_SPEED 30 //50*60
|
||||
#endif
|
||||
#define LASER_PRINT_SPEED 30 // 50*60
|
||||
#endif // if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||
};
|
||||
|
||||
extern AnycubicTouchscreenClass AnycubicTouchscreen;
|
||||
|
||||
#endif
|
||||
#endif // ifndef anycubic_touchscreen_h
|
||||
|
Reference in New Issue
Block a user