Support for TFT & Touch Screens (#18130)

This commit is contained in:
Alexander Gavrilenko
2020-07-30 09:43:19 +03:00
committed by Scott Lahteine
parent 3fbc002bad
commit 8f8b0d84ae
176 changed files with 14747 additions and 303 deletions

View File

@@ -405,7 +405,7 @@ inline bool turn_on_heaters() {
inline bool prime_nozzle() {
const feedRate_t fr_slow_e = planner.settings.max_feedrate_mm_s[E_AXIS] / 15.0f;
#if HAS_LCD_MENU && DISABLED(TOUCH_BUTTONS) // ui.button_pressed issue with touchscreen
#if HAS_LCD_MENU && !HAS_TOUCH_XPT2046 // ui.button_pressed issue with touchscreen
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
float Total_Prime = 0.0;
#endif

View File

@@ -871,6 +871,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe
#endif
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
case 995: M995(); break; // M995: Touch screen calibration for TFT display
#endif
#if ENABLED(PLATFORM_M997_SUPPORT)
case 997: M997(); break; // M997: Perform in-application firmware update
#endif

View File

@@ -276,6 +276,7 @@
* ************ Custom codes - This can change to suit future G-code regulations
* G425 - Calibrate using a conductive object. (Requires CALIBRATION_GCODE)
* M928 - Start SD logging: "M928 filename.gco". Stop with M29. (Requires SDSUPPORT)
* M995 - Touch screen calibration for TFT display
* M997 - Perform in-application firmware update
* M999 - Restart after being stopped by error
*
@@ -843,6 +844,8 @@ private:
TERN_(MAGNETIC_PARKING_EXTRUDER, static void M951());
TERN_(TOUCH_SCREEN_CALIBRATION, static void M995());
TERN_(PLATFORM_M997_SUPPORT, static void M997());
static void M999();

View File

@@ -0,0 +1,39 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
#include "../gcode.h"
#include "../../lcd/menu/menu.h"
/**
* M995: Touch screen calibration for TFT display
*/
void GcodeSuite::M995() {
ui.goto_screen(touch_screen_calibration);
}
#endif // TOUCH_SCREEN_CALIBRATION