Bläddra i källkod

touch_ms followup

Scott Lahteine 4 år sedan
förälder
incheckning
0f6fc48f85
2 ändrade filer med 5 tillägg och 8 borttagningar
  1. 4
    4
      Marlin/src/lcd/tft/touch.cpp
  2. 1
    4
      Marlin/src/lcd/tft/touch.h

+ 4
- 4
Marlin/src/lcd/tft/touch.cpp Visa fil

40
 touch_control_t Touch::controls[];
40
 touch_control_t Touch::controls[];
41
 touch_control_t *Touch::current_control;
41
 touch_control_t *Touch::current_control;
42
 uint16_t Touch::controls_count;
42
 uint16_t Touch::controls_count;
43
-millis_t Touch::last_touch_ms = 0;
44
-millis_t Touch::time_to_hold;
45
-millis_t Touch::repeat_delay;
46
-millis_t Touch::touch_time;
43
+millis_t Touch::last_touch_ms = 0,
44
+         Touch::time_to_hold,
45
+         Touch::repeat_delay,
46
+         Touch::touch_time;
47
 TouchControlType  Touch::touch_control_type = NONE;
47
 TouchControlType  Touch::touch_control_type = NONE;
48
 touch_calibration_t Touch::calibration;
48
 touch_calibration_t Touch::calibration;
49
 #if ENABLED(TOUCH_SCREEN_CALIBRATION)
49
 #if ENABLED(TOUCH_SCREEN_CALIBRATION)

+ 1
- 4
Marlin/src/lcd/tft/touch.h Visa fil

140
     static touch_control_t *current_control;
140
     static touch_control_t *current_control;
141
     static uint16_t controls_count;
141
     static uint16_t controls_count;
142
 
142
 
143
-    static millis_t now;
144
-    static millis_t time_to_hold;
145
-    static millis_t repeat_delay;
146
-    static millis_t touch_time;
143
+    static millis_t last_touch_ms, time_to_hold, repeat_delay, touch_time;
147
     static TouchControlType touch_control_type;
144
     static TouchControlType touch_control_type;
148
 
145
 
149
     static inline bool get_point(int16_t *x, int16_t *y);
146
     static inline bool get_point(int16_t *x, int16_t *y);

Laddar…
Avbryt
Spara