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

@@ -158,7 +158,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
#if HAS_SLOW_BUTTONS
volatile uint8_t MarlinUI::slow_buttons;
#endif
#if HAS_TOUCH_XPT2046
#if HAS_TOUCH_BUTTONS
#include "touch/touch_buttons.h"
bool MarlinUI::on_edit_screen = false;
#endif
@@ -241,7 +241,7 @@ millis_t MarlinUI::next_button_update_ms; // = 0
int8_t MarlinUI::encoderDirection = ENCODERBASE;
#endif
#if HAS_TOUCH_XPT2046
#if HAS_TOUCH_BUTTONS
uint8_t MarlinUI::touch_buttons;
uint8_t MarlinUI::repeat_delay;
#endif
@@ -862,7 +862,7 @@ void MarlinUI::update() {
quick_feedback(); // - Always make a click sound
};
#if HAS_TOUCH_XPT2046
#if HAS_TOUCH_BUTTONS
if (touch_buttons) {
RESET_STATUS_TIMEOUT();
if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority
@@ -883,7 +883,7 @@ void MarlinUI::update() {
}
else // keep wait_for_unclick value
#endif // HAS_TOUCH_XPT2046
#endif // HAS_TOUCH_BUTTONS
{
// Integrated LCD click handling via button_pressed
@@ -905,7 +905,7 @@ void MarlinUI::update() {
next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL;
#if HAS_TOUCH_XPT2046
#if HAS_TOUCH_BUTTONS
if (on_status_screen()) next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2;
@@ -1250,7 +1250,7 @@ void MarlinUI::update() {
#if HAS_SLOW_BUTTONS
| slow_buttons
#endif
#if BOTH(HAS_TOUCH_XPT2046, HAS_ENCODER_ACTION)
#if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION)
| (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF))
#endif
);
@@ -1561,7 +1561,7 @@ void MarlinUI::update() {
#endif
#if HAS_TOUCH_XPT2046
#if HAS_TOUCH_BUTTONS
//
// Screen Click