Browse Source

update 2.0.x

MKS Robin Nano-s v1.3 support
pull/45/head
Sergey 3 years ago
parent
commit
e30d47d19b
  1. 28
      Marlin/Configuration.h
  2. 15
      Marlin/Configuration_adv.h
  3. 2
      Marlin/Makefile
  4. 2
      Marlin/src/HAL/AVR/fastio.h
  5. 2
      Marlin/src/HAL/DUE/HAL_SPI.cpp
  6. 2
      Marlin/src/HAL/DUE/usb/arduino_due_x.h
  7. 6
      Marlin/src/HAL/DUE/usb/udd.h
  8. 4
      Marlin/src/HAL/DUE/usb/udi_cdc.c
  9. 2
      Marlin/src/HAL/DUE/usb/udi_cdc_conf.h
  10. 10
      Marlin/src/HAL/DUE/usb/udi_msc.c
  11. 46
      Marlin/src/HAL/DUE/usb/uotghs_device_due.c
  12. 2
      Marlin/src/HAL/DUE/usb/usb_protocol_msc.h
  13. 2
      Marlin/src/HAL/LINUX/hardware/Heater.cpp
  14. 2
      Marlin/src/HAL/LINUX/include/pinmapping.h
  15. 2
      Marlin/src/HAL/SAMD51/HAL.cpp
  16. 2
      Marlin/src/HAL/SAMD51/fastio.h
  17. 2
      Marlin/src/HAL/SAMD51/timers.cpp
  18. 2
      Marlin/src/HAL/STM32/HAL_MinSerial.cpp
  19. 2
      Marlin/src/HAL/STM32/MarlinSPI.cpp
  20. 2
      Marlin/src/HAL/STM32/Servo.cpp
  21. 6
      Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp
  22. 2
      Marlin/src/HAL/STM32/eeprom_flash.cpp
  23. 7
      Marlin/src/HAL/STM32/eeprom_if_iic.cpp
  24. 2
      Marlin/src/HAL/STM32/eeprom_spi_w25q.cpp
  25. 4
      Marlin/src/HAL/STM32/msc_sd.cpp
  26. 10
      Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
  27. 2
      Marlin/src/HAL/STM32F1/HAL.cpp
  28. 4
      Marlin/src/HAL/STM32F1/SPI.cpp
  29. 6
      Marlin/src/HAL/STM32F1/onboard_sd.h
  30. 2
      Marlin/src/HAL/STM32F1/timers.h
  31. 2
      Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp
  32. 2
      Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp
  33. 2
      Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp
  34. 2
      Marlin/src/HAL/shared/backtrace/unwarm.h
  35. 2
      Marlin/src/HAL/shared/backtrace/unwarmbytab.h
  36. 2
      Marlin/src/HAL/shared/backtrace/unwarmmem.cpp
  37. 2
      Marlin/src/HAL/shared/backtrace/unwarmmem.h
  38. 2
      Marlin/src/HAL/shared/backtrace/unwinder.cpp
  39. 2
      Marlin/src/HAL/shared/backtrace/unwinder.h
  40. 2
      Marlin/src/HAL/shared/backtrace/unwmemaccess.h
  41. 2
      Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp
  42. 12
      Marlin/src/MarlinCore.cpp
  43. 1
      Marlin/src/core/boards.h
  44. 2
      Marlin/src/core/macros.h
  45. 2
      Marlin/src/core/serial_hook.h
  46. 2
      Marlin/src/feature/bedlevel/hilbert_curve.cpp
  47. 6
      Marlin/src/feature/dac/dac_mcp4728.cpp
  48. 2
      Marlin/src/feature/encoder_i2c.cpp
  49. 4
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  50. 2
      Marlin/src/gcode/calibrate/G28.cpp
  51. 2
      Marlin/src/gcode/calibrate/G76_M192_M871.cpp
  52. 4
      Marlin/src/gcode/config/M43.cpp
  53. 20
      Marlin/src/gcode/config/M575.cpp
  54. 2
      Marlin/src/gcode/feature/L6470/M906.cpp
  55. 2
      Marlin/src/gcode/feature/L6470/M916-918.cpp
  56. 2
      Marlin/src/gcode/lcd/M73.cpp
  57. 10
      Marlin/src/inc/Conditionals_LCD.h
  58. 7
      Marlin/src/inc/Conditionals_post.h
  59. 2
      Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
  60. 13
      Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
  61. 2
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
  62. 2
      Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp
  63. 0
      Marlin/src/lcd/e3v2/creality/README.md
  64. 131
      Marlin/src/lcd/e3v2/creality/dwin.cpp
  65. 148
      Marlin/src/lcd/e3v2/creality/dwin.h
  66. 29
      Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp
  67. 168
      Marlin/src/lcd/e3v2/creality/dwin_lcd.h
  68. 2
      Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp
  69. 2
      Marlin/src/lcd/e3v2/creality/rotary_encoder.h
  70. 6
      Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp
  71. 2
      Marlin/src/lcd/extui/dgus/DGUSDisplay.h
  72. 2
      Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp
  73. 2
      Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h
  74. 2
      Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp
  75. 2
      Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h
  76. 2
      Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp
  77. 2
      Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h
  78. 2
      Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp
  79. 2
      Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h
  80. 2
      Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp
  81. 2
      Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h
  82. 2
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
  83. 2
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h
  84. 2
      Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp
  85. 2
      Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h
  86. 2
      Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp
  87. 2
      Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h
  88. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp
  89. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp
  90. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h
  91. 4
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
  92. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp
  93. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h
  94. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h
  95. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h
  96. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h
  97. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py
  98. 4
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h
  99. 2
      Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp
  100. 2
      Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h

28
Marlin/Configuration.h

@ -916,7 +916,7 @@
* Override with M92
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 421 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 400 }
/**
* Default Max Feed Rate (mm/s)
@ -1110,7 +1110,7 @@
#endif
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
// When the pin is defined you can use M672 to set/reset the probe sensivity.
// When the pin is defined you can use M672 to set/reset the probe sensitivity.
//#define DUET_SMART_EFFECTOR
#if ENABLED(DUET_SMART_EFFECTOR)
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
@ -2590,11 +2590,33 @@ EEPROM_W25Q
// DGUS Touch Display with DWIN OS. (Choose one.)
// ORIGIN : https://www.aliexpress.com/item/32993409517.html
// FYSETC : https://www.aliexpress.com/item/32961471929.html
// MKS : https://www.aliexpress.com/item/1005002008179262.html
//
// Flash display with DGUS Displays for Marlin:
// - Format the SD card to FAT32 with an allocation size of 4kb.
// - Download files as specified for your type of display.
// - Plug the microSD card into the back of the display.
// - Boot the display and wait for the update to complete.
//
// ORIGIN (Marlin DWIN_SET)
// - Download https://github.com/coldtobi/Marlin_DGUS_Resources
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// FYSETC (Supplier default)
// - Download https://github.com/FYSETC/FYSTLCD-2.0
// - Copy the downloaded SCREEN folder to the SD card.
//
// HIPRECY (Supplier default)
// - Download https://github.com/HiPrecy/Touch-Lcd-LEO
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// MKS (MKS-H43) (Supplier default)
// - Download https://github.com/makerbase-mks/MKS-H43
// - Copy the downloaded DWIN_SET folder to the SD card.
//
//#define DGUS_LCD_UI_ORIGIN
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY
//#define DGUS_LCD_UI_MKS
#if ENABLED(DGUS_LCD_UI_MKS)
#define USE_MKS_GREEN_UI

15
Marlin/Configuration_adv.h

@ -1282,11 +1282,14 @@
//#define LCD_SHOW_E_TOTAL
#endif
#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI)
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
// LCD Print Progress options
#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
#if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
#endif
#endif
#if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI)
@ -3888,7 +3891,7 @@
*/
#define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
// Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
// Use a rolling average to identify persistent errors that indicate skips, as opposed to vibration and noise.
#define I2CPE_ERR_ROLLING_AVERAGE
#endif // I2C_POSITION_ENCODERS

2
Marlin/Makefile

@ -110,7 +110,7 @@ LIQUID_TWI2 ?= 0
WIRE ?= 0
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
# Disabling this (and SPEAKER) saves approximately 350 bytes of memory.
TONE ?= 1
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)

2
Marlin/src/HAL/AVR/fastio.h

@ -284,7 +284,7 @@ enum ClockSource2 : char {
* PWM availability macros
*/
// Determine which harware PWMs are already in use
// Determine which hardware PWMs are already in use
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN)
#if PIN_EXISTS(CONTROLLER_FAN)
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)

2
Marlin/src/HAL/DUE/HAL_SPI.cpp

@ -437,7 +437,7 @@
} while (--todo);
}
// Pointers to generic functions for block tranfers
// Pointers to generic functions for block transfers
static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;

2
Marlin/src/HAL/DUE/usb/arduino_due_x.h

@ -71,7 +71,7 @@
/* ------------------------------------------------------------------------ */
/**
* \page arduino_due_x_board_info "Arduino Due/X - Board informations"
* \page arduino_due_x_board_info "Arduino Due/X - Board information"
* This page lists several definition related to the board description.
*
*/

6
Marlin/src/HAL/DUE/usb/udd.h

@ -90,7 +90,7 @@ typedef struct {
//! This buffer must be word align for DATA IN phase (use prefix COMPILER_WORD_ALIGNED for buffer)
uint8_t *payload;
//! Size of buffer to send or fill, and content the number of byte transfered
//! Size of buffer to send or fill, and content the number of byte transferred
uint16_t payload_size;
//! Callback called after reception of ZLP from setup request
@ -132,7 +132,7 @@ typedef void (*udd_callback_halt_cleared_t)(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is complete
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param n number of data transfered
* \param n number of data transferred
*/
typedef void (*udd_callback_trans_t) (udd_ep_status_t status,
iram_size_t nb_transferred, udd_ep_id_t ep);
@ -303,7 +303,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
* The driver uses a specific DMA USB to transfer data
* from internal RAM to endpoint, if this one is available.
* When the transfer is finished or aborted (stall, reset, ...), the \a callback is called.
* The \a callback returns the transfer status and eventually the number of byte transfered.
* The \a callback returns the transfer status and eventually the number of byte transferred.
* Note: The control endpoint is not authorized.
*
* \param ep The ID of the endpoint to use

4
Marlin/src/HAL/DUE/usb/udi_cdc.c

@ -162,7 +162,7 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);
@ -200,7 +200,7 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);

2
Marlin/src/HAL/DUE/usb/udi_cdc_conf.h

@ -106,7 +106,7 @@ extern "C" {
*/
//@{
# if UDI_CDC_PORT_NB > 2
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints.
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enough endpoints.
# endif
#define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX

10
Marlin/src/HAL/DUE/usb/udi_msc.c

@ -173,7 +173,7 @@ static void udi_msc_cbw_wait(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_received number of data transfered
* \param nb_received number of data transferred
*/
static void udi_msc_cbw_received(udd_ep_status_t status,
iram_size_t nb_received, udd_ep_id_t ep);
@ -211,7 +211,7 @@ static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finish
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
@ -244,7 +244,7 @@ void udi_msc_csw_send(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
@ -463,7 +463,7 @@ uint8_t udi_msc_getsetting(void)
static void udi_msc_cbw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_OUT);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid);
@ -472,7 +472,7 @@ static void udi_msc_cbw_invalid(void)
static void udi_msc_csw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_IN);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid);

46
Marlin/src/HAL/DUE/usb/uotghs_device_due.c

@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle)
/**
* \name Control endpoint low level management routine.
*
* This function performs control endpoint mangement.
* This function performs control endpoint management.
* It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
*/
//@{
@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void);
/**
* \brief Main interrupt routine for control endpoint
*
* This switchs control endpoint events to correct sub function.
* This switches control endpoint events to correct sub function.
*
* \return \c 1 if an event about control endpoint is occured, otherwise \c 0.
* \return \c 1 if an event about control endpoint is occurred, otherwise \c 0.
*/
static bool udd_ctrl_interrupt(void);
@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void);
* \name Management of bulk/interrupt/isochronous endpoints
*
* The UDD manages the data transfer on endpoints:
* - Start data tranfer on endpoint with USB Device DMA
* - Start data transfer on endpoint with USB Device DMA
* - Send a ZLP packet if requested
* - Call callback registered to signal end of transfer
* The transfer abort and stall feature are supported.
@ -431,7 +431,7 @@ typedef struct {
uint8_t *buf;
//! Size of buffer to send or fill
iram_size_t buf_size;
//!< Size of data transfered
//!< Size of data transferred
iram_size_t buf_cnt;
//!< Size of data loaded (or prepared for DMA) last time
iram_size_t buf_load;
@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
#ifdef UDD_EP_DMA_SUPPORTED
/**
* \brief Start the next transfer if necessary or complet the job associated.
* \brief Start the next transfer if necessary or complete the job associated.
*
* \param ep endpoint number without direction flag
*/
@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
/**
* \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
*
* This switchs endpoint events to correct sub function.
* This switches endpoint events to correct sub function.
*
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0.
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred, otherwise \c 0.
*/
static bool udd_ep_interrupt(void);
@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void);
*
* Note:
* Here, the global interrupt mask is not clear when an USB interrupt is enabled
* because this one can not be occured during the USB ISR (=during INTX is masked).
* because this one can not be occurred during the USB ISR (=during INTX is masked).
* See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
*/
#ifdef UHD_ENABLE
@ -787,7 +787,7 @@ void udd_attach(void)
udd_sleep_mode(true);
otg_unfreeze_clock();
// This section of clock check can be improved with a chek of
// This section of clock check can be improved with a check of
// USB clock source via sysclk()
// Check USB clock because the source can be a PLL
while (!Is_otg_clock_usable());
@ -803,7 +803,7 @@ void udd_attach(void)
#ifdef USB_DEVICE_HS_SUPPORT
udd_enable_msof_interrupt();
#endif
// Reset following interupts flag
// Reset following interrupts flag
udd_ack_reset();
udd_ack_sof();
udd_ack_msof();
@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
}
dbg_print("alloc(%x, %d) ", ep, MaxEndpointSize);
// Bank choise
// Bank choice
switch (bmAttributes & USB_EP_TYPE_MASK) {
case USB_EP_TYPE_ISOCHRONOUS:
nb_bank = UDD_ISOCHRONOUS_NB_BANK(ep);
@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
if (Is_udd_endpoint_stall_requested(ep)
|| ptr_job->stall_requested) {
// Endpoint halted then registes the callback
// Endpoint halted then registers the callback
ptr_job->busy = true;
ptr_job->call_nohalt = callback;
} else {
@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void)
// Decode setup request
if (udc_process_setup() == false) {
// Setup request unknow then stall it
// Setup request unknown then stall it
udd_ctrl_stall_data();
udd_ack_setup_received(0);
return;
@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void)
udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt;
if ((udd_g_ctrlreq.req.wLength == udd_ctrl_prev_payload_buf_cnt)
|| b_shortpacket) {
// All data requested are transfered or a short packet has been sent
// All data requested are transferred or a short packet has been sent
// then it is the end of data phase.
// Generate an OUT ZLP for handshake phase.
udd_ctrl_send_zlp_out();
@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void)
// End of SETUP request:
// - Data IN Phase aborted,
// - or last Data IN Phase hidden by ZLP OUT sending quiclky,
// - or ZLP OUT received normaly.
// - or ZLP OUT received normally.
udd_ctrl_endofrequest();
} else {
// Protocol error during SETUP request
@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void)
(udd_ctrl_prev_payload_buf_cnt +
udd_ctrl_payload_buf_cnt))) {
// End of reception because it is a short packet
// Before send ZLP, call intermediat calback
// Before send ZLP, call intermediate callback
// in case of data receiv generate a stall
udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt;
if (NULL != udd_g_ctrlreq.over_under_run) {
@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void)
if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_buf_cnt) {
// Overrun then request a new payload buffer
if (!udd_g_ctrlreq.over_under_run) {
// No callback availabled to request a new payload buffer
// No callback available to request a new payload buffer
udd_ctrl_stall_data();
// Ack reception of OUT to replace NAK by a STALL
udd_ack_out_received(0);
@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
// transfer size of UDD_ENDPOINT_MAX_TRANS Bytes
next_trans = UDD_ENDPOINT_MAX_TRANS;
// Set 0 to tranfer the maximum
// Set 0 to transfer the maximum
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(0);
} else {
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(next_trans);
@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
}
cpu_irq_restore(flags);
// Here a ZLP has been recieved
// Here a ZLP has been received
// and the DMA transfer must be not started.
// It is the end of transfer
ptr_job->buf_size = ptr_job->buf_cnt;
@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void)
}
dbg_print("dma%x: ", ep);
udd_disable_endpoint_dma_interrupt(ep);
// Save number of data no transfered
// Save number of data no transferred
nb_remaining = (udd_endpoint_dma_get_status(ep) &
UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk)
>> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos;
if (nb_remaining) {
// Transfer no complete (short packet or ZLP) then:
// Update number of data transfered
// Update number of data transferred
ptr_job->buf_cnt -= nb_remaining;
// Set transfer complete to stop the transfer
ptr_job->buf_size = ptr_job->buf_cnt;
@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void)
udd_disable_endpoint_interrupt(ep);
Assert(ptr_job->stall_requested);
// A stall has been requested during backgound transfer
// A stall has been requested during background transfer
ptr_job->stall_requested = false;
udd_disable_endpoint_bank_autoswitch(ep);
udd_enable_stall_handshake(ep);

2
Marlin/src/HAL/DUE/usb/usb_protocol_msc.h

@ -130,7 +130,7 @@ struct usb_msc_cbw {
struct usb_msc_csw {
le32_t dCSWSignature; //!< Must contain 'USBS'
le32_t dCSWTag; //!< Same as dCBWTag
le32_t dCSWDataResidue; //!< Number of bytes not transfered
le32_t dCSWDataResidue; //!< Number of bytes not transferred
uint8_t bCSWStatus; //!< Status code
};

2
Marlin/src/HAL/LINUX/hardware/Heater.cpp

@ -54,7 +54,7 @@ void Heater::update() {
}
void Heater::interrupt(GpioEvent ev) {
// ununsed
// unused
}
#endif // __PLAT_LINUX__

2
Marlin/src/HAL/LINUX/include/pinmapping.h

@ -55,7 +55,7 @@ constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS);
// Test whether the pin is PWM
constexpr bool PWM_PIN(const pin_t p) { return false; }
// Test whether the pin is interruptable
// Test whether the pin is interruptible
constexpr bool INTERRUPT_PIN(const pin_t p) { return false; }
// Get the pin number at the given index

2
Marlin/src/HAL/SAMD51/HAL.cpp

@ -98,7 +98,7 @@
// Struct must be 32 bits aligned because of DMA accesses but fields needs to be 8 bits packed
typedef struct __attribute__((aligned(4), packed)) {
ADC_INPUTCTRL_Type INPUTCTRL;
} HAL_DMA_DAC_Registers; // DMA transfered registers
} HAL_DMA_DAC_Registers; // DMA transferred registers
#endif

2
Marlin/src/HAL/SAMD51/fastio.h

@ -131,7 +131,7 @@
*/
#define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48)
// Return fullfilled ADCx->INPUTCTRL.reg
// Return fulfilled ADCx->INPUTCTRL.reg
#define PIN_TO_INPUTCTRL(P) ( (PIN_TO_AIN(P) == 0) ? ADC_INPUTCTRL_MUXPOS_AIN0 \
: (PIN_TO_AIN(P) == 1) ? ADC_INPUTCTRL_MUXPOS_AIN1 \
: (PIN_TO_AIN(P) == 2) ? ADC_INPUTCTRL_MUXPOS_AIN2 \

2
Marlin/src/HAL/SAMD51/timers.cpp

@ -107,7 +107,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt
// TCn clock setup
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceeded by TCC ones
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceded by TCC ones
GCLK->PCHCTRL[clockID].bit.CHEN = false;
SYNC(GCLK->PCHCTRL[clockID].bit.CHEN);
GCLK->PCHCTRL[clockID].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; // 120MHz startup code programmed

2
Marlin/src/HAL/STM32/HAL_MinSerial.cpp

@ -125,7 +125,7 @@ static void TX(char c) {
}
regs->DR = c;
#else
// Let's hope a mystical guru will fix this, one day by writting interrupt-free USB CDC ACM code (or, at least, by polling the registers since interrupt will be queued but will never trigger)
// Let's hope a mystical guru will fix this, one day by writing interrupt-free USB CDC ACM code (or, at least, by polling the registers since interrupt will be queued but will never trigger)
// For now, it's completely lost to oblivion.
#endif
}

2
Marlin/src/HAL/STM32/MarlinSPI.cpp

@ -19,6 +19,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../platforms.h"
#if defined(HAL_STM32) && !defined(STM32H7xx)
#include "MarlinSPI.h"

2
Marlin/src/HAL/STM32/Servo.cpp

@ -39,7 +39,7 @@ static_assert(COUNT(servoDelay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM
// This allows all timer interrupt priorities to be managed from a single location in the HAL.
static uint32_t servo_interrupt_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), TIM_IRQ_PRIO, TIM_IRQ_SUBPRIO);
// This must be called after the STM32 Servo class has intialized the timer.
// This must be called after the STM32 Servo class has initialized the timer.
// It may only be needed after the first call to attach(), but it is possible
// that is is necessary after every detach() call. To be safe this is currently
// called after every call to attach().

6
Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp

@ -19,7 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef STM32F1
#include "../platforms.h"
#ifdef HAL_STM32
/**
* PersistentStore for Arduino-style EEPROM interface
@ -79,4 +81,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
}
#endif // IIC_BL24CXX_EEPROM
#endif // STM32F1
#endif // HAL_STM32

2
Marlin/src/HAL/STM32/eeprom_flash.cpp

@ -125,7 +125,7 @@ bool PersistentStore::access_start() {
address += sizeof(uint32_t);
}
if (current_slot == -1) {
// We didn't find anything, so we'll just intialize to empty
// We didn't find anything, so we'll just initialize to empty
for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = EMPTY_UINT8;
current_slot = EEPROM_SLOTS;
}

7
Marlin/src/HAL/STM32/eeprom_if_iic.cpp

@ -19,14 +19,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../platforms.h"
#ifdef HAL_STM32
/**
* Platform-independent Arduino functions for I2C EEPROM.
* Enable USE_SHARED_EEPROM if not supplied by the framework.
*/
#ifdef STM32F1
#include "../../inc/MarlinConfig.h"
#if ENABLED(IIC_BL24CXX_EEPROM)
@ -51,4 +52,4 @@ uint8_t eeprom_read_byte(uint8_t *pos) {
}
#endif // IIC_BL24CXX_EEPROM
#endif // STM32F1
#endif // HAL_STM32

2
Marlin/src/HAL/STM32/eeprom_spi_w25q.cpp

@ -16,7 +16,7 @@ void eeprom_test(void);
void eeprom_init(void){
DEBUG("Start EEPROM");
W25QXX.init(SPI_QUARTER_SPEED);
W25QXX.init(SPI_EIGHTH_SPEED);
//eeprom_test();
W25QXX.SPI_FLASH_BufferRead((uint8_t *)spi_eeprom,SPI_EEPROM_OFFSET,MARLIN_EEPROM_SIZE);
}

4
Marlin/src/HAL/STM32/msc_sd.cpp

@ -62,7 +62,7 @@ public:
return true;
}
// multi block optmization
// multi block optimization
sd2card->writeStart(blkAddr, blkLen);
while (blkLen--) {
watchdog_refresh();
@ -82,7 +82,7 @@ public:
return true;
}
// multi block optmization
// multi block optimization
sd2card->readStart(blkAddr);
while (blkLen--) {
watchdog_refresh();

10
Marlin/src/HAL/STM32/tft/tft_fsmc.cpp

@ -36,16 +36,6 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD;
void TFT_FSMC::Init() {
uint32_t controllerAddress;
#if PIN_EXISTS(TFT_RESET)
OUT_WRITE(TFT_RESET_PIN, HIGH);
HAL_Delay(100);
#endif
#if PIN_EXISTS(TFT_BACKLIGHT)
OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH);
#endif
FSMC_NORSRAM_TimingTypeDef Timing, ExtTiming;
uint32_t NSBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);

2
Marlin/src/HAL/STM32F1/HAL.cpp

@ -253,7 +253,7 @@ static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) {
reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */
reg_value = (reg_value |
((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << 8)); /* Insert write key and priorty group */
(PriorityGroupTmp << 8)); /* Insert write key & priority group */
SCB->AIRCR = reg_value;
}

4
Marlin/src/HAL/STM32F1/SPI.cpp

@ -363,8 +363,8 @@ uint16_t SPIClass::transfer16(uint16_t data) const {
/**
* Roger Clark and Victor Perez, 2015
* Performs a DMA SPI transfer with at least a receive buffer.
* If a TX buffer is not provided, FF is sent over and over for the lenght of the transfer.
* On exit TX buffer is not modified, and RX buffer cotains the received data.
* If a TX buffer is not provided, FF is sent over and over for the length of the transfer.
* On exit TX buffer is not modified, and RX buffer contains the received data.
* Still in progress.
*/
void SPIClass::dmaTransferSet(const void *transmitBuf, void *receiveBuf) {

6
Marlin/src/HAL/STM32F1/onboard_sd.h

@ -7,8 +7,8 @@
#pragma once
#define _DISKIO_WRITE 1 /* 1: Enable disk_write function */
#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl fucntion */
#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control fucntion */
#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl function */
#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control function */
typedef unsigned char BYTE;
typedef unsigned short WORD;
@ -56,7 +56,7 @@ DRESULT disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
#define STA_NODISK 0x02 /* No medium in the drive */
#define STA_PROTECT 0x04 /* Write protected */
/* Command code for disk_ioctrl fucntion */
/* Command code for disk_ioctrl function */
/* Generic command (Used by FatFs) */
#define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */

2
Marlin/src/HAL/STM32F1/timers.h

@ -166,7 +166,7 @@ FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const ha
case STEP_TIMER_NUM:
// NOTE: WE have set ARPE = 0, which means the Auto reload register is not preloaded
// and there is no need to use any compare, as in the timer mode used, setting ARR to the compare value
// will result in exactly the same effect, ie trigerring an interrupt, and on top, set counter to 0
// will result in exactly the same effect, ie triggering an interrupt, and on top, set counter to 0
timer_set_reload(STEP_TIMER_DEV, compare); // We reload direct ARR as needed during counting up
break;
case TEMP_TIMER_NUM:

2
Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp

@ -65,7 +65,7 @@ void spiInit(uint8_t spiRate) {
case SPI_EIGHTH_SPEED: clock = 1250000; break;
case SPI_SPEED_5: clock = 625000; break;
case SPI_SPEED_6: clock = 312500; break;
default: clock = 4000000; // Default from the SPI libarary
default: clock = 4000000; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
SPI.begin();

2
Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp

@ -65,7 +65,7 @@ void spiInit(uint8_t spiRate) {
case SPI_SPEED_5: clock = 625000; break;
case SPI_SPEED_6: clock = 312500; break;
default:
clock = 4000000; // Default from the SPI libarary
clock = 4000000; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
SPI.begin();

2
Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp

@ -82,7 +82,7 @@ void spiInit(uint8_t spiRate) {
case SPI_SPEED_5: clock = 625000; break;
case SPI_SPEED_6: clock = 312500; break;
default:
clock = 4000000; // Default from the SPI libarary
clock = 4000000; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
SPI.begin();

2
Marlin/src/HAL/shared/backtrace/unwarm.h

@ -4,7 +4,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
***************************************************************************

2
Marlin/src/HAL/shared/backtrace/unwarmbytab.h

@ -5,7 +5,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
***************************************************************************

2
Marlin/src/HAL/shared/backtrace/unwarmmem.cpp

@ -5,7 +5,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
***************************************************************************

2
Marlin/src/HAL/shared/backtrace/unwarmmem.h

@ -5,7 +5,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
***************************************************************************

2
Marlin/src/HAL/shared/backtrace/unwinder.cpp

@ -28,7 +28,7 @@ extern "C" const UnwTabEntry __exidx_end[];
// Detect if unwind information is present or not
static int HasUnwindTableInfo() {
// > 16 because there are default entries we can't supress
// > 16 because there are default entries we can't suppress
return ((char*)(&__exidx_end) - (char*)(&__exidx_start)) > 16 ? 1 : 0;
}

2
Marlin/src/HAL/shared/backtrace/unwinder.h

@ -5,7 +5,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
**************************************************************************/

2
Marlin/src/HAL/shared/backtrace/unwmemaccess.h

@ -5,7 +5,7 @@
* This program is PUBLIC DOMAIN.
* This means that there is no copyright and anyone is able to take a copy
* for free and use it as they wish, with or without modifications, and in
* any context, commerically or otherwise. The only limitation is that I
* any context, commercially or otherwise. The only limitation is that I
* don't guarantee that the software is fit for any purpose or accept any
* liability for its use or misuse - this software is without warranty.
***************************************************************************

2
Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp

@ -345,7 +345,7 @@ void hook_cpu_exceptions() {
// We failed to find a valid vector table size, let's abort hooking up
if (vec_size == VECTOR_TABLE_SENTINEL) return;
// Poor method that's wasting RAM here, but allocating with malloc and alignment would be worst
// 128 bytes alignement is required for writing the VTOR register
// 128 bytes alignment is required for writing the VTOR register
alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL];
SERIAL_ECHOPGM("Detected vector table size: ");

12
Marlin/src/MarlinCore.cpp

@ -75,8 +75,8 @@
#endif
#if ENABLED(DWIN_CREALITY_LCD)
#include "lcd/dwin/e3v2/dwin.h"
#include "lcd/dwin/e3v2/rotary_encoder.h"
#include "lcd/e3v2/creality/dwin.h"
#include "lcd/e3v2/creality/rotary_encoder.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
@ -1310,11 +1310,7 @@ void setup() {
// (because EEPROM code calls the UI).
#if ENABLED(DWIN_CREALITY_LCD)
delay(800); // Required delay (since boot?)
SERIAL_ECHOPGM("\nDWIN handshake ");
if (DWIN_Handshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error.");
DWIN_Frame_SetDir(1); // Orientation 90°
DWIN_UpdateLCD(); // Show bootscreen (first image)
SETUP_RUN(DWIN_Startup());
#else
SETUP_RUN(ui.init());
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
@ -1591,7 +1587,7 @@ void setup() {
#if ENABLED(DWIN_CREALITY_LCD)
Encoder_Configuration();
HMI_Init();
DWIN_JPG_CacheTo1(Language_English);
HMI_SetLanguageCache();
HMI_StartFrame(true);
DWIN_StatusChanged_P(GET_TEXT(WELCOME_MSG));
#endif

1
Marlin/src/core/boards.h

@ -392,6 +392,7 @@
#define BOARD_ANET_ET4 4228 // ANET ET4 V1.x (STM32F407VGT6)
#define BOARD_ANET_ET4P 4229 // ANET ET4P V1.x (STM32F407VGT6)
#define BOARD_FYSETC_CHEETAH_V20 4230 // FYSETC Cheetah V2.0
#define BOARD_MKS_ROBIN_NANO_S_V13 4231 // MKS Robin Nano-S V1.3 (STM32F407VG)
//
// ARM Cortex M7

2
Marlin/src/core/macros.h

@ -399,7 +399,7 @@
template <typename T, typename ... Args> struct first_type_of { typedef T type; };
template <typename T> struct first_type_of<T> { typedef T type; };
}
// C++11 solution using SFINAE to detect the existance of a member in a class at compile time.
// C++11 solution using SFINAE to detect the existence of a member in a class at compile time.
// It creates a HasMember<Type> structure containing 'value' set to true if the member exists
#define HAS_MEMBER_IMPL(Member) \
namespace Private { \

2
Marlin/src/core/serial_hook.h

@ -110,7 +110,7 @@ struct ConditionalSerial : public SerialBase< ConditionalSerial<SerialT> > {
ConditionalSerial(bool & conditionVariable, SerialT & out, const bool e) : BaseClassT(e), condition(conditionVariable), out(out) {}
};
// A simple foward class that taking a reference to an existing serial instance (likely created in their respective framework)
// A simple forward class that taking a reference to an existing serial instance (likely created in their respective framework)
template <class SerialT>
struct ForwardSerial : public SerialBase< ForwardSerial<SerialT> > {
typedef SerialBase< ForwardSerial<SerialT> > BaseClassT;

2
Marlin/src/feature/bedlevel/hilbert_curve.cpp

@ -35,7 +35,7 @@ constexpr uint8_t dim = _BV(ord);
static inline bool eval_candidate(int8_t x, int8_t y, hilbert_curve::callback_ptr func, void *data) {
// The print bed likely has fewer points than the full Hilbert
// curve, so cull unecessary points
// curve, so cull unnecessary points
return x < (GRID_MAX_POINTS_X) && y < (GRID_MAX_POINTS_Y) ? func(x, y, data) : false;
}

6
Marlin/src/feature/dac/dac_mcp4728.cpp

@ -81,7 +81,7 @@ uint8_t MCP4728::eepromWrite() {
}
/**
* Write Voltage reference setting to all input regiters
* Write Voltage reference setting to all input registers
*/
uint8_t MCP4728::setVref_all(const uint8_t value) {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
@ -89,7 +89,7 @@ uint8_t MCP4728::setVref_all(const uint8_t value) {
return Wire.endTransmission();
}
/**
* Write Gain setting to all input regiters
* Write Gain setting to all input registers
*/
uint8_t MCP4728::setGain_all(const uint8_t value) {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
@ -129,7 +129,7 @@ void MCP4728::setDrvPct(xyze_uint_t &pct) {
}
/**
* FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1
* FastWrite input register values - All DAC output update. refer to DATASHEET 5.6.1
* DAC Input and PowerDown bits update.
* No EEPROM update
*/

2
Marlin/src/feature/encoder_i2c.cpp

@ -94,7 +94,7 @@ void I2CPositionEncoder::update() {
SERIAL_ECHOLNPAIR("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction.");
//the encoder likely lost its place when the error occured, so we'll reset and use the printer's
//the encoder likely lost its place when the error occurred, so we'll reset and use the printer's
//idea of where it the axis is to re-initialize
const float pos = planner.get_axis_position_mm(encoderAxis);
int32_t positionInTicks = pos * get_ticks_unit();

4
Marlin/src/gcode/bedlevel/abl/G29.cpp

@ -61,7 +61,7 @@
#endif
#if ENABLED(DWIN_CREALITY_LCD)
#include "../../../lcd/dwin/e3v2/dwin.h"
#include "../../../lcd/e3v2/creality/dwin.h"
#endif
#if HAS_MULTI_HOTEND
@ -363,8 +363,6 @@ G29_TYPE GcodeSuite::G29() {
#if ABL_USES_GRID
xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_FEEDRATE));
if (!xy_probe_feedrate_mm_s) xy_probe_feedrate_mm_s = PLANNER_XY_FEEDRATE();
NOLESS(xy_probe_feedrate_mm_s, planner.settings.min_feedrate_mm_s);
const float x_min = probe.min_x(), x_max = probe.max_x(),
y_min = probe.min_y(), y_max = probe.max_y();

2
Marlin/src/gcode/calibrate/G28.cpp

@ -47,7 +47,7 @@
#include "../../lcd/marlinui.h"
#if ENABLED(DWIN_CREALITY_LCD)
#include "../../lcd/dwin/e3v2/dwin.h"
#include "../../lcd/e3v2/creality/dwin.h"
#endif
#if ENABLED(EXTENSIBLE_UI)

2
Marlin/src/gcode/calibrate/G76_M192_M871.cpp

@ -47,7 +47,7 @@
* Compensation values are deltas to first probe measurement at bed temp. = 60°C.
* - The hotend will not be heated at any time.
* - On my Průša MK3S clone I put a piece of paper between the probe and the hotend
* so the hotend fan would not cool my probe constantly. Alternativly you could just
* so the hotend fan would not cool my probe constantly. Alternatively you could just
* make sure the fan is not running while running the calibration process.
*
* Probe calibration:

4
Marlin/src/gcode/config/M43.cpp

@ -288,8 +288,8 @@ inline void servo_probe_test() {
* S<pin> - Start Pin number. If not given, will default to 0
* L<pin> - End Pin number. If not given, will default to last pin defined for this board
* I<bool> - Flag to ignore Marlin's pin protection. Use with caution!!!!
* R - Repeat pulses on each pin this number of times before continueing to next pin
* W - Wait time (in miliseconds) between pulses. If not given will default to 500
* R - Repeat pulses on each pin this number of times before continuing to next pin
* W - Wait time (in milliseconds) between pulses. If not given will default to 500
*
* M43 S - Servo probe test
* P<index> - Probe index (optional - defaults to 0

20
Marlin/src/gcode/config/M575.cpp

@ -52,19 +52,25 @@ void GcodeSuite::M575() {
case 2400: case 9600: case 19200: case 38400: case 57600:
case 115200: case 250000: case 500000: case 1000000: {
const int8_t port = parser.intval('P', -99);
const bool set0 = (port == -99 || port == 0);
if (set0) SERIAL_ECHO_MSG(" Serial ", '0', " baud rate set to ", baud);
const bool set1 = (port == -99 || port == 0);
if (set1) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('0'), " baud rate set to ", baud);
#if HAS_MULTI_SERIAL
const bool set1 = (port == -99 || port == 1);
if (set1) SERIAL_ECHO_MSG(" Serial ", '1', " baud rate set to ", baud);
const bool set2 = (port == -99 || port == 1);
if (set2) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('1'), " baud rate set to ", baud);
#ifdef SERIAL_PORT_3
const bool set3 = (port == -99 || port == 2);
if (set3) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('2'), " baud rate set to ", baud);
#endif
#endif
SERIAL_FLUSH();
if (set0) { MYSERIAL1.end(); MYSERIAL1.begin(baud); }
if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); }
#if HAS_MULTI_SERIAL
if (set1) { MYSERIAL2.end(); MYSERIAL2.begin(baud); }
if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); }
#ifdef SERIAL_PORT_3
if (set3) { MYSERIAL3.end(); MYSERIAL3.begin(baud); }
#endif
#endif
} break;

2
Marlin/src/gcode/feature/L6470/M906.cpp

@ -212,7 +212,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
* L6474 - current in mA (4A max)
* All others - 0-255
*
* Sets KVAL_HOLD wich affects the current being driven through the stepper.
* Sets KVAL_HOLD which affects the current being driven through the stepper.
*
* L6470 is used in the STEP-CLOCK mode. KVAL_HOLD is the only KVAL_xxx
* that affects the effective voltage seen by the stepper.

2
Marlin/src/gcode/feature/L6470/M916-918.cpp

@ -177,7 +177,7 @@ void GcodeSuite::M916() {
if ((status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD)))
DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Thermal warning/shutdown has occurred");
else if (status_composite)
DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occured");
DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occurred");
else
DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Unable to get to thermal warning/shutdown");

2
Marlin/src/gcode/lcd/M73.cpp

@ -40,7 +40,7 @@ void GcodeSuite::M73() {
? parser.value_float() * (PROGRESS_SCALE)
: parser.value_byte()
);
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
#if ENABLED(USE_M73_REMAINING_TIME)
if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong());
#endif
}

10
Marlin/src/inc/Conditionals_LCD.h

@ -220,7 +220,7 @@
#define LCD_PROGRESS_BAR
#endif
#if ENABLED(TFTGLCD_PANEL_I2C)
#define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave addres
#define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave address
#endif
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD, used for both I2C and SPI buses (LiquidTWI2 not required)
#define STD_ENCODER_PULSES_PER_STEP 2
@ -482,10 +482,6 @@
#endif
// Aliases for LCD features
#if EITHER(IS_ULTRA_LCD, EXTENSIBLE_UI)
#define HAS_DISPLAY 1
#endif
#if IS_ULTRA_LCD
#define HAS_WIRED_LCD 1
#if ENABLED(DOGLCD)
@ -497,6 +493,10 @@
#endif
#endif
#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI)
#define HAS_DISPLAY 1
#endif
#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD, GLOBAL_STATUS_MESSAGE)
#define HAS_STATUS_MESSAGE 1
#endif

7
Marlin/src/inc/Conditionals_post.h

@ -3274,10 +3274,9 @@
#endif
#if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS)
#undef PROBING_ESTEPPERS_OFF
#endif
#if BOTH(PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF)
#undef PROBING_ESTEPPERS_OFF
#warning "PROBING_STEPPERS_OFF includes PROBING_ESTEPPERS_OFF. Disabling PROBING_ESTEPPERS_OFF."
#elif ENABLED(PROBING_STEPPERS_OFF)
// PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined
#define PROBING_ESTEPPERS_OFF
#endif
#if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
#define HEATER_IDLE_HANDLER 1

2
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

@ -1321,7 +1321,7 @@ void MarlinUI::draw_status_screen() {
y_map_pixels = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y); // Directions fit nicely
right_edge = pixels_per_x_mesh_pnt * (GRID_MAX_POINTS_X) + 1; // Find location of right edge within the character cell
bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottome line within the character cell
bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottom line within the character cell
n_rows = bottom_line / (HD44780_CHAR_HEIGHT) + 1;
n_cols = right_edge / (HD44780_CHAR_WIDTH) + 1;

13
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp

@ -98,7 +98,7 @@ TFTGLCD lcd;
#define COLOR_EDIT '#'
#define COLOR_ERROR '!'
#ifdef CONVERT_TO_EXT_ASCII //use standart pseudographic symbols in ASCII table
#ifdef CONVERT_TO_EXT_ASCII //use standard pseudographic symbols in ASCII table
#define LR 179 //vertical line
#define TRC 191 //top right corner
#define BLC 192 //bottom left corner
@ -401,7 +401,7 @@ static void center_text_P(PGM_P pstart, uint8_t y) {
//
uint8_t indent = (LCD_WIDTH - 8) / 2;
// symbols 217 (bottom right corner) and 218 (top left corner) are using for letters in some languages
// and they should be moved to begining ASCII table as spetial symbols
// and they should be moved to beginning ASCII table as special symbols
lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str_P(PSTR("------")); lcd.write(TRC);
lcd.setCursor(indent, 1); lcd.write(LR); lcd_put_u8str_P(PSTR("Marlin")); lcd.write(LR);
lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str_P(PSTR("------")); lcd.write(BRC);
@ -733,7 +733,7 @@ Equal to 20x10 text LCD
| |
| HE BED FAN |
| ttc ttc % | ttc - current temperature
| tts tts %%% | tts - setted temperature, %%% - percent for FAN
| tts tts %%% | tts - set temperature, %%% - percent for FAN
| ICO ICO ICO ICO | ICO - icon 48x48, placed in 2 text lines
| ICO ICO ICO ICO | ICO
@ -791,9 +791,10 @@ void MarlinUI::draw_status_screen() {
//
lcd.setCursor(0, 0);
_draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position.x)), blink); lcd.write(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position.y)), blink); lcd.write(' ');
_draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink);
const xyz_pos_t lpos = current_position.asLogical();
_draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); lcd.write(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink); lcd.write(' ');
_draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink);
#if HAS_LEVELING && !HAS_HEATED_BED
lcd.write(planner.leveling_active || blink ? '_' : ' ');

2
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp

@ -447,7 +447,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() {
* data buffer (DDRAM) to be used in conjunction with the graphics
* bitmap buffer (CGRAM). The contents of the graphics buffer is
* XORed with the data from the character generator. This allows
* us to make the progess bar out of graphical data (the bar) and
* us to make the progress bar out of graphical data (the bar) and
* text data (the percentage).
*/
void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) {

2
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp

@ -73,7 +73,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0)
0x00C, // display on, cursor & blink off; 0x08: all off
0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift
0x002, // disable scroll, enable CGRAM adress
0x002, // disable scroll, enable CGRAM address
0x001, // clear RAM, needs 1.6 ms
U8G_ESC_DLY(100), // delay 100 ms

0
Marlin/src/lcd/dwin/e3v2/README.md → Marlin/src/lcd/e3v2/creality/README.md

131
Marlin/src/lcd/dwin/e3v2/dwin.cpp → Marlin/src/lcd/e3v2/creality/dwin.cpp

@ -42,10 +42,6 @@
#define JUST_BABYSTEP 1
#endif
#include <WString.h>
#include <stdio.h>
#include <string.h>
#include "../../fontutils.h"
#include "../../marlinui.h"
@ -85,6 +81,10 @@
#include "../../../feature/powerloss.h"
#endif
#include <WString.h>
#include <stdio.h>
#include <string.h>
#ifndef MACHINE_SIZE
#define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
#endif
@ -97,10 +97,6 @@
#define USE_STRING_HEADINGS
//#define USE_STRING_TITLES
#define DWIN_FONT_MENU font8x16
#define DWIN_FONT_STAT font10x20
#define DWIN_FONT_HEAD font10x20
#define MENU_CHAR_LIMIT 24
#define STATUS_Y 360
@ -135,6 +131,9 @@ constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, // Total rows, and other
#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset)
#define DWIN_BOTTOM (DWIN_HEIGHT-1)
#define DWIN_RIGHT (DWIN_WIDTH-1)
/* Value Init */
HMI_value_t HMI_ValueStruct;
HMI_Flag_t HMI_flag{0};
@ -220,11 +219,11 @@ void HMI_ToggleLanguage() {
void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) {
if (value < 0) {
DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F("-"));
DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F("-"));
DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value);
}
else {
DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F(" "));
DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F(" "));
DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value);
}
}
@ -391,20 +390,20 @@ void ICON_Stop() {
}
}
void Clear_Title_Bar() {
DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, 30);
inline void Clear_Title_Bar() {
DWIN_Draw_Box(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, TITLE_HEIGHT);
}
void Draw_Title(const char * const title) {
DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
}
void Draw_Title(const __FlashStringHelper * title) {
DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
}
void Clear_Menu_Area() {
DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y - 1);
inline void Clear_Menu_Area() {
DWIN_Draw_Box(1, Color_Bg_Black, 0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - TITLE_HEIGHT);
}
void Clear_Main_Window() {
@ -465,7 +464,7 @@ void Erase_Menu_Text(const uint8_t line) {
}
void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) {
if (label) DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label);
if (label) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label);
if (icon) Draw_Menu_Icon(line, icon);
if (more) Draw_More_Icon(line);
}
@ -494,7 +493,8 @@ void Draw_Back_First(const bool is_sel=true) {
if (is_sel) Draw_Menu_Cursor(0);
}
inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valref) {
template <typename T>
inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, T &valref) {
if (encoder_diffState == ENCODER_DIFF_CW)
valref += EncoderRate.encoderMoveValue;
else if (encoder_diffState == ENCODER_DIFF_CCW)
@ -563,7 +563,7 @@ inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valr
//
void DWIN_Draw_Label(const uint16_t y, char *string) {
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, y, string);
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, y, string);
}
void DWIN_Draw_Label(const uint16_t y, const __FlashStringHelper *title) {
DWIN_Draw_Label(y, (char*)title);
@ -577,7 +577,9 @@ void draw_move_en(const uint16_t line) {
#endif
}
void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8); }
inline void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) {
DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8);
}
void Item_Prepare_Move(const uint8_t row) {
if (HMI_IsChinese())
@ -703,7 +705,7 @@ void Item_Prepare_Lang(const uint8_t row) {
DWIN_Frame_AreaCopy(1, 0, 194, 121, 207, LBLX, MBASE(row)); // "Language selection"
#endif
}
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), HMI_IsChinese() ? F("CN") : F("EN"));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), HMI_IsChinese() ? F("CN") : F("EN"));
Draw_Menu_Icon(row, ICON_Language);
}
@ -849,7 +851,7 @@ void Draw_Tune_Menu() {
Clear_Main_Window();
if (HMI_IsChinese()) {
DWIN_Frame_AreaCopy(1, 73, 2, 100, 13, 14, 9);
DWIN_Frame_TitleCopy(1, 73, 2, 100, 13);
DWIN_Frame_AreaCopy(1, 116, 164, 171, 176, LBLX, MBASE(TUNE_CASE_SPEED));
#if HAS_HOTEND
DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TUNE_CASE_TEMP));
@ -883,6 +885,7 @@ void Draw_Tune_Menu() {
#endif
DWIN_Draw_Label(MBASE(TUNE_CASE_ZOFF), GET_TEXT_F(MSG_ZPROBE_ZOFFSET));
#else
DWIN_Frame_TitleCopy(1, 94, 2, 126, 12);
DWIN_Frame_AreaCopy(1, 1, 179, 92, 190, LBLX, MBASE(TUNE_CASE_SPEED)); // Print speed
#if HAS_HOTEND
DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TUNE_CASE_TEMP)); // Hotend...
@ -1008,6 +1011,7 @@ void Draw_Motion_Menu() {
//
// Draw Popup Windows
//
#if HAS_HOTEND || HAS_HEATED_BED
void DWIN_Popup_Temperature(const bool toohigh) {
@ -1021,8 +1025,8 @@ void Draw_Motion_Menu() {
DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature"));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high"));
}
}
else {
@ -1032,8 +1036,8 @@ void Draw_Motion_Menu() {
DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature"));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low"));
}
}
}
@ -1052,11 +1056,11 @@ void Draw_Popup_Bkgd_60() {
DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
if (HMI_IsChinese()) {
DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240);
DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240);
DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 69 + 33, 240);
DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold"));
DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280);
}
}
@ -1073,9 +1077,9 @@ void Popup_Window_Resume() {
DWIN_ICON_Show(ICON, ICON_Continue_C, 146, 307);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print"));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last"));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted."));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted."));
DWIN_ICON_Show(ICON, ICON_Cancel_E, 26, 307);
DWIN_ICON_Show(ICON, ICON_Continue_E, 146, 307);
}
@ -1091,8 +1095,8 @@ void Popup_Window_Home(const bool parking/*=false*/) {
DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ"));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done."));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ"));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done."));
}
}
@ -1107,8 +1111,8 @@ void Popup_Window_Home(const bool parking/*=false*/) {
DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
}
else {
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING));
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done."));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING));
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done."));
}
}
@ -1135,8 +1139,8 @@ void Popup_window_PauseOrStop() {
DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280);
}
else {
if (select_print.now == 1) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT));
else if (select_print.now == 2) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT));
if (select_print.now == 1) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT));
else if (select_print.now == 2) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT));
DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280);
DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280);
}
@ -1160,19 +1164,19 @@ void Draw_Print_ProgressBar() {
DWIN_ICON_Show(ICON, ICON_Bar, 15, 93);
DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, 93, 256, 113);
DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, _card_percent);
DWIN_Draw_String(false, false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%"));
DWIN_Draw_String(false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%"));
}
void Draw_Print_ProgressElapsed() {
duration_t elapsed = print_job_timer.duration(); // print timer
DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 42, 212, elapsed.value / 3600);
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":"));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":"));
DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 66, 212, (elapsed.value % 3600) / 60);
}
void Draw_Print_ProgressRemain() {
DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, _remain_time / 3600);
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":"));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":"));
DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (_remain_time % 3600) / 60);
}
@ -1189,7 +1193,7 @@ void Goto_PrintProcess() {
// Copy into filebuf string before entry
char * const name = card.longest_filename();
const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2;
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, npos, 60, name);
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, npos, 60, name);
DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193);
DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 191);
@ -1204,14 +1208,13 @@ void Goto_MainMenu() {
Clear_Main_Window();
if (HMI_IsChinese()) {
DWIN_Frame_AreaCopy(1, 2, 2, 27, 14, 14, 9); // "Home"
}
if (HMI_IsChinese())
DWIN_Frame_TitleCopy(1, 2, 2, 27, 14); // "Home"
else {
#ifdef USE_STRING_HEADINGS
Draw_Title(GET_TEXT_F(MSG_MAIN));
#else
DWIN_Frame_AreaCopy(1, 0, 2, 39, 12, 14, 9);
DWIN_Frame_TitleCopy(1, 0, 2, 39, 12);
#endif
}
@ -1588,9 +1591,9 @@ void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y,
if (force || changed || draw_qmark || draw_empty) {
if (blink && draw_qmark)
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, x, y, F("???.?"));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F("???.?"));
else if (blink && draw_empty)
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, x, y, F(" "));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F(" "));
else
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, x, y, p * 10);
}
@ -1706,11 +1709,11 @@ void update_variable() {
_offset = BABY_Z_VAR;
if (BABY_Z_VAR < 0) {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -_offset * 100);
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-"));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-"));
}
else {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, _offset * 100);
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" "));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" "));
}
}
@ -1853,7 +1856,7 @@ void Redraw_SD_List() {
}
else {
DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4));
DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media"));
DWIN_Draw_String(false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media"));
}
}
@ -1911,24 +1914,24 @@ void Draw_Status_Area(const bool with_update) {
#if HAS_HOTEND
DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383);
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, thermalManager.wholeDegHotend(0));
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/"));
DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/"));
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0));
DWIN_ICON_Show(ICON, ICON_StepE, 112, 417);
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]);
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%"));
DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%"));
#endif
#if HAS_HEATED_BED
DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416);
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, thermalManager.wholeDegBed());
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/"));
DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/"));
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed());
#endif
DWIN_ICON_Show(ICON, ICON_Speed, 113, 383);
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage);
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%"));
DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%"));
#if HAS_FAN
DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383);
@ -1941,11 +1944,11 @@ void Draw_Status_Area(const bool with_update) {
if (BABY_Z_VAR < 0) {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -BABY_Z_VAR * 100);
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-"));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-"));
}
else {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, BABY_Z_VAR * 100);
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" "));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" "));
}
DWIN_Draw_Rectangle(1, Line_Color, 0, 449, DWIN_WIDTH, 451);
@ -1969,8 +1972,8 @@ void HMI_StartFrame(const bool with_update) {
void Draw_Info_Menu() {
Clear_Main_Window();
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, F(MACHINE_SIZE));
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, F(MACHINE_SIZE));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION));
if (HMI_IsChinese()) {
DWIN_Frame_TitleCopy(1, 30, 17, 57, 29); // "Info"
@ -1990,7 +1993,7 @@ void Draw_Info_Menu() {
DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175);
DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248);
}
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE));
Draw_Back_First();
LOOP_L_N(i, 3) {
@ -4007,7 +4010,7 @@ void EachMomentUpdate() {
//(void)recovery.interrupted_file_exists();
char * const name = card.longest_filename();
const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * (MENU_CHR_W)) / 2;
DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name);
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name);
DWIN_UpdateLCD();
while (recovery_flag) {
@ -4033,7 +4036,7 @@ void EachMomentUpdate() {
Goto_PrintProcess();
Draw_Status_Area(true);
}
#endif
#endif // POWER_LOSS_RECOVERY
DWIN_UpdateLCD();
}
@ -4124,7 +4127,7 @@ void DWIN_CompletedLeveling() {
void DWIN_StatusChanged(const char *text) {
DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20);
const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(text) * MENU_CHR_W) / 2;
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text));
DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text));
DWIN_UpdateLCD();
}
@ -4136,8 +4139,8 @@ void DWIN_StatusChanged_P(PGM_P const pstr) {
// GUI extension
void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) {
DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " "));
DWIN_Draw_Rectangle(0,color,x+2,y+2,x+17,y+17);
DWIN_Draw_String(true, font8x16, Select_Color, bcolor, x + 4, y, F(mode ? "x" : " "));
DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17);
}
#endif // DWIN_CREALITY_LCD

148
Marlin/src/lcd/dwin/e3v2/dwin.h → Marlin/src/lcd/e3v2/creality/dwin.h

@ -25,7 +25,7 @@
* DWIN by Creality3D
*/
#include "../dwin_lcd.h"
#include "dwin_lcd.h"
#include "rotary_encoder.h"
#include "../../../libs/BL24CXX.h"
@ -103,151 +103,6 @@ enum processID : uint8_t {
Popup_Window
};
// Picture ID
#define Start_Process 0
#define Language_English 1
#define Language_Chinese 2
// ICON ID
#define ICON 0x09
#define ICON_LOGO 0
#define ICON_Print_0 1
#define ICON_Print_1 2
#define ICON_Prepare_0 3
#define ICON_Prepare_1 4
#define ICON_Control_0 5
#define ICON_Control_1 6
#define ICON_Leveling_0 7
#define ICON_Leveling_1 8
#define ICON_HotendTemp 9
#define ICON_BedTemp 10
#define ICON_Speed 11
#define ICON_Zoffset 12
#define ICON_Back 13
#define ICON_File 14
#define ICON_PrintTime 15
#define ICON_RemainTime 16
#define ICON_Setup_0 17
#define ICON_Setup_1 18
#define ICON_Pause_0 19
#define ICON_Pause_1 20
#define ICON_Continue_0 21
#define ICON_Continue_1 22
#define ICON_Stop_0 23
#define ICON_Stop_1 24
#define ICON_Bar 25
#define ICON_More 26
#define ICON_Axis 27
#define ICON_CloseMotor 28
#define ICON_Homing 29
#define ICON_SetHome 30
#define ICON_PLAPreheat 31
#define ICON_ABSPreheat 32
#define ICON_Cool 33
#define ICON_Language 34
#define ICON_MoveX 35
#define ICON_MoveY 36
#define ICON_MoveZ 37
#define ICON_Extruder 38
#define ICON_Temperature 40
#define ICON_Motion 41
#define ICON_WriteEEPROM 42
#define ICON_ReadEEPROM 43
#define ICON_ResumeEEPROM 44
#define ICON_Info 45
#define ICON_SetEndTemp 46
#define ICON_SetBedTemp 47
#define ICON_FanSpeed 48
#define ICON_SetPLAPreheat 49
#define ICON_SetABSPreheat 50
#define ICON_MaxSpeed 51
#define ICON_MaxAccelerated 52
#define ICON_MaxJerk 53
#define ICON_Step 54
#define ICON_PrintSize 55
#define ICON_Version 56
#define ICON_Contact 57
#define ICON_StockConfiguraton 58
#define ICON_MaxSpeedX 59
#define ICON_MaxSpeedY 60
#define ICON_MaxSpeedZ 61
#define ICON_MaxSpeedE 62
#define ICON_MaxAccX 63
#define ICON_MaxAccY 64
#define ICON_MaxAccZ 65
#define ICON_MaxAccE 66
#define ICON_MaxSpeedJerkX 67
#define ICON_MaxSpeedJerkY 68
#define ICON_MaxSpeedJerkZ 69
#define ICON_MaxSpeedJerkE 70
#define ICON_StepX 71
#define ICON_StepY 72
#define ICON_StepZ 73
#define ICON_StepE 74
#define ICON_Setspeed 75
#define ICON_SetZOffset 76
#define ICON_Rectangle 77
#define ICON_BLTouch 78
#define ICON_TempTooLow 79
#define ICON_AutoLeveling 80
#define ICON_TempTooHigh 81
#define ICON_NoTips_C 82
#define ICON_NoTips_E 83
#define ICON_Continue_C 84
#define ICON_Continue_E 85
#define ICON_Cancel_C 86
#define ICON_Cancel_E 87
#define ICON_Confirm_C 88
#define ICON_Confirm_E 89
#define ICON_Info_0 90
#define ICON_Info_1 91
#define ICON_AdvSet ICON_Language
#define ICON_HomeOff ICON_AdvSet
#define ICON_HomeOffX ICON_StepX
#define ICON_HomeOffY ICON_StepY
#define ICON_HomeOffZ ICON_StepZ
#define ICON_ProbeOff ICON_AdvSet
#define ICON_ProbeOffX ICON_StepX
#define ICON_ProbeOffY ICON_StepY
#define ICON_PIDNozzle ICON_SetEndTemp
#define ICON_PIDbed ICON_SetBedTemp
/**
* 3-.0The font size, 0x00-0x09, corresponds to the font size below:
* 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28
* 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64
*/
#define font6x12 0x00
#define font8x16 0x01
#define font10x20 0x02
#define font12x24 0x03
#define font14x28 0x04
#define font16x32 0x05
#define font20x40 0x06
#define font24x48 0x07
#define font28x56 0x08
#define font32x64 0x09
// Color
#define Color_White 0xFFFF
#define Color_Yellow 0xFF0F
#define Color_Bg_Window 0x31E8 // Popup background color
#define Color_Bg_Blue 0x1125 // Dark blue background color
#define Color_Bg_Black 0x0841 // Black background color
#define Color_Bg_Red 0xF00F // Red background color
#define Popup_Text_Color 0xD6BA // Popup font background color
#define Line_Color 0x3A6A // Split line color
#define Rectangle_Color 0xEE2F // Blue square cursor color
#define Percent_Color 0xFE29 // Percentage color
#define BarFill_Color 0x10E4 // Fill color of progress bar
#define Select_Color 0x33BB // Selected color
extern uint8_t checkkey;
extern float zprobe_zoffset;
extern char print_filename[16];
@ -360,6 +215,7 @@ void HMI_MaxFeedspeedXYZE();
void HMI_MaxAccelerationXYZE();
void HMI_MaxJerkXYZE();
void HMI_StepXYZE();
void HMI_SetLanguageCache();
void update_variable();
void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value);

