Remove DOGM bottom horizontal line/separator (#18273)

This commit is contained in:
Tanguy Pruvot 2020-06-13 23:33:08 +02:00 committed by GitHub
parent 62db10919a
commit 7db3391524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -552,7 +552,6 @@ static const uint16_t ili9341_init[] = {
void drawImage(const uint8_t *data, u8g_t *u8g, u8g_dev_t *dev, uint16_t length, uint16_t height, uint16_t color) { void drawImage(const uint8_t *data, u8g_t *u8g, u8g_dev_t *dev, uint16_t length, uint16_t height, uint16_t color) {
uint16_t buffer[BUTTON_SIZE_X * sq(FSMC_UPSCALE)]; uint16_t buffer[BUTTON_SIZE_X * sq(FSMC_UPSCALE)];
//NOTE: the buffer are sized for max 32 lenght! If you need draw bigger things with this function, we need increase the buffer
if (length > BUTTON_SIZE_X) return; if (length > BUTTON_SIZE_X) return;
for (uint16_t i = 0; i < height; i++) { for (uint16_t i = 0; i < height; i++) {
@ -620,7 +619,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
setWindow = setWindow_ili9328; setWindow = setWindow_ili9328;
break; break;
case 0x9341: // ILI9341 case 0x9341: // ILI9341
case 0x8066: // ILI9341 Anycubic / TronXY TFTs case 0x8066: // Anycubic / TronXY TFTs (480x320)
#ifdef LCD_USE_DMA_FSMC #ifdef LCD_USE_DMA_FSMC
writeEscSequence(ili9341_init); writeEscSequence(ili9341_init);
#else #else
@ -657,18 +656,8 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
u8g_WriteSequence(u8g, dev, 160, (uint8_t *)buffer); u8g_WriteSequence(u8g, dev, 160, (uint8_t *)buffer);
#endif #endif
// bottom line and buttons // Bottom buttons
#if ENABLED(TOUCH_BUTTONS) #if ENABLED(TOUCH_BUTTONS)
setWindow(u8g, dev, BUTTOND_X_LO - 4, BUTTON_Y_LO - 5, BUTTONC_X_HI + BUFSIZE + 4, BUTTON_Y_LO - 4);
#ifdef LCD_USE_DMA_FSMC
LCD_IO_WriteMultiple(TFT_DISABLED_COLOR, 600 / 2 * FSMC_UPSCALE);
#else
memset2(buffer, TFT_DISABLED_COLOR, 150);
for (uint8_t i = 8; i--;)
u8g_WriteSequence(u8g, dev, 150, (uint8_t *)buffer);
#endif
setWindow(u8g, dev, BUTTOND_X_LO, BUTTON_Y_LO, BUTTOND_X_HI, BUTTON_Y_HI); setWindow(u8g, dev, BUTTOND_X_LO, BUTTON_Y_LO, BUTTOND_X_HI, BUTTON_Y_HI);
drawImage(buttonD, u8g, dev, 32, 20, TFT_BTCANCEL_COLOR); drawImage(buttonD, u8g, dev, 32, 20, TFT_BTCANCEL_COLOR);