• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. OpenJFX
  4. Touch screen calibration on embedded platforms

Touch screen calibration on embedded platforms

  • Created by Daniel Blaukopf, last modified on Jul 09, 2014

The latest OpenJFX sources in the 8u-dev repository provide touch screen coordinate transforms for embedded Linux devices. This allows the coordinate space of a touch screen to be scaled, translated and flipped. In order to set the transforms for a screen it is first necessary to find out the product ID of the touch screen device. The product ID is a list of four hexadecimal numbers, separated by forward slashes. The numbers are:

  • Bus ID
  • Vendor ID
  • Product ID
  • Version ID

The easiest way to find out these numbers for a device is usually to run the following command on the target device:

cat /proc/bus/input/devices

and then look for a line starting with the characters "I: Bus=" that matches the touch screen. The other way to find out these numbers is to run the the GetEvent class using OpenJFX:

sudo java com.sun.glass.ui.monocle.GetEvent

This queries the configuration of all input devices used by JavaFX.

Once you have the touch screen's product ID, you can set the following properties for it:

PropertyTypeFunction
minXintthe X value returned by the touch driver on the extreme left of the display
maxXintthe X value returned by the touch driver on the extreme right of the display
minYintthe Y value returned by the touch driver on the extreme top of the display
maxYintthe Y value returned by the touch driver on the extreme bottom of the display
flipXYbooleanthe X and Y axes are swapped if this property is true

Each touch property is set using the system property setting

monocle.input.<product ID>.<property>=<value>

See https://javafx-jira.kenai.com/browse/RT-35300

 

Overview
Content Tools
ThemeBuilder
  • No labels

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 278, "requestCorrelationId": "c9eefc24317c0ef0"}