29
Marlin/src/lcd/dwin/dwin_lcd.cpp → Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp

@ -21,24 +21,24 @@
*/
/********************************************************************************
* @file dwin_lcd.cpp
* @file lcd/e3v2/creality/dwin_lcd.cpp
* @author LEO / Creality3D
* @date 2019/07/18
* @version 2.0.1
* @brief DWIN screen control functions
********************************************************************************/
#include "../../inc/MarlinConfigPre.h"
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(DWIN_CREALITY_LCD)
#include "../../inc/MarlinConfig.h"
#include "../../../inc/MarlinConfig.h"
#include "dwin_lcd.h"
#include <string.h> // for memset
//#define DEBUG_OUT 1
#include "../../core/debug_out.h"
#include "../../../core/debug_out.h"
// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail.
// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters.
@ -122,6 +122,17 @@ bool DWIN_Handshake(void) {
&& databuf[3] == 'K' );
}
void DWIN_Startup(void) {
DEBUG_ECHOPGM("\r\nDWIN handshake ");
delay(750); // Delay here or init later in the boot process
if (DWIN_Handshake()) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error.");
DWIN_Frame_SetDir(1);
#if DISABLED(SHOW_BOOTSCREEN)
DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here
#endif
DWIN_UpdateLCD();
}
// Set the backlight luminance
// luminance: (0x00-0xFF)
void DWIN_Backlight_SetLuminance(const uint8_t luminance) {
@ -164,9 +175,10 @@ void DWIN_Frame_Clear(const uint16_t color) {
// width: point width 0x01-0x0F
// height: point height 0x01-0x0F
// x,y: upper left point
void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y) {
void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) {
size_t i = 0;
DWIN_Byte(i, 0x02);
DWIN_Word(i, color);
DWIN_Byte(i, width);
DWIN_Byte(i, height);
DWIN_Word(i, x);
@ -238,8 +250,8 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
// bColor: Background color
// x/y: Upper-left coordinate of the string
// *string: The string
void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size,
uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) {
void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) {
uint8_t widthAdjust = 0;
size_t i = 0;
DWIN_Byte(i, 0x11);
// Bit 7: widthAdjust
@ -356,6 +368,7 @@ void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) {
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_Byte(i, 0x80 | libID);
//DWIN_Byte(i, libID);
DWIN_Byte(i, picID);
DWIN_Send(i);
}
@ -421,7 +434,7 @@ void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t pi
// state: 16 bits, each bit is the state of an animation id
void DWIN_ICON_AnimationControl(uint16_t state) {
size_t i = 0;
DWIN_Byte(i, 0x28);
DWIN_Byte(i, 0x29);
DWIN_Word(i, state);
DWIN_Send(i);
}

168
Marlin/src/lcd/dwin/dwin_lcd.h → Marlin/src/lcd/e3v2/creality/dwin_lcd.h

@ -42,6 +42,163 @@
#define DWIN_WIDTH 272
#define DWIN_HEIGHT 480
// Character matrix width x height
//#define LCD_WIDTH ((DWIN_WIDTH) / 8)
//#define LCD_HEIGHT ((DWIN_HEIGHT) / 12)
// Picture ID
#define DWIN_Boot_Screen 0
#define Language_English 1
#define Language_Chinese 2
// ICON ID
#define ICON 0x09
#define ICON_LOGO 0
#define ICON_Print_0 1
#define ICON_Print_1 2
#define ICON_Prepare_0 3
#define ICON_Prepare_1 4
#define ICON_Control_0 5
#define ICON_Control_1 6
#define ICON_Leveling_0 7
#define ICON_Leveling_1 8
#define ICON_HotendTemp 9
#define ICON_BedTemp 10
#define ICON_Speed 11
#define ICON_Zoffset 12
#define ICON_Back 13
#define ICON_File 14
#define ICON_PrintTime 15
#define ICON_RemainTime 16
#define ICON_Setup_0 17
#define ICON_Setup_1 18
#define ICON_Pause_0 19
#define ICON_Pause_1 20
#define ICON_Continue_0 21
#define ICON_Continue_1 22
#define ICON_Stop_0 23
#define ICON_Stop_1 24
#define ICON_Bar 25
#define ICON_More 26
#define ICON_Axis 27
#define ICON_CloseMotor 28
#define ICON_Homing 29
#define ICON_SetHome 30
#define ICON_PLAPreheat 31
#define ICON_ABSPreheat 32
#define ICON_Cool 33
#define ICON_Language 34
#define ICON_MoveX 35
#define ICON_MoveY 36
#define ICON_MoveZ 37
#define ICON_Extruder 38
#define ICON_Temperature 40
#define ICON_Motion 41
#define ICON_WriteEEPROM 42
#define ICON_ReadEEPROM 43
#define ICON_ResumeEEPROM 44
#define ICON_Info 45
#define ICON_SetEndTemp 46
#define ICON_SetBedTemp 47
#define ICON_FanSpeed 48
#define ICON_SetPLAPreheat 49
#define ICON_SetABSPreheat 50
#define ICON_MaxSpeed 51
#define ICON_MaxAccelerated 52
#define ICON_MaxJerk 53
#define ICON_Step 54
#define ICON_PrintSize 55
#define ICON_Version 56
#define ICON_Contact 57
#define ICON_StockConfiguraton 58
#define ICON_MaxSpeedX 59
#define ICON_MaxSpeedY 60
#define ICON_MaxSpeedZ 61
#define ICON_MaxSpeedE 62
#define ICON_MaxAccX 63
#define ICON_MaxAccY 64
#define ICON_MaxAccZ 65
#define ICON_MaxAccE 66
#define ICON_MaxSpeedJerkX 67
#define ICON_MaxSpeedJerkY 68
#define ICON_MaxSpeedJerkZ 69
#define ICON_MaxSpeedJerkE 70
#define ICON_StepX 71
#define ICON_StepY 72
#define ICON_StepZ 73
#define ICON_StepE 74
#define ICON_Setspeed 75
#define ICON_SetZOffset 76
#define ICON_Rectangle 77
#define ICON_BLTouch 78
#define ICON_TempTooLow 79
#define ICON_AutoLeveling 80
#define ICON_TempTooHigh 81
#define ICON_NoTips_C 82
#define ICON_NoTips_E 83
#define ICON_Continue_C 84
#define ICON_Continue_E 85
#define ICON_Cancel_C 86
#define ICON_Cancel_E 87
#define ICON_Confirm_C 88
#define ICON_Confirm_E 89
#define ICON_Info_0 90
#define ICON_Info_1 91
#define ICON_AdvSet ICON_Language
#define ICON_HomeOff ICON_AdvSet
#define ICON_HomeOffX ICON_StepX
#define ICON_HomeOffY ICON_StepY
#define ICON_HomeOffZ ICON_StepZ
#define ICON_ProbeOff ICON_AdvSet
#define ICON_ProbeOffX ICON_StepX
#define ICON_ProbeOffY ICON_StepY
#define ICON_PIDNozzle ICON_SetEndTemp
#define ICON_PIDbed ICON_SetBedTemp
/**
* 3-.0The font size, 0x00-0x09, corresponds to the font size below:
* 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28
* 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64
*/
#define font6x12 0x00
#define font8x16 0x01
#define font10x20 0x02
#define font12x24 0x03
#define font14x28 0x04
#define font16x32 0x05
#define font20x40 0x06
#define font24x48 0x07
#define font28x56 0x08
#define font32x64 0x09
#define DWIN_FONT_MENU font10x20
#define DWIN_FONT_STAT font10x20
#define DWIN_FONT_HEAD font10x20
#define DWIN_FONT_ALERT font14x28
// Color
#define Color_White 0xFFFF
#define Color_Yellow 0xFF0F
#define Color_Error_Red 0xB000 // Error!
#define Color_Bg_Red 0xF00F // Red background color
#define Color_Bg_Window 0x31E8 // Popup background color
#define Color_Bg_Blue 0x1125 // Dark blue background color
#define Color_Bg_Black 0x0841 // Black background color
#define Color_IconBlue 0x45FA // Lighter blue that matches icons/accents
#define Popup_Text_Color 0xD6BA // Popup font background color
#define Line_Color 0x3A6A // Split line color
#define Rectangle_Color 0xEE2F // Blue square cursor color
#define Percent_Color 0xFE29 // Percentage color
#define BarFill_Color 0x10E4 // Fill color of progress bar
#define Select_Color 0x33BB // Selected color
/*-------------------------------------- System variable function --------------------------------------*/
// Handshake (1: Success, 0: Fail)
@ -68,10 +225,11 @@ void DWIN_UpdateLCD(void);
void DWIN_Frame_Clear(const uint16_t color);
// Draw a point
// color: point color
// width: point width 0x01-0x0F
// height: point height 0x01-0x0F
// x,y: upper left point
void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y);
void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y);
// Draw a line
// color: Line segment color
@ -125,20 +283,18 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
/*---------------------------------------- Text related functions ----------------------------------------*/
// Draw a string
// widthAdjust: true=self-adjust character width; false=no adjustment
// bShow: true=display background color; false=don't display background color
// size: Font size
// color: Character color
// bColor: Background color
// x/y: Upper-left coordinate of the string
// *string: The string
void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size,
uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string);
void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string);
class __FlashStringHelper;
inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, (char *)title);
inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
DWIN_Draw_String(bShow, size, color, bColor, x, y, (char *)title);
}
// Draw a positive integer

2
Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp → Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp

@ -21,7 +21,7 @@
*/
/*****************************************************************************
* @file rotary_encoder.cpp
* @file lcd/e3v2/creality/rotary_encoder.cpp
* @author LEO / Creality3D
* @date 2019/07/06
* @version 2.0.1

2
Marlin/src/lcd/dwin/e3v2/rotary_encoder.h → Marlin/src/lcd/e3v2/creality/rotary_encoder.h

@ -22,7 +22,7 @@
#pragma once
/*****************************************************************************
* @file rotary_encoder.h
* @file lcd/e3v2/creality/rotary_encoder.h
* @author LEO / Creality3D
* @date 2019/07/06
* @version 2.0.1

6
Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp

@ -208,7 +208,7 @@ void ChironTFT::ConfirmationRequest(const char * const msg) {
case AC_printer_resuming_from_power_outage:
case AC_printer_printing:
case AC_printer_paused: {
// Heater timout, send acknowledgement
// Heater timeout, send acknowledgement
if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) {
pause_state = AC_paused_heater_timed_out;
SendtoTFTLN(AC_msg_paused); // enable continue button
@ -248,7 +248,7 @@ void ChironTFT::StatusChange(const char * const msg) {
printer_state = AC_printer_idle;
msg_matched = true;
}
// If probing fails dont save the mesh raise the probe above the bad point
// If probing fails don't save the mesh raise the probe above the bad point
if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) {
PlayTune(BEEPER_PIN, BeepBeepBeeep, 1);
injectCommands_P(PSTR("G1 Z50 F500"));
@ -622,7 +622,7 @@ void ChironTFT::PanelAction(uint8_t req) {
break;
case 14: { // A14 Start Printing
// Allows printer to restart the job if we dont want to recover
// Allows printer to restart the job if we don't want to recover
if (printer_state == AC_printer_resuming_from_power_outage) {
injectCommands_P(PSTR("M1000 C")); // Cancel recovery
printer_state = AC_printer_idle;

2
Marlin/src/lcd/extui/dgus/DGUSDisplay.h

@ -93,7 +93,7 @@ public:
// Helper for users of this class to estimate if an interaction would be blocking.
static size_t GetFreeTxBuffer();
// Checks two things: Can we confirm the presence of the display and has we initiliazed it.
// Checks two things: Can we confirm the presence of the display and has we initialized it.
// (both boils down that the display answered to our chatting)
static inline bool isInitialized() { return Initialized; }

2
Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp

@ -466,7 +466,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
// Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },

2
Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h

@ -282,7 +282,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710;
constexpr uint16_t VP_BED_PID_I = 0x3712;
constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
// Waiting screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...

2
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp

@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode.
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;

2
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h

@ -36,7 +36,7 @@ public:
static bool loop();
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);

2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp

@ -465,7 +465,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
// Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },

2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h

@ -278,7 +278,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710;
constexpr uint16_t VP_BED_PID_I = 0x3712;
constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
// Waiting screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...

2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp

@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode.
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;

2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h

@ -36,7 +36,7 @@ public:
static bool loop();
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);

2
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp

@ -785,7 +785,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
// Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content.
//{.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
//{.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
//{.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},

2
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h

@ -266,7 +266,7 @@ constexpr uint16_t VP_MOVE_OPTION = 0x3500;
// constexpr uint16_t VP_BED_PID_I = 0x3712;
// constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
// Waiting screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...

2
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp

@ -762,7 +762,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
return;
char axiscode;
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode.
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) { // switch X Y Z or Home
default: return;

2
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h

@ -36,7 +36,7 @@ public:
static bool loop();
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);

2
Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp

@ -267,7 +267,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
// Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },

2
Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h

@ -268,7 +268,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710;
constexpr uint16_t VP_BED_PID_I = 0x3712;
constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
// Waiting screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...

2
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp

@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode.
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;

2
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h

@ -36,7 +36,7 @@ public:
static bool loop();
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp

@ -206,7 +206,7 @@ bool UIFlashStorage::is_present = false;
/* In order to provide some degree of wear leveling, each data write to the
* SPI Flash chip is appended to data that was already written before, until
* the data storage area is completely filled. New data is written preceeded
* the data storage area is completely filled. New data is written preceded
* with a 32-bit delimiter 'LULZ', so that we can distinguish written and
* unwritten data:
*

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp

@ -1079,7 +1079,7 @@ void CLCD::CommandFifo::str(progmem_str data) {
void CLCD::init() {
spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control
ftdi_reset(); // Power down/up the FT8xx with the apropriate delays
ftdi_reset(); // Power down/up the FT8xx with the appropriate delays
host_cmd(Use_Crystal ? CLKEXT : CLKINT, 0);
host_cmd(FTDI::ACTIVE, 0); // Activate the System Clock

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h

@ -70,7 +70,7 @@
*
* CommandFifo::fgcolor Set Graphic Item Foreground Color *
* CommandFifo::bgcolor Set Graphic Item Background Color *
* CommandFifo::begin() Begin Drawing a Primative *
* CommandFifo::begin() Begin Drawing a Primitive *
* CommandFifo::mem_copy() Copy a Block of Memory *
* CommandFifo::append() Append Commands to Current DL *
* CommandFifo::gradient_color() Set 3D Button Highlight Color *

4
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h

@ -65,7 +65,7 @@ class CommandProcessor : public CLCD::CommandFifo {
uint8_t _style = 0;
protected:
// Returns the cannonical thickness of a widget (i.e. the height of a toggle element)
// Returns the canonical thickness of a widget (i.e. the height of a toggle element)
uint16_t widget_thickness() {
CLCD::FontMetrics fm(_font);
return fm.height * 20.0/16;
@ -249,7 +249,7 @@ class CommandProcessor : public CLCD::CommandFifo {
return toggle(x, y, w, h, text, state, options);
}
// Contrained drawing routines. These constrain the widget inside a box for easier layout.
// Constrained drawing routines. These constrain the widget inside a box for easier layout.
// The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time.
FORCEDINLINE CommandProcessor& track_linear(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) {

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp

@ -108,7 +108,7 @@ namespace FTDI {
* - Dispatches onTouchStart and onTouchEnd events to the active screen.
* - Handles auto-repetition by sending onTouchHeld to the active screen periodically.
* - Plays touch feedback "click" sounds when appropriate.
* - Performs debouncing to supress spurious touch events.
* - Performs debouncing to suppress spurious touch events.
*/
void EventLoop::process_events() {
// If the LCD is processing commands, don't check

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h

@ -272,7 +272,7 @@ class GenericPolyUI {
if (clip) {
// Clipping reduces the number of pixels that are
// filled, allowing more complex shapes to be drawn
// in the alloted time.
// in the allotted time.
bounds(r, x, y, w, h);
cmd.cmd(SAVE_CONTEXT());
cmd.cmd(SCISSOR_XY(x, y));

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h

@ -41,7 +41,7 @@
* ...
* p.end_fill();
*
* Based on the example from "Applicaton Note AN_334, FT801 Polygon Application":
* Based on the example from "Application Note AN_334, FT801 Polygon Application":
*
* https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf
*/

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h

@ -152,7 +152,7 @@ class UIScreen {
#define AT_SCREEN(screen) (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw))
#define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw))
/************************** CACHED VS UNCHACHED SCREENS ***************************/
/************************** CACHED VS UNCACHED SCREENS ***************************/
class UncachedScreen {
public:

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h

@ -28,7 +28,7 @@
/* tiny_interval_t downsamples a 32-bit millis() value
into a 8-bit value which can record periods of
a few seconds with a rougly 1/16th of second
a few seconds with a roughly 1/16th of second
resolution. This allows us to measure small
intervals without needing to use four-byte counters.
*/

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py

@ -164,7 +164,7 @@ class Parser:
def process_svg_path_data_cmd(self, id, cmd, a, b):
"""Converts the various types of moves into L or M commands
and dispatches to process_svg_path_L_or_M for futher processing."""
and dispatches to process_svg_path_L_or_M for further processing."""
if cmd == "Z" or cmd == "z":
self.process_svg_path_L_or_M("L", self.initial_x, self.initial_y)
elif cmd == "H":

4
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h

@ -44,8 +44,8 @@ class LockScreen : public BaseScreen, public CachedScreen<LOCK_SCREEN_CACHE> {
static void enable();
static void disable();
static void set_hash(uint16_t pass) {passcode = pass;};
static uint16_t get_hash() {return passcode;};
static void set_hash(uint16_t pass) { passcode = pass; }
static uint16_t get_hash() { return passcode; }
static void onEntry();
static void onRedraw(draw_mode_t);

2
Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp

@ -204,7 +204,7 @@ void SPIFlashStorage::flushPage() {
return;
}
// Part of the m_pageData was compressed, so ajust the pointers, freeing what was processed, shift the buffer
// Part of the m_pageData was compressed, so adjust the pointers, freeing what was processed, shift the buffer
// TODO: To avoid this copy, use a circular buffer
memmove(m_pageData, m_pageData + inputProcessed, m_pageDataUsed - inputProcessed);
m_pageDataUsed -= inputProcessed;

2
Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h

@ -55,7 +55,7 @@
*
* When reading, it loads a full page from SPI Flash at once and
* keeps it in a private SRAM buffer. Data is loaded as needed to
* fullfill requests. Sequential reads are optimal.
* fulfill requests. Sequential reads are optimal.
*
* SPIFlashStorage.beginRead(myStartAddress);
* while (there is data to read)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save