Misc. formatting, serial out

This commit is contained in:
Scott Lahteine
2021-04-13 21:34:21 -05:00
parent 4849d313fd
commit 0e9836649e
7 changed files with 855 additions and 856 deletions

View File

@ -88,7 +88,7 @@ static const uint8_t u8g_dev_ssd13xx_sleep_off[] PROGMEM = {
};
uint8_t u8g_dev_ssd1309_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch(msg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd1309_128x64_init_seq);

View File

@ -35,22 +35,27 @@
using namespace ExtUI;
namespace Anycubic {
class FileNavigator {
public:
FileNavigator();
void reset();
void getFiles(uint16_t);
void upDIR();
void changeDIR(char *);
void sendFile();
void refresh();
char * getCurrentFolderName();
private:
static FileList filelist;
static char currentfoldername[MAX_PATH_LEN];
static uint16_t lastindex;
static uint8_t folderdepth;
static uint16_t currentindex;
};
extern FileNavigator filenavigator;
class FileNavigator {
public:
FileNavigator();
void reset();
void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4);
void upDIR();
void changeDIR(const char *);
void sendFile(panel_type_t);
void refresh();
void skiptofileindex(uint16_t);
static FileList filelist;
private:
static uint16_t lastpanelindex;
static uint16_t currentindex;
static uint8_t currentfolderdepth;
static uint16_t currentfolderindex[MAX_FOLDER_DEPTH];
static char currentfoldername[MAX_PATH_LEN];
};
extern FileNavigator filenavigator;
}

File diff suppressed because it is too large Load Diff

View File

@ -35,46 +35,46 @@
namespace Anycubic {
class ChironTFT {
private:
static printer_state_t printer_state;
static paused_state_t pause_state;
static heater_state_t hotend_state;
static heater_state_t hotbed_state;
static xy_uint8_t selectedmeshpoint;
static char panel_command[MAX_CMND_LEN];
static uint8_t command_len;
static char selectedfile[MAX_PATH_LEN];
static float live_Zoffset;
static file_menu_t file_menu;
class ChironTFT {
private:
static printer_state_t printer_state;
static paused_state_t pause_state;
static heater_state_t hotend_state;
static heater_state_t hotbed_state;
static xy_uint8_t selectedmeshpoint;
static char panel_command[MAX_CMND_LEN];
static uint8_t command_len;
static char selectedfile[MAX_PATH_LEN];
static float live_Zoffset;
static file_menu_t file_menu;
public:
ChironTFT();
static void Startup();
static void IdleLoop();
static void PrinterKilled(PGM_P,PGM_P);
static void MediaEvent(media_event_t);
static void TimerEvent(timer_event_t);
static void FilamentRunout();
static void ConfirmationRequest(const char * const );
static void StatusChange(const char * const );
static void PowerLossRecovery();
public:
ChironTFT();
static void Startup();
static void IdleLoop();
static void PrinterKilled(PGM_P,PGM_P);
static void MediaEvent(media_event_t);
static void TimerEvent(timer_event_t);
static void FilamentRunout();
static void ConfirmationRequest(const char * const );
static void StatusChange(const char * const );
static void PowerLossRecovery();
private:
static void SendtoTFT(PGM_P);
static void SendtoTFTLN(PGM_P);
static bool ReadTFTCommand();
static int8_t Findcmndpos(const char *, char);
static void CheckHeaters();
static void SendFileList(int8_t);
static void SelectFile();
static void InjectCommandandWait(PGM_P);
static void ProcessPanelRequest();
static void PanelInfo(uint8_t);
static void PanelAction(uint8_t);
static void PanelProcess(uint8_t);
};
private:
static void SendtoTFT(PGM_P);
static void SendtoTFTLN(PGM_P);
static bool ReadTFTCommand();
static int8_t Findcmndpos(const char *, char);
static void CheckHeaters();
static void SendFileList(int8_t);
static void SelectFile();
static void InjectCommandandWait(PGM_P);
static void ProcessPanelRequest();
static void PanelInfo(uint8_t);
static void PanelAction(uint8_t);
static void PanelProcess(uint8_t);
};
extern ChironTFT Chiron;
extern ChironTFT Chiron;
} // Anycubic

View File

@ -109,19 +109,16 @@
#define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position
namespace Anycubic {
enum heater_state_t : uint8_t {
AC_heater_off,
AC_heater_temp_set,
AC_heater_temp_reached
};
enum paused_state_t : uint8_t {
AC_paused_heater_timed_out,
AC_paused_purging_filament,
AC_paused_idle
};
enum printer_state_t : uint8_t {
AC_printer_idle,
AC_printer_probing,
@ -131,13 +128,11 @@ namespace Anycubic {
AC_printer_stopping,
AC_printer_resuming_from_power_outage
};
enum timer_event_t : uint8_t {
AC_timer_started,
AC_timer_paused,
AC_timer_stopped
};
enum media_event_t : uint8_t {
AC_media_inserted,
AC_media_removed,
@ -149,5 +144,4 @@ namespace Anycubic {
AC_menu_change_to_file,
AC_menu_change_to_command
};
} // Anycubic