From 64800642a11893922afd53d274393e8f1827f1ad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Nov 2020 20:49:42 -0600 Subject: [PATCH] General cleanup --- Marlin/src/feature/bedlevel/abl/abl.cpp | 2 +- Marlin/src/feature/power_monitor.cpp | 4 +- Marlin/src/feature/power_monitor.h | 4 +- .../src/gcode/feature/controllerfan/M710.cpp | 4 +- .../src/gcode/feature/power_monitor/M430.cpp | 4 +- Marlin/src/lcd/menu/menu_power_monitor.cpp | 4 +- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 2 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 61 +++++++++---------- 8 files changed, 41 insertions(+), 44 deletions(-) diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index 44e4fc38a1bd..3fb0cfc3583e 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -168,7 +168,7 @@ void print_bilinear_leveling_grid() { // cancelled out in bed_level_virt_cmr and does not impact the result. Return 0.0 rather than // making this function more complex by extrapolating two points. return 0.0; - } + } if (!x || x == ABL_TEMP_POINTS_X - 1) { if (x) { ep = GRID_MAX_POINTS_X - 1; diff --git a/Marlin/src/feature/power_monitor.cpp b/Marlin/src/feature/power_monitor.cpp index e1e7324fb6c6..97c4a933637e 100644 --- a/Marlin/src/feature/power_monitor.cpp +++ b/Marlin/src/feature/power_monitor.cpp @@ -1,9 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/feature/power_monitor.h b/Marlin/src/feature/power_monitor.h index a0eaf353f4c7..f378ee2a107c 100644 --- a/Marlin/src/feature/power_monitor.h +++ b/Marlin/src/feature/power_monitor.h @@ -1,9 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index 67d4ad8abf54..cc450732baed 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -1,9 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/gcode/feature/power_monitor/M430.cpp b/Marlin/src/gcode/feature/power_monitor/M430.cpp index 7639ea962d9b..9559404456f5 100644 --- a/Marlin/src/gcode/feature/power_monitor/M430.cpp +++ b/Marlin/src/gcode/feature/power_monitor/M430.cpp @@ -1,9 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/lcd/menu/menu_power_monitor.cpp b/Marlin/src/lcd/menu/menu_power_monitor.cpp index e88bdb28d8c8..d31ebd36b27f 100644 --- a/Marlin/src/lcd/menu/menu_power_monitor.cpp +++ b/Marlin/src/lcd/menu/menu_power_monitor.cpp @@ -1,9 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index 42b665ce8659..1bcf310bc17c 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -263,7 +263,7 @@ #ifndef SD_DETECT_PIN #define SD_DETECT_PIN 38 #endif - + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 73b5b563b1c9..7541f8272941 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -60,9 +60,6 @@ // Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface. // #define SPI_DEVICE 2 -#define SCK_PIN PB13 // SPI2 -#define MISO_PIN PB14 // SPI2 -#define MOSI_PIN PB15 // SPI2 // SPI Flash #define HAS_SPI_FLASH 1 @@ -246,7 +243,7 @@ #endif // Use the on-board card socket labeled SD_Extender -#if SD_CONNECTION_IS(CUSTOM_CABLE) +#if SD_CONNECTION_IS(CUSTOM_CABLE) #define SCK_PIN PC12 #define MISO_PIN PC8 #define MOSI_PIN PD2 @@ -272,42 +269,43 @@ #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER." #endif -#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PD11 // A0 -#endif +/** + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' + * to let the bootloader init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. + */ + +// QQS-Pro uses MKS Robin TFT v2.0 320x240 +// Shared FSMC Configs #if HAS_FSMC_TFT - /** - * Note: MKS Robin TFT screens use various TFT controllers - * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) - * ILI9488 is not supported - * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp - * - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. - * - * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu - * because Marlin uses the reset as a failsafe to revive a glitchy LCD. - */ - //#define TFT_RESET_PIN PC6 // FSMC_RST + #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_SCK -1 + + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + + #define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - #define FSMC_CS_PIN TFT_CS_PIN // NE4 - #define FSMC_RS_PIN TFT_RS_PIN // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #if ENABLED(TFT_CLASSIC_UI) - #define TFT_MARLINBG_COLOR 0x3186 // Grey - #define TFT_MARLINUI_COLOR 0xC7B6 // Green + + #define TFT_BUFFER_SIZE 14400 + #if ENABLED(TFT_CLASSIC_UI) + #define TFT_MARLINBG_COLOR 0x3186 // White + #define TFT_MARLINUI_COLOR 0xC7B6 // green #define TFT_BTARROWS_COLOR 0xDEE6 // Yellow #define TFT_BTOKMENU_COLOR 0x145F // Cyan - #endif - #define TFT_BUFFER_SIZE 14400 -#elif HAS_GRAPHICAL_TFT - #define TFT_RESET_PIN PC6 - #define TFT_BACKLIGHT_PIN PD13 + #endif #endif #if NEED_TOUCH_PINS @@ -315,5 +313,4 @@ #define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI - #define TOUCH_INT_PIN -1 #endif