Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sapphire PRO config (TMC2208 + LV8729), minimal LCD FIX. #2

Merged
merged 2 commits into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 79 additions & 72 deletions Marlin/Configuration.h

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@
#define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing
#define HOMING_BACKOFF_MM { 10, 10, 10 } // (mm) Move away from the endstops after homing

// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
Expand Down Expand Up @@ -748,7 +748,7 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0

//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated

// Minimum time that a segment needs to take if the buffer is emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (ms)
Expand Down Expand Up @@ -858,7 +858,7 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
#define ADAPTIVE_STEP_SMOOTHING

/**
* Custom Microstepping
Expand Down Expand Up @@ -953,7 +953,7 @@
#if HAS_LCD_MENU

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
#define LCD_INFO_MENU
#if ENABLED(LCD_INFO_MENU)
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
#endif
Expand Down Expand Up @@ -1104,7 +1104,7 @@
#endif

// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
#define LONG_FILENAME_HOST_SUPPORT

// Enable this option to scroll long filenames in the SD card menu
//#define SCROLL_LONG_FILENAMES
Expand Down Expand Up @@ -1218,18 +1218,18 @@
//#define DOGM_SD_PERCENT

// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
//#define XYZ_HOLLOW_FRAME

// Enable to save many cycles by drawing a hollow frame on Menu Screens
#define MENU_HOLLOW_FRAME
//#define MENU_HOLLOW_FRAME

// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_BIG_EDIT_FONT
#define USE_BIG_EDIT_FONT

// A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_SMALL_INFOFONT
#define USE_SMALL_INFOFONT

// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
Expand Down Expand Up @@ -1272,9 +1272,9 @@
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#define STATUS_HEAT_PERCENT // Show heating in a progress bar
//#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM.
#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM.

// Frivolous Game Options
//#define MARLIN_BRICKOUT
Expand Down Expand Up @@ -1500,7 +1500,7 @@
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
*/
//#define LIN_ADVANCE
#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
#define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
Expand Down Expand Up @@ -1719,13 +1719,13 @@
// For debug-echo: 128 bytes for the optimal speed.
// Other output doesn't need to be that speedy.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#define TX_BUFFER_SIZE 0
#define TX_BUFFER_SIZE 32

// Host Receive Buffer Size
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
// To use flow control, set this buffer size to at least 1024 bytes.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
//#define RX_BUFFER_SIZE 1024
#define RX_BUFFER_SIZE 1024

#if RX_BUFFER_SIZE >= 1024
// Enable to have the controller send XON/XOFF control characters to
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/touch/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ uint8_t XPT2046::read_buttons() {
y = uint16_t(((uint32_t(getInTouch(XPT2046_Y))) * tsoffsets[2]) >> 16) + tsoffsets[3];
if (!isTouched()) return 0; // Fingers must still be on the TS for a valid read.

if (y < 175 || y > 234) return 0;
if (y < 165 || y > 234) return 0;

return WITHIN(x, 14, 77) ? EN_D
: WITHIN(x, 90, 153) ? EN_A
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
#endif

// FSMC/SPI TFT Panels
#if ENABLED(FSMC_GRAPHICAL_TFT)
#if ENABLED(FSMC_GRAPHICAL_TFT) || ENABLED(SAPPHIRE_GRAPHICAL_TFT)
#define DOGLCD
#define IS_ULTIPANEL
#define DELAYED_BACKLIGHT_INIT
Expand Down
11 changes: 11 additions & 0 deletions Marlin/src/lcd/dogm/HAL_LCD_class_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ class U8GLIB_TFT_320X240_UPSCALE_FROM_128X64 : public U8GLIB {
{ }
};

//
// Very basic support for 480x320 TFT screen
//
extern u8g_dev_t u8g_dev_tft_480x320_upscale_from_128x64;

class U8GLIB_TFT_480X320_UPSCALE_FROM_128X64 : public U8GLIB {
public:
U8GLIB_TFT_480X320_UPSCALE_FROM_128X64(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE)
: U8GLIB(&u8g_dev_tft_480x320_upscale_from_128x64, cs, rs, reset)
{ }
};

extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi;

Expand Down
Loading