mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-03-13 01:40:09 +00:00
🚸 AnyCubic Vyper LCD improvements (#27158)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
e0d683baed
commit
1f0b8d6cd8
3 changed files with 208 additions and 581 deletions
|
@ -27,20 +27,18 @@
|
|||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#define ACDEBUGLEVEL 0 // 0: off, 255: all levels enabled
|
||||
// Bit-masks for selective debug
|
||||
#define AC_INFO 1
|
||||
#define AC_ACTION 2
|
||||
#define AC_FILE 4
|
||||
#define AC_PANEL 8
|
||||
#define AC_MARLIN 16
|
||||
#define AC_SOME 32
|
||||
#define AC_ALL 64
|
||||
//#define ACDEBUGLEVEL AC_MARLIN // 0: off, 255: all levels enabled
|
||||
|
||||
#if ACDEBUGLEVEL
|
||||
// Bit-masks for selective debug:
|
||||
enum ACDebugMask : uint8_t {
|
||||
AC_INFO = 1,
|
||||
AC_ACTION = 2,
|
||||
AC_FILE = 4,
|
||||
AC_PANEL = 8,
|
||||
AC_MARLIN = 16,
|
||||
AC_SOME = 32,
|
||||
AC_ALL = 64
|
||||
};
|
||||
#define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro
|
||||
#define ACDEBUG(mask) ((mask) & ACDEBUGLEVEL)
|
||||
#else
|
||||
#define ACDEBUG(mask) false
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -29,8 +29,6 @@
|
|||
#include "../../../inc/MarlinConfigPre.h"
|
||||
#include "../ui_api.h"
|
||||
|
||||
#define MAIN_BOARD_FIRMWARE_VER "V2.4.5"
|
||||
|
||||
#define DATA_BUF_SIZE 64
|
||||
|
||||
/****************** PAGE INDEX***********************/
|
||||
|
@ -124,29 +122,29 @@
|
|||
/****************** TXT **************************/
|
||||
|
||||
// MAIN PAGE TXT
|
||||
#define TXT_MAIN_BED 0x2000
|
||||
#define TXT_MAIN_HOTEND 0x2030
|
||||
#define TXT_MAIN_MESSAGE 0x2060
|
||||
#define TXT_MAIN_BED (0x2000+0*0x30)
|
||||
#define TXT_MAIN_HOTEND (0x2000+1*0x30)
|
||||
#define TXT_MAIN_MESSAGE (0x2000+2*0x30)
|
||||
|
||||
// FILE TXT
|
||||
#define TXT_FILE_0 (0x2000+3*0x30)
|
||||
#define TXT_DESCRIPT_0 0x5000 // DESCRIBE ADDRESS
|
||||
#define TXT_FILE_1 (0x2000+4*0x30)
|
||||
#define TXT_DESCRIPT_1 0x5030
|
||||
#define TXT_FILE_2 (0x2000+5*0x30)
|
||||
#define TXT_DESCRIPT_2 0x5060
|
||||
#define TXT_FILE_3 (0x2000+6*0x30)
|
||||
#define TXT_DESCRIPT_3 0x5090
|
||||
#define TXT_FILE_4 (0x2000+7*0x30)
|
||||
#define TXT_DESCRIPT_4 0x50C0
|
||||
#define TXT_FILE_0 (0x2000+3*0x30)
|
||||
#define TXT_DESCRIPT_0 0x5000 // DESCRIBE ADDRESS
|
||||
#define TXT_FILE_1 (0x2000+4*0x30)
|
||||
#define TXT_DESCRIPT_1 0x5030
|
||||
#define TXT_FILE_2 (0x2000+5*0x30)
|
||||
#define TXT_DESCRIPT_2 0x5060
|
||||
#define TXT_FILE_3 (0x2000+6*0x30)
|
||||
#define TXT_DESCRIPT_3 0x5090
|
||||
#define TXT_FILE_4 (0x2000+7*0x30)
|
||||
#define TXT_DESCRIPT_4 0x50C0
|
||||
|
||||
// PRINT TXT
|
||||
#define TXT_PRINT_NAME 0x2000+8*0x30
|
||||
#define TXT_PRINT_SPEED 0x2000+9*0x30
|
||||
#define TXT_PRINT_TIME 0x2000+10*0x30
|
||||
#define TXT_PRINT_PROGRESS 0x2000+11*0x30
|
||||
#define TXT_PRINT_HOTEND 0x2000+12*0x30
|
||||
#define TXT_PRINT_BED 0x2000+13*0x30
|
||||
#define TXT_PRINT_NAME (0x2000+8*0x30)
|
||||
#define TXT_PRINT_SPEED (0x2000+9*0x30)
|
||||
#define TXT_PRINT_TIME (0x2000+10*0x30)
|
||||
#define TXT_PRINT_PROGRESS (0x2000+11*0x30)
|
||||
#define TXT_PRINT_HOTEND (0x2000+12*0x30)
|
||||
#define TXT_PRINT_BED (0x2000+13*0x30)
|
||||
|
||||
// PRINT ADJUST TXT
|
||||
|
||||
|
@ -158,8 +156,8 @@
|
|||
|
||||
#define TXT_BED_NOW (0x2000+17*0x30)
|
||||
#define TXT_BED_TARGET (0x2000+18*0x30)
|
||||
#define TXT_HOTEND_NOW (0x2000+19*0x30)
|
||||
#define TXT_HOTEND_TARGET (0x2000+20*0x30)
|
||||
#define TXT_HOTEND_NOW (0x2000+19*0x30)
|
||||
#define TXT_HOTEND_TARGET (0x2000+20*0x30)
|
||||
|
||||
// SPEED SET TXT
|
||||
#define TXT_FAN_SPEED_NOW (0x2000+21*0x30)
|
||||
|
@ -171,23 +169,23 @@
|
|||
#define TXT_ABOUT (0x2000+25*0x30)
|
||||
|
||||
// RECORT TXT
|
||||
#define TXT_RECORT_0 (0x2000+26*0x30)
|
||||
#define TXT_RECORT_1 (0x2000+27*0x30)
|
||||
#define TXT_RECORT_2 (0x2000+28*0x30)
|
||||
#define TXT_RECORT_3 (0x2000+29*0x30)
|
||||
#define TXT_RECORT_4 (0x2000+30*0x30)
|
||||
#define TXT_RECORT_5 (0x2000+31*0x30)
|
||||
#define TXT_RECORT_0 (0x2000+26*0x30)
|
||||
#define TXT_RECORT_1 (0x2000+27*0x30)
|
||||
#define TXT_RECORT_2 (0x2000+28*0x30)
|
||||
#define TXT_RECORT_3 (0x2000+29*0x30)
|
||||
#define TXT_RECORT_4 (0x2000+30*0x30)
|
||||
#define TXT_RECORT_5 (0x2000+31*0x30)
|
||||
|
||||
// ADVANCE LEVEL TXT
|
||||
#define TXT_LEVEL_OFFSET (0x2000+32*0x30)
|
||||
#define TXT_LEVEL_OFFSET (0x2000+32*0x30)
|
||||
|
||||
// FILAMENT TXT
|
||||
#define TXT_FILAMENT_TEMP (0x2000+33*0x30)
|
||||
#define TXT_FILAMENT_TEMP (0x2000+33*0x30)
|
||||
|
||||
#define TXT_FINISH_TIME (0x2000+34*0x30)
|
||||
#define TXT_VERSION (0x2000+35*0x30)
|
||||
#define TXT_PREHEAT_HOTEND (0x2000+36*0x30)
|
||||
#define TXT_PREHEAT_BED (0x2000+37*0x30)
|
||||
#define TXT_FINISH_TIME (0x2000+34*0x30)
|
||||
#define TXT_VERSION (0x2000+35*0x30)
|
||||
#define TXT_PREHEAT_HOTEND (0x2000+36*0x30)
|
||||
#define TXT_PREHEAT_BED (0x2000+37*0x30)
|
||||
|
||||
#define TXT_OUTAGE_RECOVERY_FILE 0x2180
|
||||
|
||||
|
@ -341,12 +339,11 @@ namespace Anycubic {
|
|||
static uint8_t data_buf[DATA_BUF_SIZE];
|
||||
static uint8_t data_index;
|
||||
static uint16_t page_index_last, page_index_last_2;
|
||||
static uint8_t message_index;
|
||||
static uint8_t pop_up_index;
|
||||
static uint32_t key_value;
|
||||
static uint8_t lcd_txtbox_index;
|
||||
static uint8_t lcd_txtbox_page;
|
||||
static int16_t feedrate_back;
|
||||
static uint16_t feedrate_back;
|
||||
static language_t ui_language;
|
||||
|
||||
public:
|
||||
|
@ -376,12 +373,16 @@ namespace Anycubic {
|
|||
static void store_changes();
|
||||
|
||||
#if HAS_HOTEND
|
||||
static void send_temperature_hotend(uint32_t addr);
|
||||
static void send_temperature_hotend(const uint16_t address);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
static void send_temperature_bed(uint32_t addr);
|
||||
static void send_temperature_bed(const uint16_t address);
|
||||
#endif
|
||||
|
||||
static void changePageOfTFT(const uint16_t page_index, const bool no_send=false);
|
||||
static void fakeChangePageOfTFT(const uint16_t page_index);
|
||||
static void debugPage(int page=0);
|
||||
|
||||
typedef void (*p_fun)();
|
||||
static void page1();
|
||||
static void page2();
|
||||
|
@ -456,18 +457,25 @@ namespace Anycubic {
|
|||
static void sendFileList(int8_t);
|
||||
static void selectFile();
|
||||
static void processPanelRequest();
|
||||
static void panelInfo(uint8_t);
|
||||
static void panelAction(uint8_t);
|
||||
static void panelProcess(uint8_t);
|
||||
|
||||
static void sendValueToTFT(const uint16_t value, const uint16_t address);
|
||||
static void requestValueFromTFT(const uint16_t address);
|
||||
|
||||
static void sendTxtToTFT(const char *pdata, const uint16_t address);
|
||||
static void sendTxtToTFT_P(PGM_P const pstr, const uint16_t address) {
|
||||
char cstr[32];
|
||||
strlcpy_P(cstr, pstr, sizeof(cstr));
|
||||
sendTxtToTFT(cstr, address);
|
||||
}
|
||||
static void sendTxtToTFT(FSTR_P const fstr, const uint16_t address) {
|
||||
sendTxtToTFT_P(FTOP(fstr), address);
|
||||
}
|
||||
|
||||
static void sendColorToTFT(const uint16_t color, const uint16_t address);
|
||||
static void sendTimeToTFT(const uint32_t minutes, const uint16_t address);
|
||||
static void sendReadNumOfTxtToTFT(const uint8_t number, const uint16_t address);
|
||||
static void changePageOfTFT(const uint16_t page_index, const bool no_send=false);
|
||||
static void fakeChangePageOfTFT(const uint16_t page_index);
|
||||
static void lcdAudioSet(const bool audio_on);
|
||||
static void showAboutPage();
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue