✨ AnyCubic Vyper / Vyper LCD (#25405)
This commit is contained in:
@@ -3132,15 +3132,23 @@
|
|||||||
//#define TOUCH_UI_FTDI_EVE
|
//#define TOUCH_UI_FTDI_EVE
|
||||||
|
|
||||||
//
|
//
|
||||||
// Touch-screen LCD for Anycubic printers
|
// Touch-screen LCD for Anycubic Chiron
|
||||||
|
//
|
||||||
|
//#define ANYCUBIC_LCD_CHIRON
|
||||||
|
|
||||||
|
//
|
||||||
|
// Touch-screen LCD for Anycubic i3 Mega
|
||||||
//
|
//
|
||||||
//#define ANYCUBIC_LCD_I3MEGA
|
//#define ANYCUBIC_LCD_I3MEGA
|
||||||
//#define ANYCUBIC_LCD_CHIRON
|
#if ENABLED(ANYCUBIC_LCD_I3MEGA)
|
||||||
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
|
|
||||||
//#define ANYCUBIC_LCD_DEBUG
|
|
||||||
//#define ANYCUBIC_LCD_GCODE_EXT // Add ".gcode" to menu entries for DGUS clone compatibility
|
//#define ANYCUBIC_LCD_GCODE_EXT // Add ".gcode" to menu entries for DGUS clone compatibility
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Touch-screen LCD for Anycubic Vyper
|
||||||
|
//
|
||||||
|
//#define ANYCUBIC_LCD_VYPER
|
||||||
|
|
||||||
//
|
//
|
||||||
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
||||||
//
|
//
|
||||||
|
@@ -1957,7 +1957,7 @@
|
|||||||
//
|
//
|
||||||
// Specify additional languages for the UI. Default specified by LCD_LANGUAGE.
|
// Specify additional languages for the UI. Default specified by LCD_LANGUAGE.
|
||||||
//
|
//
|
||||||
#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI)
|
#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI, ANYCUBIC_LCD_VYPER)
|
||||||
//#define LCD_LANGUAGE_2 fr
|
//#define LCD_LANGUAGE_2 fr
|
||||||
//#define LCD_LANGUAGE_3 de
|
//#define LCD_LANGUAGE_3 de
|
||||||
//#define LCD_LANGUAGE_4 es
|
//#define LCD_LANGUAGE_4 es
|
||||||
|
@@ -382,6 +382,7 @@
|
|||||||
#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
|
#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
|
||||||
#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
||||||
#define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6)
|
#define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6)
|
||||||
|
#define BOARD_TRIGORILLA_V006 5068 // Trigorilla V0.0.6 (GD32F103RE)
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARM Cortex-M4F
|
// ARM Cortex-M4F
|
||||||
|
@@ -175,13 +175,13 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
xy_float_t LevelingBilinear::grid_factor_virt;
|
xy_float_t LevelingBilinear::grid_factor_virt;
|
||||||
|
|
||||||
#define LINEAR_EXTRAPOLATION(E, I) ((E) * 2 - (I))
|
#define LINEAR_EXTRAPOLATION(E, I) ((E) * 2 - (I))
|
||||||
float LevelingBilinear::bed_level_virt_coord(const uint8_t x, const uint8_t y) {
|
float LevelingBilinear::virt_coord(const uint8_t x, const uint8_t y) {
|
||||||
uint8_t ep = 0, ip = 1;
|
uint8_t ep = 0, ip = 1;
|
||||||
if (x > (GRID_MAX_POINTS_X) + 1 || y > (GRID_MAX_POINTS_Y) + 1) {
|
if (x > (GRID_MAX_POINTS_X) + 1 || y > (GRID_MAX_POINTS_Y) + 1) {
|
||||||
// The requested point requires extrapolating two points beyond the mesh.
|
// The requested point requires extrapolating two points beyond the mesh.
|
||||||
// These values are only requested for the edges of the mesh, which are always an actual mesh point,
|
// These values are only requested for the edges of the mesh, which are always an actual mesh point,
|
||||||
// and do not require interpolation. When interpolation is not needed, this "Mesh + 2" point is
|
// and do not require interpolation. When interpolation is not needed, this "Mesh + 2" point is
|
||||||
// cancelled out in bed_level_virt_cmr and does not impact the result. Return 0.0 rather than
|
// cancelled out in virt_cmr and does not impact the result. Return 0.0 rather than
|
||||||
// making this function more complex by extrapolating two points.
|
// making this function more complex by extrapolating two points.
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@@ -197,8 +197,8 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
);
|
);
|
||||||
else
|
else
|
||||||
return LINEAR_EXTRAPOLATION(
|
return LINEAR_EXTRAPOLATION(
|
||||||
bed_level_virt_coord(ep + 1, y),
|
virt_coord(ep + 1, y),
|
||||||
bed_level_virt_coord(ip + 1, y)
|
virt_coord(ip + 1, y)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!y || y == ABL_TEMP_POINTS_Y - 1) {
|
if (!y || y == ABL_TEMP_POINTS_Y - 1) {
|
||||||
@@ -213,14 +213,14 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
);
|
);
|
||||||
else
|
else
|
||||||
return LINEAR_EXTRAPOLATION(
|
return LINEAR_EXTRAPOLATION(
|
||||||
bed_level_virt_coord(x, ep + 1),
|
virt_coord(x, ep + 1),
|
||||||
bed_level_virt_coord(x, ip + 1)
|
virt_coord(x, ip + 1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return z_values[x - 1][y - 1];
|
return z_values[x - 1][y - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
float LevelingBilinear::bed_level_virt_cmr(const float p[4], const uint8_t i, const float t) {
|
float LevelingBilinear::virt_cmr(const float p[4], const uint8_t i, const float t) {
|
||||||
return (
|
return (
|
||||||
p[i-1] * -t * sq(1 - t)
|
p[i-1] * -t * sq(1 - t)
|
||||||
+ p[i] * (2 - 5 * sq(t) + 3 * t * sq(t))
|
+ p[i] * (2 - 5 * sq(t) + 3 * t * sq(t))
|
||||||
@@ -229,18 +229,18 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
) * 0.5f;
|
) * 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
float LevelingBilinear::bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) {
|
float LevelingBilinear::virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) {
|
||||||
float row[4], column[4];
|
float row[4], column[4];
|
||||||
LOOP_L_N(i, 4) {
|
LOOP_L_N(i, 4) {
|
||||||
LOOP_L_N(j, 4) {
|
LOOP_L_N(j, 4) {
|
||||||
column[j] = bed_level_virt_coord(i + x - 1, j + y - 1);
|
column[j] = virt_coord(i + x - 1, j + y - 1);
|
||||||
}
|
}
|
||||||
row[i] = bed_level_virt_cmr(column, 1, ty);
|
row[i] = virt_cmr(column, 1, ty);
|
||||||
}
|
}
|
||||||
return bed_level_virt_cmr(row, 1, tx);
|
return virt_cmr(row, 1, tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LevelingBilinear::bed_level_virt_interpolate() {
|
void LevelingBilinear::subdivide_mesh() {
|
||||||
grid_spacing_virt = grid_spacing / (BILINEAR_SUBDIVISIONS);
|
grid_spacing_virt = grid_spacing / (BILINEAR_SUBDIVISIONS);
|
||||||
grid_factor_virt = grid_spacing_virt.reciprocal();
|
grid_factor_virt = grid_spacing_virt.reciprocal();
|
||||||
LOOP_L_N(y, GRID_MAX_POINTS_Y)
|
LOOP_L_N(y, GRID_MAX_POINTS_Y)
|
||||||
@@ -250,12 +250,7 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
if ((ty && y == (GRID_MAX_POINTS_Y) - 1) || (tx && x == (GRID_MAX_POINTS_X) - 1))
|
if ((ty && y == (GRID_MAX_POINTS_Y) - 1) || (tx && x == (GRID_MAX_POINTS_X) - 1))
|
||||||
continue;
|
continue;
|
||||||
z_values_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] =
|
z_values_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] =
|
||||||
bed_level_virt_2cmr(
|
virt_2cmr(x + 1, y + 1, (float)tx / (BILINEAR_SUBDIVISIONS), (float)ty / (BILINEAR_SUBDIVISIONS));
|
||||||
x + 1,
|
|
||||||
y + 1,
|
|
||||||
(float)tx / (BILINEAR_SUBDIVISIONS),
|
|
||||||
(float)ty / (BILINEAR_SUBDIVISIONS)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +258,7 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
|
|||||||
|
|
||||||
// Refresh after other values have been updated
|
// Refresh after other values have been updated
|
||||||
void LevelingBilinear::refresh_bed_level() {
|
void LevelingBilinear::refresh_bed_level() {
|
||||||
TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate());
|
TERN_(ABL_BILINEAR_SUBDIVISION, subdivide_mesh());
|
||||||
cached_rel.x = cached_rel.y = -999.999;
|
cached_rel.x = cached_rel.y = -999.999;
|
||||||
cached_g.x = cached_g.y = -99;
|
cached_g.x = cached_g.y = -99;
|
||||||
}
|
}
|
||||||
|
@@ -43,10 +43,10 @@ private:
|
|||||||
static xy_pos_t grid_spacing_virt;
|
static xy_pos_t grid_spacing_virt;
|
||||||
static xy_float_t grid_factor_virt;
|
static xy_float_t grid_factor_virt;
|
||||||
|
|
||||||
static float bed_level_virt_coord(const uint8_t x, const uint8_t y);
|
static float virt_coord(const uint8_t x, const uint8_t y);
|
||||||
static float bed_level_virt_cmr(const float p[4], const uint8_t i, const float t);
|
static float virt_cmr(const float p[4], const uint8_t i, const float t);
|
||||||
static float bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty);
|
static float virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty);
|
||||||
static void bed_level_virt_interpolate();
|
static void subdivide_mesh();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -113,7 +113,7 @@ void PrintJobRecovery::changed() {
|
|||||||
purge();
|
purge();
|
||||||
else if (IS_SD_PRINTING())
|
else if (IS_SD_PRINTING())
|
||||||
save(true);
|
save(true);
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(onoff));
|
TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(enabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -303,6 +303,24 @@ static bool serial_data_available(serial_index_t index) {
|
|||||||
|
|
||||||
inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); }
|
inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); }
|
||||||
|
|
||||||
|
#if (defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32)) && defined(USBCON)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* arduinoststm32's USB receive buffer is not well behaved when the buffer overflows
|
||||||
|
*
|
||||||
|
* This can happen when the host programs (such as Pronterface) automatically
|
||||||
|
* send M105 temperature requests.
|
||||||
|
*/
|
||||||
|
void GCodeQueue::flush_rx() {
|
||||||
|
// Flush receive buffer
|
||||||
|
LOOP_L_N(p, NUM_SERIAL) {
|
||||||
|
if (!serial_data_available(p)) continue; // No data for this port? Skip.
|
||||||
|
while (SERIAL_IMPL.available(p)) (void)read_serial(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // (ARDUINO_ARCH_STM32F4 || ARDUINO_ARCH_STM32) && USBCON
|
||||||
|
|
||||||
void GCodeQueue::gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind) {
|
void GCodeQueue::gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind) {
|
||||||
PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
|
PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
|
||||||
SERIAL_ERROR_START();
|
SERIAL_ERROR_START();
|
||||||
|
@@ -201,6 +201,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void flush_and_request_resend(const serial_index_t serial_ind);
|
static void flush_and_request_resend(const serial_index_t serial_ind);
|
||||||
|
|
||||||
|
#if (defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32)) && defined(USBCON)
|
||||||
|
static void flush_rx();
|
||||||
|
#else
|
||||||
|
static void flush_rx() {}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (Re)Set the current line number for the last received command
|
* (Re)Set the current line number for the last received command
|
||||||
*/
|
*/
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#if HAS_PID_HEATING
|
#if HAS_PID_HEATING
|
||||||
|
|
||||||
#include "../gcode.h"
|
#include "../gcode.h"
|
||||||
|
#include "../queue.h" // for flush_tx
|
||||||
#include "../../lcd/marlinui.h"
|
#include "../../lcd/marlinui.h"
|
||||||
#include "../../module/temperature.h"
|
#include "../../module/temperature.h"
|
||||||
|
|
||||||
@@ -85,6 +86,8 @@ void GcodeSuite::M303() {
|
|||||||
LCD_MESSAGE(MSG_PID_AUTOTUNE);
|
LCD_MESSAGE(MSG_PID_AUTOTUNE);
|
||||||
thermalManager.PID_autotune(temp, hid, c, u);
|
thermalManager.PID_autotune(temp, hid, c, u);
|
||||||
ui.reset_status();
|
ui.reset_status();
|
||||||
|
|
||||||
|
queue.flush_rx();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_PID_HEATING
|
#endif // HAS_PID_HEATING
|
||||||
|
@@ -477,7 +477,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Aliases for LCD features
|
// Aliases for LCD features
|
||||||
#if !DGUS_UI_IS(NONE)
|
#if !DGUS_UI_IS(NONE) || ENABLED(ANYCUBIC_LCD_VYPER)
|
||||||
#define HAS_DGUS_LCD 1
|
#define HAS_DGUS_LCD 1
|
||||||
#if DGUS_UI_IS(ORIGIN, FYSETC, HIPRECY, MKS)
|
#if DGUS_UI_IS(ORIGIN, FYSETC, HIPRECY, MKS)
|
||||||
#define HAS_DGUS_LCD_CLASSIC 1
|
#define HAS_DGUS_LCD_CLASSIC 1
|
||||||
@@ -485,7 +485,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Extensible UI serial touch screens. (See src/lcd/extui)
|
// Extensible UI serial touch screens. (See src/lcd/extui)
|
||||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT)
|
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER, NEXTION_TFT)
|
||||||
#define IS_EXTUI 1
|
#define IS_EXTUI 1
|
||||||
#define EXTENSIBLE_UI
|
#define EXTENSIBLE_UI
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3140,7 +3140,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
|||||||
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
|
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
|
||||||
+ (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \
|
+ (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \
|
||||||
+ (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
|
+ (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
|
||||||
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
|
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \
|
||||||
+ DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \
|
+ DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \
|
||||||
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
|
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
|
||||||
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
|
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
|
||||||
@@ -3254,6 +3254,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(ANYCUBIC_LCD_VYPER)
|
||||||
|
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), "zh_CN") == 0, "LCD_LANGUAGE_2 must be set to zh_CN for ANYCUBIC_LCD_VYPER.");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD)
|
#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD)
|
||||||
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader."
|
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader."
|
||||||
#endif
|
#endif
|
||||||
@@ -3353,8 +3357,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
|||||||
#else
|
#else
|
||||||
#if HAS_DGUS_LCD
|
#if HAS_DGUS_LCD
|
||||||
#error "The DGUS LCD requires LCD_SERIAL_PORT to be defined."
|
#error "The DGUS LCD requires LCD_SERIAL_PORT to be defined."
|
||||||
#elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
|
#elif ANY(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER)
|
||||||
#error "The ANYCUBIC LCD requires LCD_SERIAL_PORT to be defined."
|
#error "ANYCUBIC_LCD_* requires LCD_SERIAL_PORT to be defined."
|
||||||
#elif ENABLED(MALYAN_LCD)
|
#elif ENABLED(MALYAN_LCD)
|
||||||
#error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined."
|
#error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined."
|
||||||
#elif ENABLED(NEXTION_LCD)
|
#elif ENABLED(NEXTION_LCD)
|
||||||
|
@@ -780,8 +780,8 @@
|
|||||||
/**
|
/**
|
||||||
* GD32 is not exactly like STM32
|
* GD32 is not exactly like STM32
|
||||||
*/
|
*/
|
||||||
#if MB(SOVOL_V131)
|
#if MB(SOVOL_V131, TRIGORILLA_V006)
|
||||||
#warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues."
|
#warning "GD32 based controllers may not be fully compatible with STM32 platforms. Please report any issues."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -72,14 +72,6 @@ void ChironTFT::Startup() {
|
|||||||
live_Zoffset = 0.0;
|
live_Zoffset = 0.0;
|
||||||
file_menu = AC_menu_file;
|
file_menu = AC_menu_file;
|
||||||
|
|
||||||
// Setup pins for powerloss detection
|
|
||||||
// Two IO pins are connected on the Trigorilla Board
|
|
||||||
// On a power interruption the OUTAGECON_PIN goes low.
|
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
|
||||||
OUT_WRITE(OUTAGECON_PIN, HIGH);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Filament runout is handled by Marlin settings in Configuration.h
|
// Filament runout is handled by Marlin settings in Configuration.h
|
||||||
// opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
|
// opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
|
||||||
// opt_enable FIL_RUNOUT_PULLUP
|
// opt_enable FIL_RUNOUT_PULLUP
|
||||||
|
@@ -76,7 +76,6 @@ class ChironTFT {
|
|||||||
static void CheckHeaters();
|
static void CheckHeaters();
|
||||||
static void SendFileList(int8_t);
|
static void SendFileList(int8_t);
|
||||||
static void SelectFile();
|
static void SelectFile();
|
||||||
static void InjectCommandandWait(PGM_P);
|
|
||||||
static void ProcessPanelRequest();
|
static void ProcessPanelRequest();
|
||||||
static void PanelInfo(uint8_t);
|
static void PanelInfo(uint8_t);
|
||||||
static void PanelAction(uint8_t);
|
static void PanelAction(uint8_t);
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#if ENABLED(ANYCUBIC_LCD_I3MEGA)
|
#if ENABLED(ANYCUBIC_LCD_I3MEGA)
|
||||||
|
|
||||||
|
//#define ANYCUBIC_LCD_DEBUG
|
||||||
|
|
||||||
#include "anycubic_i3mega_lcd.h"
|
#include "anycubic_i3mega_lcd.h"
|
||||||
#include "../ui_api.h"
|
#include "../ui_api.h"
|
||||||
|
|
||||||
|
161
Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp
Normal file
161
Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/FileNavigator.cpp
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* The AC panel wants files in block of 4 and can only display a flat list *
|
||||||
|
* This library allows full folder traversal. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if ENABLED(ANYCUBIC_LCD_VYPER)
|
||||||
|
|
||||||
|
#include "FileNavigator.h"
|
||||||
|
#include "dgus_tft.h"
|
||||||
|
|
||||||
|
using namespace ExtUI;
|
||||||
|
|
||||||
|
namespace Anycubic {
|
||||||
|
|
||||||
|
FileList FileNavigator::filelist; // Instance of the Marlin file API
|
||||||
|
char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path
|
||||||
|
uint16_t FileNavigator::lastindex;
|
||||||
|
uint8_t FileNavigator::folderdepth;
|
||||||
|
uint16_t FileNavigator::currentindex; // override the panel request
|
||||||
|
|
||||||
|
FileNavigator filenavigator;
|
||||||
|
|
||||||
|
FileNavigator::FileNavigator() { reset(); }
|
||||||
|
|
||||||
|
void FileNavigator::reset() {
|
||||||
|
currentfoldername[0] = '\0';
|
||||||
|
folderdepth = 0;
|
||||||
|
currentindex = 0;
|
||||||
|
lastindex = 0;
|
||||||
|
// Start at root folder
|
||||||
|
while (!filelist.isAtRootDir()) filelist.upDir();
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileNavigator::refresh() { filelist.refresh(); }
|
||||||
|
|
||||||
|
void FileNavigator::getFiles(uint16_t index) {
|
||||||
|
uint8_t files = 5;
|
||||||
|
if (index == 0) currentindex = 0;
|
||||||
|
|
||||||
|
// Each time we change folder we reset the file index to 0 and keep track
|
||||||
|
// of the current position as the TFT panel isnt aware of folders trees.
|
||||||
|
if (index > 0) {
|
||||||
|
//--currentindex; // go back a file to take account off the .. we added to the root.
|
||||||
|
if (index > lastindex)
|
||||||
|
currentindex += files;
|
||||||
|
else
|
||||||
|
currentindex = currentindex < 5 ? 0 : currentindex - files;
|
||||||
|
}
|
||||||
|
lastindex = index;
|
||||||
|
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("index=", index, " currentindex=", currentindex, " lastindex=", lastindex);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t file_num = 0;
|
||||||
|
for (uint16_t _seek = currentindex; _seek < currentindex + files; _seek++) {
|
||||||
|
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("_seek: ", _seek, " currentindex: ", currentindex, " files: ", files);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (filelist.seek(_seek)) {
|
||||||
|
//sendFile();
|
||||||
|
|
||||||
|
DgusTFT::SendTxtToTFT(filelist.longFilename(), TXT_FILE_0 + file_num*0x30);
|
||||||
|
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("seek: ", _seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("over seek: ", _seek);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DgusTFT::SendTxtToTFT("\0", TXT_FILE_0 + file_num*0x30);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileNavigator::sendFile() {
|
||||||
|
// Send the file and folder info to the panel.
|
||||||
|
// This info will be returned when the file is selected.
|
||||||
|
// Permitted special characters in file name: -_*#~
|
||||||
|
// Panel can display 22 characters per line.
|
||||||
|
if (!filelist.isDir())
|
||||||
|
DgusTFT::SendTxtToTFT(filelist.longFilename(), TXT_FILE_0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileNavigator::changeDIR(char *folder) {
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("currentfolder: ", currentfoldername, " New: ", folder);
|
||||||
|
#endif
|
||||||
|
if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth
|
||||||
|
strcat(currentfoldername, folder);
|
||||||
|
strcat(currentfoldername, "/");
|
||||||
|
filelist.changeDir(folder);
|
||||||
|
refresh();
|
||||||
|
folderdepth++;
|
||||||
|
currentindex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileNavigator::upDIR() {
|
||||||
|
filelist.upDir();
|
||||||
|
refresh();
|
||||||
|
folderdepth--;
|
||||||
|
currentindex = 0;
|
||||||
|
// Remove the last child folder from the stored path
|
||||||
|
if (folderdepth == 0) {
|
||||||
|
currentfoldername[0] = '\0';
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char *pos = nullptr;
|
||||||
|
for (uint8_t f = 0; f < folderdepth; f++)
|
||||||
|
pos = strchr(currentfoldername, '/');
|
||||||
|
|
||||||
|
*(pos + 1) = '\0';
|
||||||
|
}
|
||||||
|
#if ACDEBUG(AC_FILE)
|
||||||
|
SERIAL_ECHOLNPGM("depth: ", folderdepth, " currentfoldername: ", currentfoldername);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
char* FileNavigator::getCurrentFolderName() { return currentfoldername; }
|
||||||
|
|
||||||
|
uint16_t FileNavigator::getFileNum() { return filelist.count(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ANYCUBIC_LCD_VYPER
|
57
Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h
Normal file
57
Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/FileNavigator.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dgus_tft_defs.h"
|
||||||
|
#include "../ui_api.h"
|
||||||
|
|
||||||
|
using namespace ExtUI;
|
||||||
|
|
||||||
|
namespace Anycubic {
|
||||||
|
class FileNavigator {
|
||||||
|
public:
|
||||||
|
FileNavigator();
|
||||||
|
|
||||||
|
static FileList filelist;
|
||||||
|
|
||||||
|
void reset();
|
||||||
|
void getFiles(uint16_t);
|
||||||
|
void upDIR();
|
||||||
|
void changeDIR(char *);
|
||||||
|
void sendFile();
|
||||||
|
void refresh();
|
||||||
|
char * getCurrentFolderName();
|
||||||
|
uint16_t getFileNum();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
static char currentfoldername[MAX_PATH_LEN];
|
||||||
|
static uint16_t lastindex;
|
||||||
|
static uint8_t folderdepth;
|
||||||
|
static uint16_t currentindex;
|
||||||
|
};
|
||||||
|
extern FileNavigator filenavigator;
|
||||||
|
}
|
58
Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp
Normal file
58
Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/Tunes.cpp
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* A Utility to play tunes using the buzzer in the printer controller. *
|
||||||
|
* See Tunes.h for note and tune definitions. *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if ENABLED(ANYCUBIC_LCD_VYPER)
|
||||||
|
|
||||||
|
#include "Tunes.h"
|
||||||
|
#include "../ui_api.h"
|
||||||
|
|
||||||
|
namespace Anycubic {
|
||||||
|
|
||||||
|
void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed=1) {
|
||||||
|
uint8_t pos = 1;
|
||||||
|
uint16_t wholenotelen = tune[0] / speed;
|
||||||
|
do {
|
||||||
|
uint16_t freq = tune[pos];
|
||||||
|
uint16_t notelen = wholenotelen / tune[pos + 1];
|
||||||
|
|
||||||
|
::tone(beeperPin, freq, notelen);
|
||||||
|
ExtUI::delay_ms(notelen);
|
||||||
|
pos += 2;
|
||||||
|
|
||||||
|
if (pos >= MAX_TUNE_LENGTH) break;
|
||||||
|
} while (tune[pos] != n_END);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ANYCUBIC_LCD_VYPER
|
220
Marlin/src/lcd/extui/anycubic_vyper/Tunes.h
Normal file
220
Marlin/src/lcd/extui/anycubic_vyper/Tunes.h
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/Tunes.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Notes definition from https://pages.mtu.edu/~suits/NoteFreqCalcs.html *
|
||||||
|
* *
|
||||||
|
* The format of a tune is: *
|
||||||
|
* {<whole note time>,<note1>,<length1>, <note2>,<length2>, ... <END>} *
|
||||||
|
* *
|
||||||
|
* 1) The first value is the length of a whole note in milliseconds *
|
||||||
|
* 2) Then a sequence of pitch and duration pairs *
|
||||||
|
* 3) Finally the END marker so your tunes can be any length up to *
|
||||||
|
* MAX_TUNE_LEN *
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define MAX_TUNE_LENGTH 128
|
||||||
|
|
||||||
|
// Special notes!
|
||||||
|
#define n_P 0 // silence or pause
|
||||||
|
#define n_END 10000 // end of tune marker
|
||||||
|
|
||||||
|
// Note duration divisors
|
||||||
|
#define l_T1 1
|
||||||
|
#define l_T2 2
|
||||||
|
#define l_T3 3
|
||||||
|
#define l_T4 4
|
||||||
|
#define l_T8 8
|
||||||
|
#define l_T16 16
|
||||||
|
|
||||||
|
// Note Frequency
|
||||||
|
#define n_C0 16
|
||||||
|
#define n_CS0 17
|
||||||
|
#define n_D0 18
|
||||||
|
#define n_DS0 19
|
||||||
|
#define n_E0 21
|
||||||
|
#define n_F0 22
|
||||||
|
#define n_FS0 23
|
||||||
|
#define n_G0 25
|
||||||
|
#define n_GS0 26
|
||||||
|
#define n_A0 28
|
||||||
|
#define n_AS0 29
|
||||||
|
#define n_B0 31
|
||||||
|
#define n_C1 33
|
||||||
|
#define n_CS1 35
|
||||||
|
#define n_D1 37
|
||||||
|
#define n_DS1 39
|
||||||
|
#define n_E1 41
|
||||||
|
#define n_F1 44
|
||||||
|
#define n_FS1 46
|
||||||
|
#define n_G1 49
|
||||||
|
#define n_GS1 52
|
||||||
|
#define n_A1 55
|
||||||
|
#define n_AS1 58
|
||||||
|
#define n_B1 62
|
||||||
|
#define n_C2 65
|
||||||
|
#define n_CS2 69
|
||||||
|
#define n_D2 73
|
||||||
|
#define n_DS2 78
|
||||||
|
#define n_E2 82
|
||||||
|
#define n_F2 87
|
||||||
|
#define n_FS2 93
|
||||||
|
#define n_G2 98
|
||||||
|
#define n_GS2 104
|
||||||
|
#define n_A2 110
|
||||||
|
#define n_AS2 117
|
||||||
|
#define n_B2 123
|
||||||
|
#define n_C3 131
|
||||||
|
#define n_CS3 139
|
||||||
|
#define n_D3 147
|
||||||
|
#define n_DS3 156
|
||||||
|
#define n_E3 165
|
||||||
|
#define n_F3 175
|
||||||
|
#define n_FS3 185
|
||||||
|
#define n_G3 196
|
||||||
|
#define n_GS3 208
|
||||||
|
#define n_A3 220
|
||||||
|
#define n_AS3 233
|
||||||
|
#define n_B3 247
|
||||||
|
#define n_C4 262
|
||||||
|
#define n_CS4 277
|
||||||
|
#define n_D4 294
|
||||||
|
#define n_DS4 311
|
||||||
|
#define n_E4 330
|
||||||
|
#define n_F4 349
|
||||||
|
#define n_FS4 370
|
||||||
|
#define n_G4 392
|
||||||
|
#define n_GS4 415
|
||||||
|
#define n_A4 440
|
||||||
|
#define n_AS4 466
|
||||||
|
#define n_B4 494
|
||||||
|
#define n_C5 523
|
||||||
|
#define n_CS5 554
|
||||||
|
#define n_D5 587
|
||||||
|
#define n_DS5 622
|
||||||
|
#define n_E5 659
|
||||||
|
#define n_F5 698
|
||||||
|
#define n_FS5 740
|
||||||
|
#define n_G5 784
|
||||||
|
#define n_GS5 831
|
||||||
|
#define n_A5 880
|
||||||
|
#define n_AS5 932
|
||||||
|
#define n_B5 988
|
||||||
|
#define n_C6 1047
|
||||||
|
#define n_CS6 1109
|
||||||
|
#define n_D6 1175
|
||||||
|
#define n_DS6 1245
|
||||||
|
#define n_E6 1319
|
||||||
|
#define n_F6 1397
|
||||||
|
#define n_FS6 1480
|
||||||
|
#define n_G6 1568
|
||||||
|
#define n_GS6 1661
|
||||||
|
#define n_A6 1760
|
||||||
|
#define n_AS6 1865
|
||||||
|
#define n_B6 1976
|
||||||
|
#define n_C7 2093
|
||||||
|
#define n_CS7 2217
|
||||||
|
#define n_D7 2349
|
||||||
|
#define n_DS7 2489
|
||||||
|
#define n_E7 2637
|
||||||
|
#define n_F7 2794
|
||||||
|
#define n_FS7 2960
|
||||||
|
#define n_G7 3136
|
||||||
|
#define n_GS7 3322
|
||||||
|
#define n_A7 3520
|
||||||
|
#define n_AS7 3729
|
||||||
|
#define n_B7 3951
|
||||||
|
#define n_C8 4186
|
||||||
|
#define n_CS8 4435
|
||||||
|
#define n_D8 4699
|
||||||
|
#define n_DS8 4978
|
||||||
|
#define n_E8 5274
|
||||||
|
#define n_F8 5587
|
||||||
|
#define n_FS8 5920
|
||||||
|
#define n_G8 6272
|
||||||
|
#define n_GS8 6645
|
||||||
|
#define n_A8 7040
|
||||||
|
#define n_AS8 7459
|
||||||
|
#define n_B8 7902
|
||||||
|
|
||||||
|
namespace Anycubic {
|
||||||
|
|
||||||
|
void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed);
|
||||||
|
|
||||||
|
// Only uncomment the tunes you are using to save memory
|
||||||
|
// This will help you write tunes!
|
||||||
|
// https://www.apronus.com/music/flashpiano.htm
|
||||||
|
|
||||||
|
const uint16_t SOS[] = {
|
||||||
|
250,
|
||||||
|
n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1,
|
||||||
|
n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T1,
|
||||||
|
n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t BeepBeep[] = {
|
||||||
|
500,
|
||||||
|
n_C7,l_T8, n_P,l_T16, n_C7,l_T8, n_P,l_T8,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t BeepBeepBeeep[] = {
|
||||||
|
1000,
|
||||||
|
n_G7,l_T4, n_P,l_T16, n_G7,l_T4, n_P,l_T8, n_G7,l_T2,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t Anycubic_PowerOn[] = {
|
||||||
|
1000,
|
||||||
|
n_F7,l_T8, n_P,l_T8, n_C7,l_T8, n_P,l_T8, n_D7,l_T8, n_P,l_T8,
|
||||||
|
n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_G7,l_T4, n_P,l_T4,
|
||||||
|
n_A7,l_T2, n_P,l_T1,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t GB_PowerOn[] = {
|
||||||
|
500,
|
||||||
|
n_C6,l_T4, n_P,l_T16, n_C7,l_T2, n_P,l_T8,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t Heater_Timedout[] = {
|
||||||
|
1000,
|
||||||
|
n_C6,l_T1,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t FilamentOut[] = {
|
||||||
|
1000,
|
||||||
|
n_AS7,l_T4, n_P,l_T16, n_FS7,l_T2,
|
||||||
|
n_END
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
3305
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp
Normal file
3305
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp
Normal file
File diff suppressed because it is too large
Load Diff
479
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h
Normal file
479
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h
Normal file
@@ -0,0 +1,479 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/dgus_tft.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dgus_tft_defs.h"
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
#include "../ui_api.h"
|
||||||
|
|
||||||
|
#define MAIN_BOARD_FIRMWARE_VER "V2.4.5"
|
||||||
|
|
||||||
|
#define DATA_BUF_SIZE 64
|
||||||
|
|
||||||
|
/****************** PAGE INDEX***********************/
|
||||||
|
#define PAGE_OFFSET 0
|
||||||
|
#define PAGE_MAIN (1+PAGE_OFFSET)
|
||||||
|
#define PAGE_FILE (2+PAGE_OFFSET)
|
||||||
|
#define PAGE_STATUS1 (3+PAGE_OFFSET) // show resume
|
||||||
|
#define PAGE_STATUS2 (4+PAGE_OFFSET) // show pause
|
||||||
|
#define PAGE_ADJUST (5+PAGE_OFFSET)
|
||||||
|
#define PAGE_KEYBPARD (6+PAGE_OFFSET)
|
||||||
|
#define PAGE_TOOL (7+PAGE_OFFSET)
|
||||||
|
#define PAGE_MOVE (8+PAGE_OFFSET)
|
||||||
|
#define PAGE_TEMP (9+PAGE_OFFSET)
|
||||||
|
#define PAGE_SPEED (10+PAGE_OFFSET)
|
||||||
|
#define PAGE_SYSTEM_CHS_AUDIO_ON (11+PAGE_OFFSET)
|
||||||
|
#define PAGE_WIFI (12+PAGE_OFFSET)
|
||||||
|
#define PAGE_ABOUT (13+PAGE_OFFSET)
|
||||||
|
#define PAGE_RECORD (14+PAGE_OFFSET)
|
||||||
|
#define PAGE_PREPARE (15+PAGE_OFFSET)
|
||||||
|
#define PAGE_PreLEVEL (16+PAGE_OFFSET)
|
||||||
|
#define PAGE_LEVEL_ADVANCE (17+PAGE_OFFSET)
|
||||||
|
#define PAGE_PREHEAT (18+PAGE_OFFSET)
|
||||||
|
#define PAGE_FILAMENT (19+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_DONE (20+PAGE_OFFSET)
|
||||||
|
#define PAGE_ABNORMAL (21+PAGE_OFFSET)
|
||||||
|
#define PAGE_PRINT_FINISH (22+PAGE_OFFSET)
|
||||||
|
#define PAGE_WAIT_STOP (23+PAGE_OFFSET)
|
||||||
|
#define PAGE_FILAMENT_LACK (25+PAGE_OFFSET)
|
||||||
|
#define PAGE_FORBIT (26+PAGE_OFFSET)
|
||||||
|
#define PAGE_STOP_CONF (27+PAGE_OFFSET)
|
||||||
|
#define PAGE_NO_SD (29+PAGE_OFFSET)
|
||||||
|
#define PAGE_FILAMENT_HEAT (30+PAGE_OFFSET)
|
||||||
|
#define PAGE_WAIT_PAUSE (32+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_LEVEL_ENSURE (33+PAGE_OFFSET)
|
||||||
|
#define PAGE_LEVELING (34+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_AUTO_OFFSET (115+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_SYSTEM_CHS_AUDIO_OFF (117+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_SYSTEM_ENG_AUDIO_ON (131+PAGE_OFFSET)
|
||||||
|
#define PAGE_SYSTEM_ENG_AUDIO_OFF (170+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_OUTAGE_RECOVERY (171+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_OUTAGE_RECOVERY (173+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_CHS_PROBE_PREHEATING (176+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_PROBE_PREHEATING (175+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_CHS_HOMING (177+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_BED_HEATER (178+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_BED_NTC (179+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_HOTEND_HEATER (180+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_HOTEND_NTC (181+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_ENDSTOP (182+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_X_ENDSTOP (182+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_Y_ENDSTOP (183+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_Z_ENDSTOP (184+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_ZL_ENDSTOP (185+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_ZR_ENDSTOP (186+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_ABNORMAL_LEVELING_SENSOR (187+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_LEVELING_FAILED (188+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_ENG_HOMING (189+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_BED_HEATER (190+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_BED_NTC (191+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_HOTEND_HEATER (192+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_HOTEND_NTC (193+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_ENDSTOP (194+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_X_ENDSTOP (194+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_Y_ENDSTOP (195+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_Z_ENDSTOP (196+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_ZL_ENDSTOP (197+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_ZR_ENDSTOP (198+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_ABNORMAL_LEVELING_SENSOR (199+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_LEVELING_FAILED (200+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_CHS_PROBE_PRECHECK (201+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_PROBE_PRECHECK_OK (202+PAGE_OFFSET)
|
||||||
|
#define PAGE_CHS_PROBE_PRECHECK_FAILED (203+PAGE_OFFSET)
|
||||||
|
|
||||||
|
#define PAGE_ENG_PROBE_PRECHECK (204+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_PROBE_PRECHECK_OK (205+PAGE_OFFSET)
|
||||||
|
#define PAGE_ENG_PROBE_PRECHECK_FAILED (206+PAGE_OFFSET)
|
||||||
|
|
||||||
|
/****************** Lcd control **************************/
|
||||||
|
#define REG_LCD_READY 0x0014
|
||||||
|
|
||||||
|
/****************** TXT **************************/
|
||||||
|
|
||||||
|
// MAIN PAGE TXT
|
||||||
|
#define TXT_MAIN_BED 0x2000
|
||||||
|
#define TXT_MAIN_HOTEND 0x2030
|
||||||
|
#define TXT_MAIN_MESSAGE 0x2060
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// PRINT ADJUST TXT
|
||||||
|
|
||||||
|
#define TXT_ADJUST_HOTEND (0x2000+14*0x30)
|
||||||
|
#define TXT_ADJUST_BED (0x2000+15*0x30)
|
||||||
|
#define TXT_ADJUST_SPEED (0x2000+16*0x30)
|
||||||
|
|
||||||
|
// TEMP SET TXT
|
||||||
|
|
||||||
|
#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)
|
||||||
|
|
||||||
|
// SPEED SET TXT
|
||||||
|
#define TXT_FAN_SPEED_NOW (0x2000+21*0x30)
|
||||||
|
#define TXT_FAN_SPEED_TARGET (0x2000+22*0x30)
|
||||||
|
#define TXT_PRINT_SPEED_NOW (0x2000+23*0x30)
|
||||||
|
#define TXT_PRINT_SPEED_TARGET (0x2000+24*0x30)
|
||||||
|
|
||||||
|
// ABOUT TXT
|
||||||
|
#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)
|
||||||
|
|
||||||
|
// ADVANCE LEVEL TXT
|
||||||
|
#define TXT_LEVEL_OFFSET (0x2000+32*0x30)
|
||||||
|
|
||||||
|
// FILAMENT TXT
|
||||||
|
#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_OUTAGE_RECOVERY_FILE 0x2180
|
||||||
|
|
||||||
|
#define ADDRESS_SYSTEM_AUDIO 0x0080
|
||||||
|
|
||||||
|
#define ADDRESS_MOVE_DISTANCE 0x4300
|
||||||
|
#define ADDRESS_SYSTEM_LED_STATUS 0x4500
|
||||||
|
#define ADDRESS_PRINT_SETTING_LED_STATUS 0x4550
|
||||||
|
|
||||||
|
/*********************** KEY VALUE **************************/
|
||||||
|
#define KEY_ADDRESS 0x1000
|
||||||
|
|
||||||
|
// MAIN PAGE KEY
|
||||||
|
|
||||||
|
#define KEY_MAIN_TO_FILE 1
|
||||||
|
#define KEY_MAIN_TO_TOOL 2
|
||||||
|
#define KEY_MAIN_TO_PREPARE 3
|
||||||
|
#define KEY_MAIN_TO_SYSTEM 4
|
||||||
|
|
||||||
|
// FILE PAGE KEY
|
||||||
|
|
||||||
|
#define KEY_FILE_TO_MAIN 1
|
||||||
|
#define KEY_PRINT 6
|
||||||
|
#define KEY_RESUME 5
|
||||||
|
#define KEY_PgUp 2
|
||||||
|
#define KEY_pgDn 3
|
||||||
|
#define KEY_FLASH 4
|
||||||
|
#define KEY_FILE0 7
|
||||||
|
#define KEY_FILE1 8
|
||||||
|
#define KEY_FILE2 9
|
||||||
|
#define KEY_FILE3 10
|
||||||
|
#define KEY_FILE4 11
|
||||||
|
|
||||||
|
#define KEY_CONTINUE 2
|
||||||
|
#define KEY_PAUSE 2
|
||||||
|
#define KEY_STOP 3
|
||||||
|
#define KEY_TO_ADJUST 4
|
||||||
|
#define KEY_ADJUST_TO_PRINT 1
|
||||||
|
#define KEY_ADJUST_ENSURE 7
|
||||||
|
#define KEY_CHECK_DOOR 2
|
||||||
|
#define KEY_DONE_OFF 3
|
||||||
|
|
||||||
|
// TOOL PAGE KEY
|
||||||
|
|
||||||
|
#define KEY_TOOL_TO_MAIN 1
|
||||||
|
#define KEY_TOOL_TO_MOVE 2
|
||||||
|
#define KEY_TOOL_TO_TEMP 3
|
||||||
|
#define KEY_TOOL_TO_SPEED 4
|
||||||
|
#define KEY_TOOL_LIGHT 5
|
||||||
|
|
||||||
|
#define KEY_MOVE_TO_TOLL 1// move page
|
||||||
|
#define KEY_MOVE_X 2
|
||||||
|
#define KEY_01 3
|
||||||
|
#define KEY_MOVE_NX 4
|
||||||
|
#define KEY_HOME_X 5
|
||||||
|
#define KEY_MOVE_Y 6
|
||||||
|
#define KEY_1 7
|
||||||
|
#define KEY_MOVE_NY 8
|
||||||
|
#define KEY_HOME_Y 9
|
||||||
|
#define KEY_MOVE_Z 10
|
||||||
|
#define KEY_10 11
|
||||||
|
#define KEY_MOVE_NZ 12
|
||||||
|
#define KEY_HOME_Z 13
|
||||||
|
#define KEY_SPEED_LOW 14
|
||||||
|
#define KEY_SPEED_MIDDLE 15
|
||||||
|
#define KEY_SPEED_HIGHT 16
|
||||||
|
#define KEY_HOME_ALL 17
|
||||||
|
|
||||||
|
#define KEY_TEMP_TO_TOOL 1 //Temperature setting page
|
||||||
|
#define KEY_BED_ADD 2
|
||||||
|
#define KEY_BED_DEC 3
|
||||||
|
#define KEY_HOTEND_ADD 4
|
||||||
|
#define KEY_HOTEND_DEC 5
|
||||||
|
#define KEY_COOL 6
|
||||||
|
#define KEY_TEMP_ENSURE 7
|
||||||
|
|
||||||
|
#define KEY_SPEED_TO_TOOL 1 //speed setting page
|
||||||
|
#define KEY_FAN_SPEED_ADD 2
|
||||||
|
#define KEY_FAN_SPEED_DEC 3
|
||||||
|
#define KEY_PRINT_SPEED_ADD 4
|
||||||
|
#define KEY_PRINT_SPEED_DEC 5
|
||||||
|
#define KEY_SPEED_ENSURE 6
|
||||||
|
|
||||||
|
#define KEY_PREPARE_TO_MAIN 1 //PREPARE PAGE TO MAIN
|
||||||
|
#define KEY_PREPARE_TO_PreLEVE 2
|
||||||
|
#define KEY_PreLEVE_TO_PREPARE 1
|
||||||
|
#define KEY_PreLEVE_TO_LEVELING 2
|
||||||
|
#define KEY_PreLEVE_TO_ADVANCE 3
|
||||||
|
#define KEY_ADVANCE_TO_PreLEVE 1
|
||||||
|
#define KEY_LEVEL_ADD 3
|
||||||
|
#define KEY_LEVEL_DEC 2
|
||||||
|
#define KEY_LEVEL_ENSURE 4
|
||||||
|
|
||||||
|
|
||||||
|
#define KEY_PREPARE_TO_PREHEAT 3
|
||||||
|
#define KEY_PREHEAT_TO_PREPARE 1
|
||||||
|
#define KEY_PREHEAT_PLA 2
|
||||||
|
#define KEY_PREHEAT_ABS 3
|
||||||
|
|
||||||
|
#define KEY_PREPARE_TO_FILAMENT 4
|
||||||
|
#define KEY_FILAMENT_TO_PREPARE 1
|
||||||
|
#define KEY_RETREAT 3
|
||||||
|
#define KEY_FORWARD 2
|
||||||
|
#define KEY_FILAMENT_STOP 4
|
||||||
|
|
||||||
|
// SYSTEM PAGE KEY
|
||||||
|
|
||||||
|
#define KEY_SYS_TO_MAIN 1
|
||||||
|
#define KEY_LANGUAGE 2
|
||||||
|
#define KEY_SYS_TO_WIFI 3
|
||||||
|
#define KEY_WIFI_TO_SYS 1
|
||||||
|
|
||||||
|
#define KEY_BEEP 4
|
||||||
|
#define KEY_SYS_TO_ABOUT 5
|
||||||
|
#define KEY_ABOUT_TO_SYS 1
|
||||||
|
|
||||||
|
#define KEY_SYS_TO_RECORD 6
|
||||||
|
#define KEY_RECORD_TO_SYS 1
|
||||||
|
#define KEY_RECORD_PaUp 2
|
||||||
|
#define KEY_RECORD_PaDn 3
|
||||||
|
#define KEY_RECORD_FLASH 4
|
||||||
|
|
||||||
|
#define COLOR_RED 0xF800
|
||||||
|
#define COLOR_BLUE 0x0210
|
||||||
|
|
||||||
|
namespace Anycubic {
|
||||||
|
|
||||||
|
enum language_t : uint8_t { ENG, CHS };
|
||||||
|
|
||||||
|
class DgusTFT;
|
||||||
|
extern DgusTFT ui;
|
||||||
|
|
||||||
|
typedef struct _lcd_info_t {
|
||||||
|
language_t language;
|
||||||
|
bool audio_on;
|
||||||
|
} lcd_info_t;
|
||||||
|
|
||||||
|
class DgusTFT {
|
||||||
|
static printer_state_t printer_state;
|
||||||
|
static paused_state_t pause_state;
|
||||||
|
#if HAS_HOTEND
|
||||||
|
static heater_state_t hotend_state;
|
||||||
|
#endif
|
||||||
|
#if HAS_HEATED_BED
|
||||||
|
static heater_state_t hotbed_state;
|
||||||
|
#endif
|
||||||
|
static char panel_command[MAX_CMND_LEN];
|
||||||
|
static uint8_t command_len;
|
||||||
|
static char selectedfile[MAX_PATH_LEN];
|
||||||
|
static file_menu_t file_menu;
|
||||||
|
static bool data_received;
|
||||||
|
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 language_t ui_language;
|
||||||
|
|
||||||
|
public:
|
||||||
|
DgusTFT();
|
||||||
|
|
||||||
|
static lcd_info_t lcd_info, lcd_info_back;
|
||||||
|
static uint16_t page_index_now;
|
||||||
|
|
||||||
|
static void Startup();
|
||||||
|
static void ParamInit();
|
||||||
|
static void IdleLoop();
|
||||||
|
static void PrinterKilled(FSTR_P,FSTR_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 PowerLoss();
|
||||||
|
static void PowerLossRecovery();
|
||||||
|
static void HomingStart();
|
||||||
|
static void HomingComplete();
|
||||||
|
|
||||||
|
static void set_descript_color(const uint16_t color, const uint8_t index=lcd_txtbox_index);
|
||||||
|
static void set_language(language_t);
|
||||||
|
static void toggle_language();
|
||||||
|
static void goto_system_page();
|
||||||
|
static void toggle_audio();
|
||||||
|
static void store_changes();
|
||||||
|
|
||||||
|
#if HAS_HOTEND
|
||||||
|
static void send_temperature_hotend(uint32_t addr);
|
||||||
|
#endif
|
||||||
|
#if HAS_HEATED_BED
|
||||||
|
static void send_temperature_bed(uint32_t addr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef void (*p_fun)();
|
||||||
|
static void page1();
|
||||||
|
static void page2();
|
||||||
|
static void page3();
|
||||||
|
static void page4();
|
||||||
|
static void page5();
|
||||||
|
static void page6();
|
||||||
|
static void page7(); // tool
|
||||||
|
static void page8();
|
||||||
|
static void page9();
|
||||||
|
static void page10(); // fan and print speed
|
||||||
|
static void page11(); // system
|
||||||
|
static void page12();
|
||||||
|
static void page13();
|
||||||
|
static void page14();
|
||||||
|
static void page15();
|
||||||
|
static void page16();
|
||||||
|
static void page17();
|
||||||
|
static void page18();
|
||||||
|
static void page19();
|
||||||
|
static void page20();
|
||||||
|
static void page21();
|
||||||
|
static void page22();
|
||||||
|
static void page23();
|
||||||
|
static void page24();
|
||||||
|
static void page25();
|
||||||
|
static void page26();
|
||||||
|
static void page27();
|
||||||
|
static void page28();
|
||||||
|
static void page29();
|
||||||
|
static void page30();
|
||||||
|
static void page31();
|
||||||
|
static void page32();
|
||||||
|
|
||||||
|
#if HAS_LEVELING
|
||||||
|
static void page33();
|
||||||
|
#endif
|
||||||
|
static void page34();
|
||||||
|
static void page115();
|
||||||
|
static void page117(); // CHS Mute handler
|
||||||
|
static void page124();
|
||||||
|
static void page125();
|
||||||
|
static void page170(); // ENG Mute handler
|
||||||
|
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
|
static void page171(); // CHS power outage resume handler
|
||||||
|
static void page173(); // ENG power outage resume handler
|
||||||
|
#endif
|
||||||
|
#if HAS_LEVELING
|
||||||
|
static void page175(); // ENG probe preheating handler
|
||||||
|
static void page176(); // CHS probe preheating handler
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void page177_to_198();
|
||||||
|
//static void page178_to_181_190_to_193();
|
||||||
|
static void page199_to_200();
|
||||||
|
|
||||||
|
static void page201();
|
||||||
|
static void page202();
|
||||||
|
static void page203();
|
||||||
|
static void page204();
|
||||||
|
static void page205();
|
||||||
|
static void page206();
|
||||||
|
|
||||||
|
static void pop_up_manager();
|
||||||
|
|
||||||
|
static void SendtoTFT(FSTR_P const=nullptr);
|
||||||
|
static void SendtoTFTLN(FSTR_P const=nullptr);
|
||||||
|
static bool ReadTFTCommand();
|
||||||
|
static int8_t Findcmndpos(const char *, const char);
|
||||||
|
static void CheckHeaters();
|
||||||
|
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 SendColorToTFT(const uint16_t color, 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);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
extern DgusTFT Dgus;
|
||||||
|
}
|
157
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h
Normal file
157
Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/dgus_defs.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#define ACDEBUGLEVEL 0 // 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
|
||||||
|
#else
|
||||||
|
#define ACDEBUG(mask) false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial
|
||||||
|
#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path
|
||||||
|
#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command
|
||||||
|
#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path
|
||||||
|
|
||||||
|
#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault
|
||||||
|
#define AC_LOWEST_MESHPOINT_VAL Z_PROBE_LOW_POINT // The lowest value you can set for a single mesh point offset
|
||||||
|
|
||||||
|
// TFT panel commands
|
||||||
|
#define AC_msg_sd_card_inserted F("J00")
|
||||||
|
#define AC_msg_sd_card_removed F("J01")
|
||||||
|
#define AC_msg_no_sd_card F("J02")
|
||||||
|
#define AC_msg_usb_connected F("J03")
|
||||||
|
#define AC_msg_print_from_sd_card F("J04")
|
||||||
|
#define AC_msg_pause F("J05")
|
||||||
|
#define AC_msg_nozzle_heating F("J06")
|
||||||
|
#define AC_msg_nozzle_heating_done F("J07")
|
||||||
|
#define AC_msg_bed_heating F("J08")
|
||||||
|
#define AC_msg_bed_heating_done F("J09")
|
||||||
|
#define AC_msg_nozzle_temp_abnormal F("J10")
|
||||||
|
#define AC_msg_kill_lcd F("J11")
|
||||||
|
#define AC_msg_ready F("J12")
|
||||||
|
#define AC_msg_low_nozzle_temp F("J13")
|
||||||
|
#define AC_msg_print_complete F("J14")
|
||||||
|
#define AC_msg_filament_out_alert F("J15")
|
||||||
|
#define AC_msg_stop F("J16")
|
||||||
|
#define AC_msg_main_board_has_reset F("J17")
|
||||||
|
#define AC_msg_paused F("J18")
|
||||||
|
#define AC_msg_j19_unknown F("J19")
|
||||||
|
#define AC_msg_sd_file_open_success F("J20")
|
||||||
|
#define AC_msg_sd_file_open_failed F("J21")
|
||||||
|
#define AC_msg_level_monitor_finished F("J22")
|
||||||
|
#define AC_msg_filament_out_block F("J23")
|
||||||
|
#define AC_msg_probing_not_allowed F("J24")
|
||||||
|
#define AC_msg_probing_complete F("J25")
|
||||||
|
#define AC_msg_start_probing F("J26")
|
||||||
|
#define AC_msg_version F("J27")
|
||||||
|
#define AC_msg_bed_temp_abnormal F("J28")
|
||||||
|
|
||||||
|
#define MARLIN_msg_probing_point PSTR("Probing Point ")
|
||||||
|
#define MARLIN_msg_start_probing PSTR("Probing Point 1/25")
|
||||||
|
#define MARLIN_msg_probing_failed PSTR("Probing Failed")
|
||||||
|
#define MARLIN_msg_ready PSTR(" Ready.")
|
||||||
|
#define MARLIN_msg_print_paused PSTR("Print Paused")
|
||||||
|
#define MARLIN_msg_print_aborted PSTR("Print Aborted")
|
||||||
|
#define MARLIN_msg_extruder_heating PSTR("E Heating...")
|
||||||
|
#define MARLIN_msg_bed_heating PSTR("Bed Heating...")
|
||||||
|
|
||||||
|
#define MARLIN_msg_probe_preheat_start PSTR("Probe preheat start")
|
||||||
|
#define MARLIN_msg_probe_preheat_stop PSTR("Probe preheat stop")
|
||||||
|
|
||||||
|
|
||||||
|
#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked")
|
||||||
|
#define MARLIN_msg_heater_timeout PSTR("Heater Timeout")
|
||||||
|
#define MARLIN_msg_reheating PSTR("Reheating...")
|
||||||
|
#define MARLIN_msg_reheat_done PSTR("Reheat finished.")
|
||||||
|
#define MARLIN_msg_filament_purging PSTR("Filament Purging...")
|
||||||
|
#define MARLIN_msg_media_removed PSTR("Media Removed")
|
||||||
|
#define MARLIN_msg_special_pause PSTR("PB")
|
||||||
|
#define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine
|
||||||
|
#define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle
|
||||||
|
|
||||||
|
#define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster
|
||||||
|
#define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82")
|
||||||
|
#define AC_cmnd_enable_levelling PSTR("M420 S1 V1")
|
||||||
|
#define AC_cmnd_power_loss_recovery PSTR("G28 R5 X Y\nG28 Z") // 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_filament_lack,
|
||||||
|
AC_paused_purging_filament,
|
||||||
|
AC_paused_idle
|
||||||
|
};
|
||||||
|
|
||||||
|
enum printer_state_t : uint8_t {
|
||||||
|
AC_printer_idle,
|
||||||
|
AC_printer_probing,
|
||||||
|
AC_printer_printing,
|
||||||
|
AC_printer_pausing,
|
||||||
|
AC_printer_paused,
|
||||||
|
AC_printer_stopping,
|
||||||
|
AC_printer_stopping_from_media_remove,
|
||||||
|
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,
|
||||||
|
AC_media_error
|
||||||
|
};
|
||||||
|
enum file_menu_t : uint8_t {
|
||||||
|
AC_menu_file,
|
||||||
|
AC_menu_command,
|
||||||
|
AC_menu_change_to_file,
|
||||||
|
AC_menu_change_to_command
|
||||||
|
};
|
||||||
|
}
|
152
Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp
Normal file
152
Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lcd/extui/anycubic_vyper/vyper_extui.cpp
|
||||||
|
*
|
||||||
|
* Anycubic Dgus TFT support for Marlin
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if ENABLED(ANYCUBIC_LCD_VYPER)
|
||||||
|
|
||||||
|
#include "../ui_api.h"
|
||||||
|
#include "dgus_tft.h"
|
||||||
|
|
||||||
|
using namespace Anycubic;
|
||||||
|
|
||||||
|
namespace ExtUI {
|
||||||
|
|
||||||
|
void onStartup() { Dgus.Startup(); }
|
||||||
|
|
||||||
|
void onIdle() { Dgus.IdleLoop(); }
|
||||||
|
|
||||||
|
void onPrinterKilled(FSTR_P const error, FSTR_P const component) {
|
||||||
|
Dgus.PrinterKilled(error, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onMediaInserted() { Dgus.MediaEvent(AC_media_inserted); }
|
||||||
|
void onMediaError() { Dgus.MediaEvent(AC_media_error); }
|
||||||
|
void onMediaRemoved() { Dgus.MediaEvent(AC_media_removed); }
|
||||||
|
|
||||||
|
void onPlayTone(const uint16_t frequency, const uint16_t duration) {
|
||||||
|
#if ENABLED(SPEAKER)
|
||||||
|
::tone(BEEPER_PIN, frequency, duration);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void onPrintTimerStarted() { Dgus.TimerEvent(AC_timer_started); }
|
||||||
|
void onPrintTimerPaused() { Dgus.TimerEvent(AC_timer_paused); }
|
||||||
|
void onPrintTimerStopped() { Dgus.TimerEvent(AC_timer_stopped); }
|
||||||
|
void onPrintDone() {}
|
||||||
|
|
||||||
|
void onFilamentRunout(const extruder_t) { Dgus.FilamentRunout(); }
|
||||||
|
|
||||||
|
void onUserConfirmRequired(const char * const msg) { Dgus.ConfirmationRequest(msg); }
|
||||||
|
void onStatusChanged(const char * const msg) { Dgus.StatusChange(msg); }
|
||||||
|
|
||||||
|
void onHomingStart() { Dgus.HomingStart(); }
|
||||||
|
void onHomingDone() { Dgus.HomingComplete(); }
|
||||||
|
|
||||||
|
void onFactoryReset() {
|
||||||
|
Dgus.page_index_now = 121;
|
||||||
|
Dgus.lcd_info.audio_on = DISABLED(SPEAKER);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onStoreSettings(char *buff) {
|
||||||
|
// Called when saving to EEPROM (i.e. M500). If the ExtUI needs
|
||||||
|
// permanent data to be stored, it can write up to eeprom_data_size bytes
|
||||||
|
// into buff.
|
||||||
|
|
||||||
|
static_assert(sizeof(Dgus.lcd_info) <= ExtUI::eeprom_data_size);
|
||||||
|
memcpy(buff, &Dgus.lcd_info, sizeof(Dgus.lcd_info));
|
||||||
|
}
|
||||||
|
|
||||||
|
void onLoadSettings(const char *buff) {
|
||||||
|
// Called while loading settings from EEPROM. If the ExtUI
|
||||||
|
// needs to retrieve data, it should copy up to eeprom_data_size bytes
|
||||||
|
// from buff
|
||||||
|
|
||||||
|
static_assert(sizeof(Dgus.lcd_info) <= ExtUI::eeprom_data_size);
|
||||||
|
memcpy(&Dgus.lcd_info, buff, sizeof(Dgus.lcd_info));
|
||||||
|
memcpy(&Dgus.lcd_info_back, buff, sizeof(Dgus.lcd_info_back));
|
||||||
|
}
|
||||||
|
|
||||||
|
void onPostprocessSettings() {
|
||||||
|
// Called after loading or resetting stored settings
|
||||||
|
Dgus.ParamInit();
|
||||||
|
Dgus.PowerLoss();
|
||||||
|
}
|
||||||
|
|
||||||
|
void onSettingsStored(const bool success) {
|
||||||
|
// Called after the entire EEPROM has been written,
|
||||||
|
// whether successful or not.
|
||||||
|
}
|
||||||
|
|
||||||
|
void onSettingsLoaded(const bool success) {
|
||||||
|
// Called after the entire EEPROM has been read,
|
||||||
|
// whether successful or not.
|
||||||
|
}
|
||||||
|
|
||||||
|
#if HAS_MESH
|
||||||
|
void onLevelingStart() {}
|
||||||
|
void onLevelingDone() {}
|
||||||
|
|
||||||
|
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
|
||||||
|
// Called when any mesh points are updated
|
||||||
|
//SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {
|
||||||
|
// Called to indicate a special condition
|
||||||
|
//SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
|
// Called when power-loss is enabled/disabled
|
||||||
|
void onSetPowerLoss(const bool) { Dgus.PowerLoss(); }
|
||||||
|
// Called when power-loss state is detected
|
||||||
|
void onPowerLoss() { /* handled internally */ }
|
||||||
|
// Called on resume from power-loss
|
||||||
|
void onPowerLossResume() { Dgus.PowerLossRecovery(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_PID_HEATING
|
||||||
|
void onPidTuning(const result_t rst) {
|
||||||
|
// Called for temperature PID tuning result
|
||||||
|
switch (rst) {
|
||||||
|
case PID_STARTED: break;
|
||||||
|
case PID_BAD_HEATER_ID: break;
|
||||||
|
case PID_TEMP_TOO_HIGH: break;
|
||||||
|
case PID_TUNING_TIMEOUT: break;
|
||||||
|
case PID_DONE: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void onSteppersDisabled() {}
|
||||||
|
void onSteppersEnabled() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ANYCUBIC_LCD_VYPER
|
@@ -1580,7 +1580,7 @@ namespace ExtUI {
|
|||||||
else if (recdat.data[0] == 4) { // Page Up
|
else if (recdat.data[0] == 4) { // Page Up
|
||||||
injectCommands(F("M22\nM21"));
|
injectCommands(F("M22\nM21"));
|
||||||
}
|
}
|
||||||
else if (recdat.data[0] == 0) { // return to main page
|
else if (recdat.data[0] == 0) { // return to main page
|
||||||
InforShowStatus = true;
|
InforShowStatus = true;
|
||||||
TPShowStatus = false;
|
TPShowStatus = false;
|
||||||
}
|
}
|
||||||
|
@@ -112,9 +112,9 @@
|
|||||||
|
|
||||||
namespace ExtUI {
|
namespace ExtUI {
|
||||||
static struct {
|
static struct {
|
||||||
uint8_t printer_killed : 1;
|
bool printer_killed : 1;
|
||||||
#if ENABLED(JOYSTICK)
|
#if ENABLED(JOYSTICK)
|
||||||
uint8_t jogging : 1;
|
bool jogging : 1;
|
||||||
#endif
|
#endif
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
@@ -926,7 +926,7 @@ namespace ExtUI {
|
|||||||
void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) {
|
void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) {
|
||||||
if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||||
bedlevel.z_values[pos.x][pos.y] = zoff;
|
bedlevel.z_values[pos.x][pos.y] = zoff;
|
||||||
TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate());
|
TERN_(ABL_BILINEAR_SUBDIVISION, bedlevel.refresh_bed_level());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1127,6 +1127,13 @@ namespace ExtUI {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onSurviveInKilled() {
|
||||||
|
thermalManager.disable_all_heaters();
|
||||||
|
flags.printer_killed = 0;
|
||||||
|
marlin_state = MF_RUNNING;
|
||||||
|
//SERIAL_ECHOLNPGM("survived at: ", millis());
|
||||||
|
}
|
||||||
|
|
||||||
FileList::FileList() { refresh(); }
|
FileList::FileList() { refresh(); }
|
||||||
|
|
||||||
void FileList::refresh() { num_files = 0xFFFF; }
|
void FileList::refresh() { num_files = 0xFFFF; }
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "../marlinui.h"
|
#include "../marlinui.h"
|
||||||
#include "../../gcode/gcode.h"
|
#include "../../gcode/gcode.h"
|
||||||
|
|
||||||
#if M600_PURGE_MORE_RESUMABLE
|
#if M600_PURGE_MORE_RESUMABLE
|
||||||
#include "../../feature/pause.h"
|
#include "../../feature/pause.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -406,6 +407,7 @@ namespace ExtUI {
|
|||||||
void onMediaRemoved();
|
void onMediaRemoved();
|
||||||
void onPlayTone(const uint16_t frequency, const uint16_t duration);
|
void onPlayTone(const uint16_t frequency, const uint16_t duration);
|
||||||
void onPrinterKilled(FSTR_P const error, FSTR_P const component);
|
void onPrinterKilled(FSTR_P const error, FSTR_P const component);
|
||||||
|
void onSurviveInKilled();
|
||||||
void onPrintTimerStarted();
|
void onPrintTimerStarted();
|
||||||
void onPrintTimerPaused();
|
void onPrintTimerPaused();
|
||||||
void onPrintTimerStopped();
|
void onPrintTimerStopped();
|
||||||
|
@@ -446,7 +446,7 @@ void MarlinUI::draw_status_screen() {
|
|||||||
#else
|
#else
|
||||||
256, 130
|
256, 130
|
||||||
#endif
|
#endif
|
||||||
, menu_main, imgSettings
|
, menu_main, imgSettings
|
||||||
);
|
);
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
const bool cm = card.isMounted(), pa = printingIsActive();
|
const bool cm = card.isMounted(), pa = printingIsActive();
|
||||||
|
@@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#include "circularqueue.h"
|
#include "circularqueue.h"
|
||||||
|
|
||||||
#define TONE_QUEUE_LENGTH 4
|
#ifndef TONE_QUEUE_LENGTH
|
||||||
|
#define TONE_QUEUE_LENGTH 4
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Tone structure
|
* @brief Tone structure
|
||||||
|
@@ -423,3 +423,34 @@ const char* ftostr52sp(const_float_t f) {
|
|||||||
}
|
}
|
||||||
return &conv[1];
|
return &conv[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert unsigned 16bit int to string 1, 12, 123 format, capped at 999
|
||||||
|
const char* utostr3(const uint16_t x) {
|
||||||
|
return i16tostr3left(_MIN(x, 999U));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert signed float to space-padded string with 1.23, 12.34, 123.45 format
|
||||||
|
const char* ftostr52sprj(const_float_t f) {
|
||||||
|
long i = INTFLOAT(f, 2);
|
||||||
|
LIMIT(i, -99999, 99999); // cap to -999.99 - 999.99 range
|
||||||
|
if (WITHIN(i, -999, 999)) { // -9.99 - 9.99 range
|
||||||
|
conv[1] = conv[2] = ' '; // default to ' ' for smaller numbers
|
||||||
|
conv[3] = MINUSOR(i, ' ');
|
||||||
|
}
|
||||||
|
else if (WITHIN(i, -9999, 9999)) { // -99.99 - 99.99 range
|
||||||
|
conv[1] = ' ';
|
||||||
|
conv[2] = MINUSOR(i, ' ');
|
||||||
|
conv[3] = DIGIMOD(i, 1000);
|
||||||
|
}
|
||||||
|
else { // -999.99 - 999.99 range
|
||||||
|
conv[1] = MINUSOR(i, ' ');
|
||||||
|
conv[2] = DIGIMOD(i, 10000);
|
||||||
|
conv[3] = DIGIMOD(i, 1000);
|
||||||
|
}
|
||||||
|
conv[4] = DIGIMOD(i, 100); // always convert last 3 digits
|
||||||
|
conv[5] = '.';
|
||||||
|
conv[6] = DIGIMOD(i, 10);
|
||||||
|
conv[7] = DIGIMOD(i, 1);
|
||||||
|
|
||||||
|
return &conv[1];
|
||||||
|
}
|
||||||
|
@@ -129,3 +129,9 @@ FORCE_INLINE const char* ftostr3(const_float_t x) { return i16tostr3rj(int16_t(x
|
|||||||
// Convert float to rj string with 1234, _123, -123, __12, _-12, ___1, or __-1 format
|
// Convert float to rj string with 1234, _123, -123, __12, _-12, ___1, or __-1 format
|
||||||
FORCE_INLINE const char* ftostr4sign(const_float_t x) { return i16tostr4signrj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); }
|
FORCE_INLINE const char* ftostr4sign(const_float_t x) { return i16tostr4signrj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Convert unsigned int to string 1, 12, 123 format, capped at 999
|
||||||
|
const char* utostr3(const uint16_t x);
|
||||||
|
|
||||||
|
// Convert signed float to space-padded string with 1.23, 12.34, 123.45 format
|
||||||
|
const char* ftostr52sprj(const_float_t f);
|
||||||
|
32
Marlin/src/pins/gd32f1/env_validate.h
Normal file
32
Marlin/src/pins/gd32f1/env_validate.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if NOT_TARGET(__STM32F1__, STM32F1)
|
||||||
|
#if DISABLED(ALLOW_STM32F4)
|
||||||
|
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
|
||||||
|
#elif NOT_TARGET(STM32F4)
|
||||||
|
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef ALLOW_STM32F4
|
152
Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h
Normal file
152
Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "env_validate.h"
|
||||||
|
|
||||||
|
#define BOARD_INFO_NAME "TRIGORILLA_V006"
|
||||||
|
#define DEFAULT_MACHINE_NAME "GD32F103"
|
||||||
|
|
||||||
|
#define BOARD_NO_NATIVE_USB
|
||||||
|
|
||||||
|
// Release PA13 from SWD for CASE_LIGHT_PIN
|
||||||
|
#define DISABLE_DEBUG
|
||||||
|
#define DISABLE_JTAG
|
||||||
|
|
||||||
|
//
|
||||||
|
// EEPROM
|
||||||
|
//
|
||||||
|
#define FLASH_EEPROM_EMULATION
|
||||||
|
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||||
|
|
||||||
|
//
|
||||||
|
// Limit Switches
|
||||||
|
//
|
||||||
|
#define X_MIN_PIN PA7
|
||||||
|
#define X_MAX_PIN PC6
|
||||||
|
#define Y_MIN_PIN PC5
|
||||||
|
#define Y_MAX_PIN -1
|
||||||
|
#define Z_MIN_PIN PB2
|
||||||
|
#define Z_MAX_PIN -1
|
||||||
|
|
||||||
|
//
|
||||||
|
// Steppers
|
||||||
|
//
|
||||||
|
#define X_ENABLE_PIN PC3
|
||||||
|
#define X_STEP_PIN PC2
|
||||||
|
#define X_DIR_PIN PB9
|
||||||
|
|
||||||
|
#define Y_ENABLE_PIN PC13
|
||||||
|
#define Y_STEP_PIN PB8
|
||||||
|
#define Y_DIR_PIN PB7
|
||||||
|
|
||||||
|
#define Z_ENABLE_PIN PC14
|
||||||
|
#define Z_STEP_PIN PB6
|
||||||
|
#define Z_DIR_PIN PB5
|
||||||
|
|
||||||
|
#define E0_ENABLE_PIN PA15
|
||||||
|
#define E0_STEP_PIN PB4
|
||||||
|
#define E0_DIR_PIN PB3
|
||||||
|
|
||||||
|
#define E1_ENABLE_PIN PC15
|
||||||
|
#define E1_STEP_PIN PC0
|
||||||
|
#define E1_DIR_PIN PC1
|
||||||
|
|
||||||
|
//
|
||||||
|
// Temperature Sensors
|
||||||
|
//
|
||||||
|
#define TEMP_0_PIN PC4 // T0
|
||||||
|
#define TEMP_1_PIN -1 // T1 PA6 used for power loss
|
||||||
|
#define TEMP_BED_PIN PB0 // TB
|
||||||
|
|
||||||
|
//
|
||||||
|
// Heaters
|
||||||
|
//
|
||||||
|
#define HEATER_0_PIN PA1 // H0
|
||||||
|
#define HEATER_1_PIN PA8 // H1
|
||||||
|
#define HEATER_BED_PIN PA4 // HB
|
||||||
|
|
||||||
|
//
|
||||||
|
// Fans
|
||||||
|
//
|
||||||
|
#define FAN_PIN PA0 // FAN
|
||||||
|
#define FAN1_PIN PA14 // Connected to +24V
|
||||||
|
#define FAN2_PIN -1 // PB1, auto fan for E0
|
||||||
|
#define CONTROLLER_FAN_PIN FAN1_PIN
|
||||||
|
|
||||||
|
//
|
||||||
|
// Misc
|
||||||
|
//
|
||||||
|
#define BEEPER_PIN PB15
|
||||||
|
#define LED_PIN -1
|
||||||
|
#define POWER_LOSS_PIN PA6
|
||||||
|
#define FIL_RUNOUT_PIN PA5
|
||||||
|
#define CASE_LIGHT_PIN PA13
|
||||||
|
#define POWER_MONITOR_VOLTAGE_PIN PA6
|
||||||
|
|
||||||
|
#define AUTO_LEVEL_TX_PIN PB13
|
||||||
|
#define AUTO_LEVEL_RX_PIN PB12
|
||||||
|
|
||||||
|
#ifndef Z_MIN_PROBE_PIN
|
||||||
|
#define Z_MIN_PROBE_PIN AUTO_LEVEL_RX_PIN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// SD Card
|
||||||
|
//
|
||||||
|
#define SD_DETECT_PIN PC7
|
||||||
|
|
||||||
|
#ifndef SDIO_SUPPORT
|
||||||
|
#define SDIO_SUPPORT
|
||||||
|
#endif
|
||||||
|
#if ENABLED(SDIO_SUPPORT)
|
||||||
|
//
|
||||||
|
// SPI
|
||||||
|
//
|
||||||
|
#define SPI_DEVICE -1
|
||||||
|
#define SCK_PIN -1
|
||||||
|
#define MISO_PIN -1
|
||||||
|
#define MOSI_PIN -1
|
||||||
|
#define SS_PIN -1
|
||||||
|
|
||||||
|
//
|
||||||
|
// SDIO
|
||||||
|
//
|
||||||
|
#define SDIO_READ_RETRIES 16
|
||||||
|
#define SDIO_D0_PIN PC8
|
||||||
|
#define SDIO_D1_PIN PC9
|
||||||
|
#define SDIO_D2_PIN PC10
|
||||||
|
#define SDIO_D3_PIN PC11
|
||||||
|
#define SDIO_CK_PIN PC12
|
||||||
|
#define SDIO_CMD_PIN PD2
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#undef SDSS
|
||||||
|
#define SDSS PC11 // SDIO_D3_PIN
|
||||||
|
#define SS_PIN SDSS
|
||||||
|
#define SCK_PIN PC12 // SDIO_CK_PIN
|
||||||
|
#define MISO_PIN PC8 // SDIO_D0_PIN
|
||||||
|
#define MOSI_PIN PD2 // SDIO_CMD_PIN
|
||||||
|
#define SOFTWARE_SPI
|
||||||
|
|
||||||
|
#endif
|
@@ -629,6 +629,8 @@
|
|||||||
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
|
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
|
||||||
#elif MB(SOVOL_V131)
|
#elif MB(SOVOL_V131)
|
||||||
#include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple
|
#include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple
|
||||||
|
#elif MB(TRIGORILLA_V006)
|
||||||
|
#include "gd32f1/pins_TRIGORILLA_V006.h" // GD32F103 env:trigorilla_v006
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARM Cortex-M4F
|
// ARM Cortex-M4F
|
||||||
|
@@ -420,6 +420,40 @@ void CardReader::ls(const uint8_t lsflags) {
|
|||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CardReader::getLongPath(char * const pathLong, char * const pathShort) {
|
||||||
|
|
||||||
|
int i, pathLen = strlen(pathShort);
|
||||||
|
char bufShort[FILENAME_LENGTH] = { '\0' };
|
||||||
|
strcpy_P(bufShort, pathShort);
|
||||||
|
|
||||||
|
// Zero out slashes to make segments
|
||||||
|
for (i = 0; i < pathLen; i++) if (bufShort[i] == '/') bufShort[i] = '\0';
|
||||||
|
|
||||||
|
SdFile diveDir = root; // start from the root for segment 1
|
||||||
|
for (i = 0; i < pathLen;) {
|
||||||
|
|
||||||
|
if (bufShort[i] == '\0') i++; // move past a single nul
|
||||||
|
|
||||||
|
char *segment = &bufShort[i]; // The segment after most slashes
|
||||||
|
|
||||||
|
// If a segment is empty (extra-slash) then exit
|
||||||
|
if (!*segment) break;
|
||||||
|
|
||||||
|
//SERIAL_ECHOLNPGM("Looking for segment: ", segment);
|
||||||
|
|
||||||
|
// Find the item, setting the long filename
|
||||||
|
diveDir.rewind();
|
||||||
|
selectByName(diveDir, segment);
|
||||||
|
diveDir.close();
|
||||||
|
|
||||||
|
if (longFilename[0]) {
|
||||||
|
strncpy_P(pathLong, longFilename, 63);
|
||||||
|
pathLong[63] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // LONG_FILENAME_HOST_SUPPORT
|
#endif // LONG_FILENAME_HOST_SUPPORT
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@@ -146,6 +146,7 @@ public:
|
|||||||
static char* longest_filename() { return longFilename[0] ? longFilename : filename; }
|
static char* longest_filename() { return longFilename[0] ? longFilename : filename; }
|
||||||
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
|
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
|
||||||
static void printLongPath(char * const path); // Used by M33
|
static void printLongPath(char * const path); // Used by M33
|
||||||
|
static void getLongPath(char * const pathLong, char * const pathShort); // Used by anycubic_vyper
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Working Directory for SD card menu
|
// Working Directory for SD card menu
|
||||||
|
@@ -81,6 +81,7 @@ HAS_MENU_TOUCH_SCREEN = src_filter=+<src/lcd/menu/menu_touch_sc
|
|||||||
HAS_MENU_TRAMMING_WIZARD = src_filter=+<src/lcd/menu/menu_tramming_wizard.cpp>
|
HAS_MENU_TRAMMING_WIZARD = src_filter=+<src/lcd/menu/menu_tramming_wizard.cpp>
|
||||||
HAS_MENU_UBL = src_filter=+<src/lcd/menu/menu_ubl.cpp>
|
HAS_MENU_UBL = src_filter=+<src/lcd/menu/menu_ubl.cpp>
|
||||||
ANYCUBIC_LCD_CHIRON = src_filter=+<src/lcd/extui/anycubic_chiron>
|
ANYCUBIC_LCD_CHIRON = src_filter=+<src/lcd/extui/anycubic_chiron>
|
||||||
|
ANYCUBIC_LCD_VYPER = src_filter=+<src/lcd/extui/anycubic_vyper>
|
||||||
ANYCUBIC_LCD_I3MEGA = src_filter=+<src/lcd/extui/anycubic_i3mega>
|
ANYCUBIC_LCD_I3MEGA = src_filter=+<src/lcd/extui/anycubic_i3mega>
|
||||||
HAS_DGUS_LCD_CLASSIC = src_filter=+<src/lcd/extui/dgus>
|
HAS_DGUS_LCD_CLASSIC = src_filter=+<src/lcd/extui/dgus>
|
||||||
DGUS_LCD_UI_RELOADED = src_filter=+<src/lcd/extui/dgus_reloaded>
|
DGUS_LCD_UI_RELOADED = src_filter=+<src/lcd/extui/dgus_reloaded>
|
||||||
|
@@ -134,6 +134,16 @@ monitor_speed = 115200
|
|||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
upload_protocol = jlink
|
upload_protocol = jlink
|
||||||
|
|
||||||
|
#
|
||||||
|
# Trigorilla V0.0.6 (GD32F103)
|
||||||
|
# modified version of env:STM32F103RE_creality
|
||||||
|
#
|
||||||
|
[env:trigorilla_v006]
|
||||||
|
extends = STM32F103Rx_creality
|
||||||
|
board = genericSTM32F103RE
|
||||||
|
board_build.offset = 0x8000
|
||||||
|
board_upload.offset_address = 0x08008000
|
||||||
|
|
||||||
#
|
#
|
||||||
# Creality (STM32F103Rx)
|
# Creality (STM32F103Rx)
|
||||||
# With custom upload to SD via Marlin with binary protocol.
|
# With custom upload to SD via Marlin with binary protocol.
|
||||||
|
@@ -81,6 +81,7 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/t
|
|||||||
-<src/lcd/menu/menu_ubl.cpp>
|
-<src/lcd/menu/menu_ubl.cpp>
|
||||||
-<src/lcd/menu/menu_x_twist.cpp>
|
-<src/lcd/menu/menu_x_twist.cpp>
|
||||||
-<src/lcd/extui/anycubic_chiron>
|
-<src/lcd/extui/anycubic_chiron>
|
||||||
|
-<src/lcd/extui/anycubic_vyper>
|
||||||
-<src/lcd/extui/anycubic_i3mega>
|
-<src/lcd/extui/anycubic_i3mega>
|
||||||
-<src/lcd/extui/dgus> -<src/lcd/extui/dgus/fysetc> -<src/lcd/extui/dgus/hiprecy> -<src/lcd/extui/dgus/mks> -<src/lcd/extui/dgus/origin>
|
-<src/lcd/extui/dgus> -<src/lcd/extui/dgus/fysetc> -<src/lcd/extui/dgus/hiprecy> -<src/lcd/extui/dgus/mks> -<src/lcd/extui/dgus/origin>
|
||||||
-<src/lcd/extui/dgus_reloaded>
|
-<src/lcd/extui/dgus_reloaded>
|
||||||
|
Reference in New Issue
Block a user