|
@ -28,6 +28,10 @@ |
|
|
#define DEBUG_OUT ENABLED(DEBUG_TOUCH_CALIBRATION) |
|
|
#define DEBUG_OUT ENABLED(DEBUG_TOUCH_CALIBRATION) |
|
|
#include "../../core/debug_out.h" |
|
|
#include "../../core/debug_out.h" |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(TOUCH_CALIBRATION_AUTO_SAVE) |
|
|
|
|
|
#include "../../module/settings.h" |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
TouchCalibration touch_calibration; |
|
|
TouchCalibration touch_calibration; |
|
|
|
|
|
|
|
|
touch_calibration_t TouchCalibration::calibration; |
|
|
touch_calibration_t TouchCalibration::calibration; |
|
@ -78,6 +82,7 @@ void TouchCalibration::validate_calibration() { |
|
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x); |
|
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x); |
|
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y); |
|
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y); |
|
|
SERIAL_ECHO_TERNARY(calibration.orientation == TOUCH_LANDSCAPE, "TOUCH_ORIENTATION ", "TOUCH_LANDSCAPE", "TOUCH_PORTRAIT", "\n"); |
|
|
SERIAL_ECHO_TERNARY(calibration.orientation == TOUCH_LANDSCAPE, "TOUCH_ORIENTATION ", "TOUCH_LANDSCAPE", "TOUCH_PORTRAIT", "\n"); |
|
|
|
|
|
TERN_(TOUCH_CALIBRATION_AUTO_SAVE, settings.save()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|