Add Touch Calibration screen (#20049)

This commit is contained in:
Victor Oliveira
2020-11-15 19:39:58 -03:00
committed by GitHub
parent cab83ba840
commit ea371618da
45 changed files with 845 additions and 904 deletions

View File

@ -146,7 +146,7 @@
#endif
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
#include "../lcd/tft/touch.h"
#include "../lcd/tft_io/touch_calibration.h"
#endif
#if HAS_ETHERNET
@ -443,7 +443,7 @@ typedef struct SettingsDataStruct {
// TOUCH_SCREEN_CALIBRATION
//
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
touch_calibration_t touch_calibration;
touch_calibration_t touch_calibration_data;
#endif
// Ethernet settings
@ -1410,7 +1410,7 @@ void MarlinSettings::postprocess() {
// TOUCH_SCREEN_CALIBRATION
//
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
EEPROM_WRITE(touch.calibration);
EEPROM_WRITE(touch_calibration.calibration);
#endif
//
@ -2293,8 +2293,8 @@ void MarlinSettings::postprocess() {
// TOUCH_SCREEN_CALIBRATION
//
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
_FIELD_TEST(touch.calibration);
EEPROM_READ(touch.calibration);
_FIELD_TEST(touch_calibration_data);
EEPROM_READ(touch_calibration.calibration);
#endif
//
@ -2626,7 +2626,7 @@ void MarlinSettings::reset() {
//
// TOUCH_SCREEN_CALIBRATION
//
TERN_(TOUCH_SCREEN_CALIBRATION, touch.calibration_reset());
TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset());
//
// Buzzer enable/disable