@@ -169,23 +169,23 @@ static void
169169drawCross (modm::ColorGraphicDisplay& display, modm::glcd::Point center)
170170{
171171 display.setColor (html::Red);
172- display.drawLine (center.x - 15 , center.y , center.x - 2 , center.y );
173- display.drawLine (center.x + 2 , center.y , center.x + 15 , center.y );
174- display.drawLine (center.x , center.y - 15 , center.x , center.y - 2 );
175- display.drawLine (center.x , center.y + 2 , center.x , center.y + 15 );
172+ display.drawLine (center.x () - 15 , center.y () , center.x () - 2 , center.y () );
173+ display.drawLine (center.x () + 2 , center.y () , center.x () + 15 , center.y () );
174+ display.drawLine (center.x () , center.y () - 15 , center.x () , center.y () - 2 );
175+ display.drawLine (center.x () , center.y () + 2 , center.x () , center.y () + 15 );
176176
177177 display.setColor (html::White);
178- display.drawLine (center.x - 15 , center.y + 15 , center.x - 7 , center.y + 15 );
179- display.drawLine (center.x - 15 , center.y + 7 , center.x - 15 , center.y + 15 );
178+ display.drawLine (center.x () - 15 , center.y () + 15 , center.x () - 7 , center.y () + 15 );
179+ display.drawLine (center.x () - 15 , center.y () + 7 , center.x () - 15 , center.y () + 15 );
180180
181- display.drawLine (center.x - 15 , center.y - 15 , center.x - 7 , center.y - 15 );
182- display.drawLine (center.x - 15 , center.y - 7 , center.x - 15 , center.y - 15 );
181+ display.drawLine (center.x () - 15 , center.y () - 15 , center.x () - 7 , center.y () - 15 );
182+ display.drawLine (center.x () - 15 , center.y () - 7 , center.x () - 15 , center.y () - 15 );
183183
184- display.drawLine (center.x + 7 , center.y + 15 , center.x + 15 , center.y + 15 );
185- display.drawLine (center.x + 15 , center.y + 7 , center.x + 15 , center.y + 15 );
184+ display.drawLine (center.x () + 7 , center.y () + 15 , center.x () + 15 , center.y () + 15 );
185+ display.drawLine (center.x () + 15 , center.y () + 7 , center.x () + 15 , center.y () + 15 );
186186
187- display.drawLine (center.x + 7 , center.y - 15 , center.x + 15 , center.y - 15 );
188- display.drawLine (center.x + 15 , center.y - 15 , center.x + 15 , center.y - 7 );
187+ display.drawLine (center.x () + 7 , center.y () - 15 , center.x () + 15 , center.y () - 15 );
188+ display.drawLine (center.x () + 15 , center.y () - 15 , center.x () + 15 , center.y () - 7 );
189189}
190190
191191static void
@@ -211,7 +211,7 @@ calibrateTouchscreen(modm::ColorGraphicDisplay& display, modm::glcd::Point *fixe
211211 // wait until a valid sample can be taken
212212 }
213213
214- MODM_LOG_DEBUG << " calibration point: (" << sample[i].x << " | " << sample[i].y << " )" << modm::endl;
214+ MODM_LOG_DEBUG << " calibration point: (" << sample[i].x () << " | " << sample[i].y () << " )" << modm::endl;
215215 }
216216
217217 touchscreen.calibrate (calibrationPoint, sample);
@@ -227,14 +227,14 @@ void
227227drawPoint (modm::GraphicDisplay& display, modm::glcd::Point point)
228228{
229229 MODM_LOG_DEBUG << __PRETTY_FUNCTION__ << modm::endl;
230- if (point.x < 0 || point.y < 0 ) {
230+ if (point.x () < 0 || point.y () < 0 ) {
231231 return ;
232232 }
233233
234- display.setPixel (point.x , point.y );
235- display.setPixel (point.x + 1 , point.y );
236- display.setPixel (point.x , point.y + 1 );
237- display.setPixel (point.x + 1 , point.y + 1 );
234+ display.setPixel (point.x () , point.y () );
235+ display.setPixel (point.x () + 1 , point.y () );
236+ display.setPixel (point.x () , point.y () + 1 );
237+ display.setPixel (point.x () + 1 , point.y () + 1 );
238238}
239239
240240// ----------------------------------------------------------------------------
@@ -286,8 +286,8 @@ debounceTouch(modm::glcd::Point *out, modm::glcd::Point *old)
286286 // translate point according to calibration
287287 touchscreen.translate (&raw, &point);
288288
289- if (abs (point.x - old->x ) < TP_TOLERANCE &&
290- abs (point.y - old->y ) < TP_TOLERANCE
289+ if (abs (point.x () - old->x () ) < TP_TOLERANCE &&
290+ abs (point.y () - old->y () ) < TP_TOLERANCE
291291 )
292292 {
293293 // point is within area of last touch
@@ -321,8 +321,8 @@ touchUp(void* data)
321321 modm::gui::InputEvent* ev = static_cast <modm::gui::InputEvent*>(data);
322322
323323 MODM_LOG_DEBUG << " asynchronous UP-event:" << modm::endl;
324- MODM_LOG_DEBUG << " x: " << ev->coord .x << modm::endl;
325- MODM_LOG_DEBUG << " y: " << ev->coord .y << modm::endl;
324+ MODM_LOG_DEBUG << " x: " << ev->coord .x () << modm::endl;
325+ MODM_LOG_DEBUG << " y: " << ev->coord .y () << modm::endl;
326326
327327 // queue UP-event as new input event
328328 input_queue.push (ev);
@@ -351,8 +351,8 @@ gatherInput()
351351 auto async_ev = new modm::gui::AsyncEvent (500 , &touchUp, (void *)(ev_up));
352352 async_events.append (async_ev);
353353
354- MODM_LOG_DEBUG << " touch down x: " << point.x << modm::endl;
355- MODM_LOG_DEBUG << " touch down y: " << point.y << modm::endl;
354+ MODM_LOG_DEBUG << " touch down x: " << point.x () << modm::endl;
355+ MODM_LOG_DEBUG << " touch down y: " << point.y () << modm::endl;
356356
357357 }
358358}
@@ -492,11 +492,11 @@ main()
492492 /*
493493 * display an arbitrary image
494494 */
495- // if(pixPos.x < 0 || (pixPos.x + pix[0]) > tft.getWidth()){
496- // pixDeltaPos.x *= -1;
495+ // if(pixPos.x() < 0 || (pixPos.x() + pix[0]) > tft.getWidth()){
496+ // pixDeltaPos.x() *= -1;
497497 // }
498- // if(pixPos.y < 0 || (pixPos.y + pix[1]) > tft.getHeight()){
499- // pixDeltaPos.y *= -1;
498+ // if(pixPos.y() < 0 || (pixPos.y() + pix[1]) > tft.getHeight()){
499+ // pixDeltaPos.y() *= -1;
500500 // }
501501 // pixPos += pixDeltaPos;
502502 // tft.drawImage(pixPos, pix);
0 commit comments