Skip to content

Commit

Permalink
Additional fixups for Creality DWIN PR
Browse files Browse the repository at this point in the history
  • Loading branch information
The-EG committed Jun 13, 2021
1 parent 8e7e2c4 commit 48fb212
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Marlin/src/lcd/dwin/marlin/ultralcd_dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
else {
#if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
if (!TEST(axis_known_position, axis))
if (!TEST(axis_trusted, axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else
#endif
Expand Down Expand Up @@ -176,9 +176,9 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const char prefi
#else
const bool is_idle = (
#if HAS_HEATED_BED
isBed ? thermalManager.bed_idle.timed_out :
isBed ? thermalManager.heater_idle[thermalManager.idle_index_for_id(H_BED)].timed_out :
#endif
thermalManager.hotend_idle[heater].timed_out
thermalManager.heater_idle[thermalManager.idle_index_for_id(heater)].timed_out
);

if (!blink && is_idle) {
Expand All @@ -199,9 +199,9 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const char prefi

FORCE_INLINE void _draw_bed_status(const bool blink) {
_draw_heater_status(H_BED, (
#if HAS_LEVELING
planner.leveling_active && blink ? '_' :
#endif
//#if HAS_LEVELING
// planner.leveling_active && blink ? '_' :
//#endif
'B'
),
blink
Expand Down Expand Up @@ -589,7 +589,7 @@ void MarlinUI::draw_status_screen() {
lcd_put_u8str(i16tostr3rj(thermalManager.degHotend(extruder)));
lcd_put_wchar('/');

if (get_blink() || !thermalManager.hotend_idle[extruder].timed_out)
if (get_blink() || !thermalManager.heater_idle[thermalManager.idle_index_for_id(extruder)].timed_out)
lcd_put_u8str(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
}

Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/lcd/lcdprint.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@
#define LCD_COL_X(col) (col)
#define LCD_ROW_Y(row) (row)

#define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row))
#define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row))

#endif

#define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len))
#define LCD_BOTTOM_ROW (LCD_PIXEL_HEIGHT - 1)
#define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row))
#define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row))

#define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr)
#define SETCURSOR_X_RJ(len) SETCURSOR_RJ(len, _lcdLineNr)

Expand Down
4 changes: 3 additions & 1 deletion ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ HAS_MARLINUI_U8GLIB = U8glib-HAL@~0.4.5
HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+<src/HAL/STM32/tft> +<src/HAL/STM32F1/tft> +<src/lcd/tft_io>
HAS_FSMC_TFT = src_filter=+<src/HAL/STM32/tft/tft_fsmc.cpp> +<src/HAL/STM32F1/tft/tft_fsmc.cpp>
HAS_SPI_TFT = src_filter=+<src/HAL/STM32/tft/tft_spi.cpp> +<src/HAL/STM32F1/tft/tft_spi.cpp>
DWIN_.+ = src_filter=+<src/lcd/dwin>
DWIN_CREALITY_LCD = src_filter=+<src/lcd/dwin/e3v2>
DWIN_MARLINUI_.+ = src_filter=+<src/lcd/dwin/marlin>
I2C_EEPROM = src_filter=+<src/HAL/shared/eeprom_if_i2c.cpp>
SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/master.zip
SPI_EEPROM = src_filter=+<src/HAL/shared/eeprom_if_spi.cpp>
HAS_GRAPHICAL_TFT = src_filter=+<src/lcd/tft>
DWIN_CREALITY_LCD = src_filter=+<src/lcd/dwin>
IS_TFTGLCD_PANEL = src_filter=+<src/lcd/TFTGLCD>
HAS_TOUCH_BUTTONS = src_filter=+<src/lcd/touch/touch_buttons.cpp>
HAS_LCD_MENU = src_filter=+<src/lcd/menu>
Expand Down

0 comments on commit 48fb212

Please sign in to comment.