|
@@ -28,6 +28,10 @@
|
28
|
28
|
#define DEBUG_OUT ENABLED(DEBUG_TOUCH_CALIBRATION)
|
29
|
29
|
#include "../../core/debug_out.h"
|
30
|
30
|
|
|
31
|
+#if ENABLED(TOUCH_CALIBRATION_AUTO_SAVE)
|
|
32
|
+ #include "../../module/settings.h"
|
|
33
|
+#endif
|
|
34
|
+
|
31
|
35
|
TouchCalibration touch_calibration;
|
32
|
36
|
|
33
|
37
|
touch_calibration_t TouchCalibration::calibration;
|
|
@@ -78,6 +82,7 @@ void TouchCalibration::validate_calibration() {
|
78
|
82
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x);
|
79
|
83
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y);
|
80
|
84
|
SERIAL_ECHO_TERNARY(calibration.orientation == TOUCH_LANDSCAPE, "TOUCH_ORIENTATION ", "TOUCH_LANDSCAPE", "TOUCH_PORTRAIT", "\n");
|
|
85
|
+ TERN_(TOUCH_CALIBRATION_AUTO_SAVE, settings.save());
|
81
|
86
|
}
|
82
|
87
|
}
|
83
|
88
|
|