Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibration page #81

Open
rzeldent opened this issue Jan 9, 2024 · 1 comment
Open

Calibration page #81

rzeldent opened this issue Jan 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rzeldent
Copy link
Owner

rzeldent commented Jan 9, 2024

Add a default calibration page

@rzeldent rzeldent added the enhancement New feature or request label Feb 2, 2024
@olivluca
Copy link

Meanwhile you could add some logging to get the raw coordinates, that's what I did (I used log_e since I didn't want to change the log level)

#ifdef BOARD_HAS_TOUCH
// See: https://www.maximintegrated.com/en/design/technical-documents/app-notes/5/5296.html
void lvgl_touch_calibration_transform(lv_indev_drv_t *disp_drv, lv_indev_data_t *data)
{
  log_v("disp_drv:0x%08x, data:0x%08x", disp_drv, data);

  // Call low level read from the driver
  driver_touch_read_cb(disp_drv, data);
  if (data->state == LV_INDEV_STATE_PRESSED) {
    log_e("-------- raw x %d raw y %d",data->point.x,data->point.y);
  }

then I used those value to set the calibration data (using touch_calibration_data=smartdisplay_compute_touch_calibration(screen,touch);)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants