mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-08 23:46:20 -06:00
Misc. aesthetic adjustments
Co-Authored-By: Andrew <18502096+classicrocker883@users.noreply.github.com>
This commit is contained in:
parent
416f94f03a
commit
dd3b5a10a0
33 changed files with 11604 additions and 11620 deletions
|
@ -27,7 +27,7 @@
|
|||
|
||||
/**
|
||||
* Not every MarlinSerial instance should handle emergency parsing, as
|
||||
* it would not make sense to parse GCode from TMC responses
|
||||
* it would not make sense to parse G-Code from TMC responses
|
||||
*/
|
||||
constexpr bool serial_handles_emergency(int port) {
|
||||
return false
|
||||
|
|
|
@ -66,9 +66,6 @@ void GcodeSuite::M48() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (verbose_level > 0)
|
||||
SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test");
|
||||
|
||||
const int8_t n_samples = parser.byteval('P', 10);
|
||||
if (!WITHIN(n_samples, 4, 50)) {
|
||||
SERIAL_ECHOLNPGM("?Sample size not plausible (4-50).");
|
||||
|
@ -102,6 +99,9 @@ void GcodeSuite::M48() {
|
|||
const bool schizoid_flag = parser.boolval('S');
|
||||
if (schizoid_flag && !seen_L) n_legs = 7;
|
||||
|
||||
if (verbose_level > 0)
|
||||
SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test");
|
||||
|
||||
if (verbose_level > 2)
|
||||
SERIAL_ECHOLNPGM("Positioning the probe...");
|
||||
|
||||
|
@ -261,8 +261,7 @@ void GcodeSuite::M48() {
|
|||
|
||||
#if HAS_STATUS_MESSAGE
|
||||
// Display M48 results in the status bar
|
||||
char sigma_str[8];
|
||||
ui.status_printf(0, F(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str));
|
||||
ui.set_status_and_level(MString<30>(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6)));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -29,19 +29,17 @@
|
|||
#if ENABLED(M114_DETAIL)
|
||||
|
||||
void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=LOGICAL_AXES, const uint8_t precision=3) {
|
||||
char str[12];
|
||||
for (uint8_t a = 0; a < n; ++a) {
|
||||
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]));
|
||||
if (pos[a] >= 0) SERIAL_CHAR(' ');
|
||||
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
||||
SERIAL_ECHO(p_float_t(pos[a], precision));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, XYZ); }
|
||||
|
||||
void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) {
|
||||
char str[12];
|
||||
LOOP_NUM_AXES(a) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]), dtostrf(pos[a], 1, precision, str));
|
||||
LOOP_NUM_AXES(a) SERIAL_ECHO(FPSTR(pgm_read_ptr(&SP_AXIS_LBL[a])), p_float_t(pos[a], precision));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
|
|
|
@ -793,11 +793,11 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
static lcd_uint_t pc = 0, pr = 2;
|
||||
inline void setPercentPos(const lcd_uint_t c, const lcd_uint_t r) { pc = c; pr = r; }
|
||||
void MarlinUI::drawPercent() {
|
||||
const uint8_t progress = ui.get_progress_percent();
|
||||
const uint8_t progress = get_progress_percent();
|
||||
if (progress) {
|
||||
lcd_moveto(pc, pr);
|
||||
lcd_put_u8str(F(TERN(IS_SD_PRINTING, "SD", "P:")));
|
||||
lcd_put_u8str(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(ui.get_progress_permyriad()), ui8tostr3rj(progress)));
|
||||
lcd_put_u8str(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(get_progress_permyriad()), ui8tostr3rj(progress)));
|
||||
lcd_put_u8str(F("%"));
|
||||
}
|
||||
}
|
||||
|
@ -806,9 +806,9 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
void MarlinUI::drawRemain() {
|
||||
if (printJobOngoing()) {
|
||||
const duration_t remaint = ui.get_remaining_time();
|
||||
const duration_t remaint = get_remaining_time();
|
||||
timepos = TPOFFSET - remaint.toDigital(buffer);
|
||||
TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);)
|
||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'R');
|
||||
lcd_put_u8str(buffer);
|
||||
}
|
||||
|
@ -817,10 +817,10 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
|
||||
#if ENABLED(SHOW_INTERACTION_TIME)
|
||||
void MarlinUI::drawInter() {
|
||||
const duration_t interactt = ui.interaction_time;
|
||||
const duration_t interactt = interaction_time;
|
||||
if (printingIsActive() && interactt.value) {
|
||||
timepos = TPOFFSET - interactt.toDigital(buffer);
|
||||
TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);)
|
||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'C');
|
||||
lcd_put_u8str(buffer);
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
if (printJobOngoing()) {
|
||||
const duration_t elapsedt = print_job_timer.duration();
|
||||
timepos = TPOFFSET - elapsedt.toDigital(buffer);
|
||||
TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);)
|
||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'E');
|
||||
lcd_put_u8str(buffer);
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ void dwinFrameAreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
|
|||
// *string: The string
|
||||
// rlimit: To limit the drawn string length
|
||||
void dwinDrawString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) {
|
||||
#if NONE(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, IS_DWIN_MARLINUI)
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
dwinDrawRectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size));
|
||||
#endif
|
||||
constexpr uint8_t widthAdjust = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
// Extended and default UI Colors
|
||||
#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R,B: 0..31; G: 0..63
|
||||
#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R: 0..31, G: 0..63, B: 0..31
|
||||
#define GetRColor(color) ((color >> 11) & 0x1F)
|
||||
#define GetGColor(color) ((color >> 5) & 0x3F)
|
||||
#define GetBColor(color) ((color >> 0) & 0x1F)
|
||||
|
|
|
@ -1816,6 +1816,12 @@ void hmiSDCardInit() { card.cdroot(); }
|
|||
// Initialize or re-initialize the LCD
|
||||
void MarlinUI::init_lcd() { dwinStartup(); }
|
||||
|
||||
void MarlinUI::update() {
|
||||
eachMomentUpdate(); // Status update
|
||||
hmiSDCardUpdate(); // SD card update
|
||||
dwinHandleScreen(); // Rotary encoder update
|
||||
}
|
||||
|
||||
void MarlinUI::refresh() { /* Nothing to see here */ }
|
||||
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
|
@ -4080,14 +4086,6 @@ void dwinInitScreen() {
|
|||
hmiStartFrame(true);
|
||||
}
|
||||
|
||||
void dwinUpdate() {
|
||||
eachMomentUpdate(); // Status update
|
||||
hmiSDCardUpdate(); // SD card update
|
||||
dwinHandleScreen(); // Rotary encoder update
|
||||
}
|
||||
|
||||
void MarlinUI::update() { dwinUpdate(); }
|
||||
|
||||
void eachMomentUpdate() {
|
||||
static millis_t next_var_update_ms = 0, next_rts_update_ms = 0;
|
||||
|
||||
|
|
|
@ -244,7 +244,6 @@ void hmiStep(); // Transmission ratio
|
|||
|
||||
void hmiInit();
|
||||
void dwinInitScreen();
|
||||
void dwinUpdate();
|
||||
void eachMomentUpdate();
|
||||
void dwinHandleScreen();
|
||||
void dwinStatusChanged(const char * const cstr=nullptr);
|
||||
|
|
|
@ -154,7 +154,6 @@ enum colorID : uint8_t {
|
|||
};
|
||||
|
||||
#define Custom_Colors 10
|
||||
#define COLOR_AQUA RGB(0x00,0x3F,0x1F)
|
||||
#define COLOR_LIGHT_WHITE 0xBDD7
|
||||
#define COLOR_GREEN RGB(0x00, 0x3F, 0x00)
|
||||
#define COLOR_LIGHT_GREEN 0x3460
|
||||
|
|
|
@ -186,7 +186,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
|
||||
auto status_changed = []{
|
||||
static MString<>::hash_t old_hash = 0x0000;
|
||||
const MString<>::hash_t hash = ui.status_message.hash();
|
||||
const MString<>::hash_t hash = status_message.hash();
|
||||
const bool hash_changed = hash != old_hash;
|
||||
old_hash = hash;
|
||||
return hash_changed || !did_first_redraw;
|
||||
|
|
|
@ -156,7 +156,7 @@ void BedLevelTools::manualMove(const uint8_t mesh_x, const uint8_t mesh_y, bool
|
|||
}
|
||||
}
|
||||
|
||||
// Move / Probe methods. As examples, not yet used.
|
||||
// Move / Probe methods.
|
||||
void BedLevelTools::moveToXYZ() {
|
||||
goto_mesh_value = true;
|
||||
manualMove(mesh_x, mesh_y, false);
|
||||
|
|
|
@ -513,7 +513,7 @@ void dwinDrawStatusMessage() {
|
|||
// Get a pointer to the next valid UTF8 character
|
||||
// and the string remaining length
|
||||
uint8_t rlen;
|
||||
const char *stat = MarlinUI::status_and_len(rlen);
|
||||
const char *stat = ui.status_and_len(rlen);
|
||||
dwinDrawRectangle(1, hmiData.colorStatusBg, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20);
|
||||
DWINUI::moveTo(0, STATUS_Y + 2);
|
||||
DWINUI::drawString(hmiData.colorStatusTxt, stat, LCD_WIDTH);
|
||||
|
@ -528,7 +528,7 @@ void dwinDrawStatusMessage() {
|
|||
DWINUI::drawString(hmiData.colorStatusTxt, ui.status_message, chars); // Print a second copy of the message
|
||||
}
|
||||
}
|
||||
MarlinUI::advance_status_scroll();
|
||||
ui.advance_status_scroll();
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -748,7 +748,7 @@ void _drawFeedrate() {
|
|||
DWINUI::drawString(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 116 + 4 * STAT_CHR_W + 2, 384, F(" %"));
|
||||
}
|
||||
else {
|
||||
_value = CEIL(feedrate_mm_s * feedrate_percentage / 100);
|
||||
_value = CEIL(MMS_SCALED(feedrate_mm_s));
|
||||
dwinDrawBox(1, hmiData.colorBackground, 116 + 5 * STAT_CHR_W + 2, 384, 20, 20);
|
||||
}
|
||||
DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 116 + 2 * STAT_CHR_W, 384, _value);
|
||||
|
@ -1235,16 +1235,8 @@ void hmiWaitForUser() {
|
|||
}
|
||||
if (!wait_for_user) {
|
||||
switch (checkkey) {
|
||||
case ID_PrintDone:
|
||||
select_page.reset();
|
||||
gotoMainMenu();
|
||||
break;
|
||||
#if HAS_BED_PROBE
|
||||
case ID_Leveling:
|
||||
#endif
|
||||
default:
|
||||
hmiReturnScreen();
|
||||
break;
|
||||
case ID_PrintDone: select_page.reset(); gotoMainMenu(); break;
|
||||
default: hmiReturnScreen(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1330,7 +1322,7 @@ void eachMomentUpdate() {
|
|||
dwinPrintFinished();
|
||||
}
|
||||
|
||||
if ((printingIsPaused() != hmiFlag.pause_flag) && !hmiFlag.home_flag) {
|
||||
if ((hmiFlag.pause_flag != printingIsPaused()) && !hmiFlag.home_flag) {
|
||||
hmiFlag.pause_flag = printingIsPaused();
|
||||
if (hmiFlag.pause_flag)
|
||||
dwinPrintPause();
|
||||
|
@ -1436,7 +1428,6 @@ void dwinHandleScreen() {
|
|||
#if HAS_LOCKSCREEN
|
||||
case ID_Locked: hmiLockScreen(); break;
|
||||
#endif
|
||||
|
||||
TERN_(HAS_ESDIAG, case ID_ESDiagProcess:)
|
||||
TERN_(PROUI_ITEM_PLOT, case ID_PlotProcess:)
|
||||
case ID_PrintDone:
|
||||
|
@ -1629,11 +1620,11 @@ void dwinLevelingDone() {
|
|||
}
|
||||
|
||||
void drawHPlot() {
|
||||
TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START);)
|
||||
TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START);)
|
||||
TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START));
|
||||
TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START));
|
||||
}
|
||||
void drawBPlot() {
|
||||
TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START);)
|
||||
TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START));
|
||||
}
|
||||
|
||||
#endif // PROUI_ITEM_PLOT
|
||||
|
@ -1646,8 +1637,12 @@ void dwinLevelingDone() {
|
|||
if (seenC) hmiData.pidCycles = c;
|
||||
if (seenS) {
|
||||
switch (hid) {
|
||||
OPTCODE(PIDTEMP, case 0 ... HOTENDS - 1: hmiData.hotendPidT = temp; break)
|
||||
OPTCODE(PIDTEMPBED, case H_BED: hmiData.bedPidT = temp; break)
|
||||
#if ENABLED(PIDTEMP)
|
||||
case 0 ... HOTENDS - 1: hmiData.hotendPidT = temp; break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case H_BED: hmiData.bedPidT = temp; break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -1778,7 +1773,7 @@ void dwinPrintAborted() {
|
|||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
F("G27")
|
||||
#else
|
||||
TS(F("G0Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS)), F("\nG0F2000Y"), Y_MAX_POS);
|
||||
TS(F("G0Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS)), F("\nG0F2000Y"), Y_MAX_POS)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
@ -2392,7 +2387,8 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres
|
|||
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
|
||||
case 4:
|
||||
LCD_MESSAGE(MSG_TRAM_C);
|
||||
x = X_CENTER; y = Y_CENTER;
|
||||
x = X_CENTER;
|
||||
y = Y_CENTER;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
@ -2483,7 +2479,7 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres
|
|||
ui.reset_status();
|
||||
|
||||
#ifndef BED_TRAMMING_PROBE_TOLERANCE
|
||||
#define BED_TRAMMING_PROBE_TOLERANCE 0.05
|
||||
#define BED_TRAMMING_PROBE_TOLERANCE 0.05f
|
||||
#endif
|
||||
|
||||
if (ABS(meshViewer.max - meshViewer.min) < BED_TRAMMING_PROBE_TOLERANCE) {
|
||||
|
@ -2492,7 +2488,7 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres
|
|||
}
|
||||
else {
|
||||
uint8_t p = 0;
|
||||
float max = 0;
|
||||
float max = 0.0f;
|
||||
FSTR_P plabel;
|
||||
bool s = true;
|
||||
for (uint8_t x = 0; x < 2; ++x) for (uint8_t y = 0; y < 2; ++y) {
|
||||
|
|
|
@ -181,6 +181,8 @@ typedef struct {
|
|||
AxisEnum axis = X_AXIS; // Axis Select
|
||||
} hmi_value_t;
|
||||
|
||||
extern hmi_value_t hmiValue;
|
||||
|
||||
typedef struct {
|
||||
uint8_t language;
|
||||
bool printing_flag:1; // sd or host printing
|
||||
|
@ -190,7 +192,6 @@ typedef struct {
|
|||
bool home_flag:1; // homing in course
|
||||
} hmi_flag_t;
|
||||
|
||||
extern hmi_value_t hmiValue;
|
||||
extern hmi_flag_t hmiFlag;
|
||||
extern uint8_t checkkey;
|
||||
|
||||
|
|
|
@ -76,4 +76,3 @@ void dwinPopupConfirm(const uint8_t icon, T amsg1, U amsg2) {
|
|||
dwinDrawPopup(icon, amsg1, amsg2, BTN_Confirm); // Button Confirm
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
|
||||
|
|
|
@ -224,9 +224,9 @@ void DWINUI::drawButton(uint16_t color, uint16_t bcolor, uint16_t x1, uint16_t y
|
|||
|
||||
void DWINUI::drawButton(uint8_t id, uint16_t x, uint16_t y) {
|
||||
switch (id) {
|
||||
case BTN_Continue: drawButton(GET_TEXT_F(MSG_BUTTON_CONTINUE), x, y); break;
|
||||
case BTN_Cancel : drawButton(GET_TEXT_F(MSG_BUTTON_CANCEL), x, y); break;
|
||||
case BTN_Confirm : drawButton(GET_TEXT_F(MSG_BUTTON_CONFIRM), x, y); break;
|
||||
case BTN_Continue: drawButton(GET_TEXT_F(MSG_BUTTON_CONTINUE), x, y); break;
|
||||
case BTN_Print : drawButton(GET_TEXT_F(MSG_BUTTON_PRINT), x, y); break;
|
||||
case BTN_Save : drawButton(GET_TEXT_F(MSG_BUTTON_SAVE), x, y); break;
|
||||
case BTN_Purge : drawButton(GET_TEXT_F(MSG_BUTTON_PURGE), x, y); break;
|
||||
|
|
|
@ -154,7 +154,6 @@
|
|||
// Extended and default UI Colors
|
||||
#define COLOR_BLACK 0
|
||||
#define COLOR_GREEN RGB(0, 63, 0)
|
||||
#define COLOR_AQUA RGB(0,63,31)
|
||||
#define COLOR_BLUE RGB(0, 0, 31)
|
||||
#define COLOR_LIGHT_WHITE 0xBDD7
|
||||
#define COLOR_LIGHT_GREEN 0x3460
|
||||
|
|
|
@ -263,7 +263,7 @@ void setPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*apply)(
|
|||
|
||||
// Generic menu control using the encoder
|
||||
void hmiMenu() {
|
||||
EncoderState encoder_diffState = get_encoder_state();
|
||||
const EncoderState encoder_diffState = get_encoder_state();
|
||||
if (currentMenu) {
|
||||
if (encoder_diffState == ENCODER_DIFF_NO) return;
|
||||
if (encoder_diffState == ENCODER_DIFF_ENTER)
|
||||
|
@ -280,10 +280,8 @@ void hmiMenu() {
|
|||
// 1 : live change
|
||||
// 2 : apply change
|
||||
int8_t hmiGet(bool draw) {
|
||||
const int32_t lo = menuData.minValue;
|
||||
const int32_t hi = menuData.maxValue;
|
||||
const int32_t cval = menuData.value;
|
||||
EncoderState encoder_diffState = TERN(SMOOTH_ENCODER_MENUITEMS, get_encoder_state(), encoderReceiveAnalyze());
|
||||
const int32_t lo = menuData.minValue, hi = menuData.maxValue, cval = menuData.value;
|
||||
const EncoderState encoder_diffState = TERN(SMOOTH_ENCODER_MENUITEMS, get_encoder_state(), encoderReceiveAnalyze());
|
||||
if (encoder_diffState != ENCODER_DIFF_NO) {
|
||||
if (applyEncoder(encoder_diffState, menuData.value)) {
|
||||
encoderRate.enabled = false;
|
||||
|
@ -300,7 +298,7 @@ int8_t hmiGet(bool draw) {
|
|||
|
||||
// Set and draw a value using the encoder
|
||||
void hmiSetDraw() {
|
||||
int8_t val = hmiGet(true);
|
||||
const int8_t val = hmiGet(true);
|
||||
switch (val) {
|
||||
case 0: return;
|
||||
case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break;
|
||||
|
@ -310,7 +308,7 @@ void hmiSetDraw() {
|
|||
|
||||
// Set an value without drawing
|
||||
void hmiSetNoDraw() {
|
||||
int8_t val = hmiGet(false);
|
||||
const int8_t val = hmiGet(false);
|
||||
switch (val) {
|
||||
case 0: return;
|
||||
case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break;
|
||||
|
@ -320,7 +318,7 @@ void hmiSetNoDraw() {
|
|||
|
||||
// Set an integer pointer variable using the encoder
|
||||
void hmiSetPInt() {
|
||||
int8_t val = hmiGet(true);
|
||||
const int8_t val = hmiGet(true);
|
||||
switch (val) {
|
||||
case 0: return;
|
||||
case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break;
|
||||
|
|
|
@ -897,7 +897,7 @@ void AnycubicTFT::doFilamentRunoutCheck() {
|
|||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
// NOTE: getFilamentRunoutState() only returns the runout state if the job is printing
|
||||
// we want to actually check the status of the pin here, regardless of printstate
|
||||
if (READ(FIL_RUNOUT1_PIN)) {
|
||||
if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) {
|
||||
if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) {
|
||||
// play tone to indicate filament is out
|
||||
injectCommands(F("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567"));
|
||||
|
@ -940,7 +940,7 @@ void AnycubicTFT::pausePrint() {
|
|||
void AnycubicTFT::resumePrint() {
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
if (READ(FIL_RUNOUT1_PIN)) {
|
||||
if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) {
|
||||
DEBUG_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... ");
|
||||
|
||||
// trigger the user message box
|
||||
|
|
|
@ -465,7 +465,7 @@ public:
|
|||
* @param fstr A constant F-string to set as the status.
|
||||
* @param level Alert level. Negative to ignore and reset the level. Non-zero never expires.
|
||||
*/
|
||||
static void set_status_and_level(const char * const cstr, const int8_t level) { _set_status_and_level(cstr, level, false); }
|
||||
static void set_status_and_level(const char * const cstr, const int8_t level=0) { _set_status_and_level(cstr, level, false); }
|
||||
|
||||
/**
|
||||
* @brief Set Status with a P-string and alert level.
|
||||
|
@ -473,7 +473,7 @@ public:
|
|||
* @param ustr A C- or P-string, according to pgm.
|
||||
* @param level Alert level. Negative to ignore and reset the level. Non-zero never expires.
|
||||
*/
|
||||
static void set_status_and_level_P(PGM_P const pstr, const int8_t level) { _set_status_and_level(pstr, level, true); }
|
||||
static void set_status_and_level_P(PGM_P const pstr, const int8_t level=0) { _set_status_and_level(pstr, level, true); }
|
||||
|
||||
/**
|
||||
* @brief Set Status with a fixed string and alert level.
|
||||
|
@ -481,7 +481,7 @@ public:
|
|||
* @param fstr A constant F-string to set as the status.
|
||||
* @param level Alert level. Negative to ignore and reset the level. Non-zero never expires.
|
||||
*/
|
||||
static void set_status_and_level(FSTR_P const fstr, const int8_t level) { set_status_and_level_P(FTOP(fstr), level); }
|
||||
static void set_status_and_level(FSTR_P const fstr, const int8_t level=0) { set_status_and_level_P(FTOP(fstr), level); }
|
||||
|
||||
static void set_max_status(FSTR_P const fstr) { set_status_and_level(fstr, 127); }
|
||||
static void set_min_status(FSTR_P const fstr) { set_status_and_level(fstr, -1); }
|
||||
|
|
|
@ -53,8 +53,8 @@ typedef struct {
|
|||
uint8_t bugs[INVADER_ROWS], shooters[(INVADER_ROWS) * (INVADER_COLS)];
|
||||
int8_t ufox, ufov;
|
||||
bool game_blink;
|
||||
int8_t laser_col() { return ((laser.x - pos.x) / (INVADER_COL_W)); };
|
||||
int8_t laser_row() { return ((laser.y - pos.y + 2) / (INVADER_ROW_H)); };
|
||||
int8_t laser_col() { return ((laser.x - pos.x) / (INVADER_COL_W)); }
|
||||
int8_t laser_row() { return ((laser.y - pos.y + 2) / (INVADER_ROW_H)); }
|
||||
} invaders_data_t;
|
||||
|
||||
class InvadersGame : MarlinGame { public: static void enter_game(), game_screen(); };
|
||||
|
|
|
@ -146,6 +146,7 @@ typedef union {
|
|||
uint32_t uint32;
|
||||
celsius_t celsius;
|
||||
} chimera_t;
|
||||
|
||||
extern chimera_t editable;
|
||||
|
||||
// Base class for Menu Edit Items
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
#include "../feature/bedlevel/bdl/bdl.h"
|
||||
#endif
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#include "../lcd/e3v2/proui/dwin_popup.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
|
@ -356,17 +356,17 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
|||
// Start preheating before waiting for user confirmation that the probe is ready.
|
||||
TERN_(PREHEAT_BEFORE_PROBING, if (deploy) probe.preheat_for_probing(0, PROBING_BED_TEMP, true));
|
||||
|
||||
FSTR_P const ds_str = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW);
|
||||
FSTR_P const ds_fstr = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW);
|
||||
ui.return_to_status(); // To display the new status message
|
||||
ui.set_max_status(ds_str);
|
||||
ui.set_max_status(ds_fstr);
|
||||
SERIAL_ECHOLN(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW));
|
||||
|
||||
OKAY_BUZZ();
|
||||
|
||||
#if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
|
||||
{
|
||||
// Wait for the probe to be attached or detached before asking for explicit user confirmation
|
||||
// Allow the user to interrupt
|
||||
{
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user = true);
|
||||
while (deploy == PROBE_TRIGGERED() && TERN1(HAS_RESUME_CONTINUE, wait_for_user)) idle_no_sleep();
|
||||
|
@ -375,9 +375,9 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
|||
}
|
||||
#endif
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_str));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str));
|
||||
TERN_(DWIN_LCD_PROUI, dwinPopupConfirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR)));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_fstr));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_fstr));
|
||||
TERN_(DWIN_LCD_PROUI, dwinPopupConfirm(ICON_BLTouch, ds_fstr, FPSTR(CONTINUE_STR)));
|
||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
|
||||
|
||||
ui.reset_status();
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#define DEFAULT_MACHINE_NAME "Aquila"
|
||||
#endif
|
||||
|
||||
#define INLINE_USART_IRQ
|
||||
|
||||
#define NO_MAPLE_WARNING // Disable warning when compiling with Maple env
|
||||
|
||||
#include "../stm32f1/pins_CREALITY_V4.h"
|
||||
|
|
|
@ -11,17 +11,17 @@ set -e
|
|||
#
|
||||
use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
|
||||
opt_enable MARLIN_DEV_MODE BUFFER_MONITORING BLTOUCH AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING
|
||||
exec_test $1 $2 "Ender-3 v2 - CrealityUI" "$3"
|
||||
exec_test $1 $2 "Ender-3 V2 - CrealityUI" "$3"
|
||||
|
||||
use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
|
||||
opt_disable DWIN_CREALITY_LCD
|
||||
opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
|
||||
exec_test $1 $2 "Ender-3 v2 - JyersUI (ABL Bilinear/Manual)" "$3"
|
||||
exec_test $1 $2 "Ender-3 V2 - JyersUI (ABL Bilinear/Manual)" "$3"
|
||||
|
||||
use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
|
||||
opt_disable DWIN_CREALITY_LCD PIDTEMP
|
||||
opt_enable DWIN_MARLINUI_LANDSCAPE LCD_ENDSTOP_TEST AUTO_BED_LEVELING_UBL BLTOUCH Z_SAFE_HOMING MPCTEMP MPC_AUTOTUNE
|
||||
exec_test $1 $2 "Ender-3 v2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" "$3"
|
||||
exec_test $1 $2 "Ender-3 V2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" "$3"
|
||||
|
||||
use_example_configs "Creality/Ender-3 S1/STM32F1"
|
||||
opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT EVENT_GCODE_SD_ABORT
|
||||
|
|
|
@ -384,7 +384,7 @@
|
|||
</td>
|
||||
<td width="33%">
|
||||
<div class="card ml-1">
|
||||
<div class="card-header py-0 px-1 bg-info text-light card-header-description">GCode Lines</div>
|
||||
<div class="card-header py-0 px-1 bg-info text-light card-header-description">G-Code Lines</div>
|
||||
<div id="div-upload-fproc" class="card-body py-0 px-1 card-header-description text-center">-</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -466,11 +466,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="checksum-gcommand-div" class="collapse m-0 pr-1 text-right">
|
||||
<span class="field-description mr-1">GCode checksum value:</span>
|
||||
<span class="field-description mr-1">G-Code checksum value:</span>
|
||||
<span class="h5"><span class="badge badge-secondary" id="checksum-gcommand-value" style="width:100px;"> </span></span>
|
||||
</div>
|
||||
<div id="checksum-gcommand-div" class="input-group input-group-sm collapse my-1">
|
||||
<input type="text" class="form-control" aria-describedby="checksum-gcommand-value" placeholder="GCode checksum value" readonly/>
|
||||
<input type="text" class="form-control" aria-describedby="checksum-gcommand-value" placeholder="G-Code checksum value" readonly/>
|
||||
<div class="input-group-append text-center"><span class="input-group-text" id="checksum-gcommand-value" style="width:100px;"></span></div>
|
||||
</div>
|
||||
<label for="btn-gcommand" class="mb-0 field-labels">Console output:</label>
|
||||
|
|
|
@ -4,7 +4,7 @@ With Marlin version 2.0.9.x or higher, Laser improvements were introduced that e
|
|||
|
||||
### Architecture
|
||||
|
||||
Laser selectable feature capability is defined through 4 global mode flags within gcode ,laser/spindle, planner and stepper routines. The default mode maintains the standard laser function. G-Codes are received, processed and parsed to determine what mode to set through M3, M4 and M5 commands. When the inline mode parameter set is detected, laser power processing will be driven through the planner and stepper routines. Handling of the initial power values and settings are performed by G-Code parsing and the laser/spindle routines.
|
||||
Laser selectable feature capability is defined through 4 global mode flags within G-code ,laser/spindle, planner and stepper routines. The default mode maintains the standard laser function. G-Codes are received, processed and parsed to determine what mode to set through M3, M4 and M5 commands. When the inline mode parameter set is detected, laser power processing will be driven through the planner and stepper routines. Handling of the initial power values and settings are performed by G-Code parsing and the laser/spindle routines.
|
||||
|
||||
Inline power feeds from the block->inline_power variable into the planner's laser.power when in continuous power mode. Further power adjustment will be applied if the laser power trap feature is active otherwise laser.power is used as set in the stepper for the entire block. When laser power trap is active the power levels are step incremented during acceleration and step decremented during deceleration.
|
||||
|
||||
|
@ -24,10 +24,10 @@ The following flow charts depict the flow control logic for spindle and laser op
|
|||
│M3 S-Value│ │Dir !same ?│ │Stepper │
|
||||
│Spindle │ │stop & wait│ │processes │
|
||||
┌──┤Clockwise ├──┤ & start ├──┤moves │
|
||||
┌─────┐ │ │ │ │spindle │ │ │
|
||||
│GCode│ │ └──────────┘ └───────────┘ └───────────┘
|
||||
┌──────┐ │ │ │ │spindle │ │ │
|
||||
│G-Code│ │ └──────────┘ └───────────┘ └───────────┘
|
||||
│Send ├──┤ ┌──────────┐ ┌───────────┐ ┌───────────┐
|
||||
└─────┘ │ │M4 S-Value│ │Dir !same ?│ │Stepper │
|
||||
└──────┘ │ │M4 S-Value│ │Dir !same ?│ │Stepper │
|
||||
├──┤Spindle ├──┤stop & wait├──┤processes │
|
||||
│ │Counter │ │& start │ │moves │
|
||||
│ │Clockwise │ │spindle │ │ │
|
||||
|
@ -51,10 +51,10 @@ The following flow charts depict the flow control logic for spindle and laser op
|
|||
│ │ │ │completion │ │ │
|
||||
│ └──────────┘ └─────────────┘ └───────────┘
|
||||
│ ┌──────────┐ ┌───────────┐ ┌───────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐
|
||||
┌─────┐ │ │M3 I │ │G0,G1,G2,G4│ │Planner │ │Planner │ │Planner fan │ │Planner │ │Stepper │
|
||||
│GCode│ │ │Continuous│ │M3 receive │ │sets block │ │sync power ?│ │sync power ?│ │trap power ?│ │uses block │
|
||||
┌──────┐ │ │M3 I │ │G0,G1,G2,G4│ │Planner │ │Planner │ │Planner fan │ │Planner │ │Stepper │
|
||||
│G-Code│ │ │Continuous│ │M3 receive │ │sets block │ │sync power ?│ │sync power ?│ │trap power ?│ │uses block │
|
||||
│Send ├──┼──┤Inline ├──┤power from ├──┤power using├──┤process M3 ├──┤process fan ├──┤adjusts for ├──┤values to │
|
||||
└─────┘ │ │ │ │S-Value │ │Gx S-Value │ │power inline│ │power inline│ │accel/decel │ │apply power│
|
||||
└──────┘ │ │ │ │S-Value │ │Gx S-Value │ │power inline│ │power inline│ │accel/decel │ │apply power│
|
||||
│ └──────────┘ └───────────┘ └───────────┘ └────────────┘ └────────────┘ └────────────┘ └───────────┘
|
||||
│ ┌──────────┐ ┌───────────┐ ┌────────────────┐ ┌───────────┐
|
||||
│ │M4 I │ │Gx F-Value │ │Planner │ │Stepper │
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue