Finns det någon överjävligt duktig på Touch och Linux?

PIC, AVR, Arduino, Raspberry Pi, Basic Stamp, PLC mm.
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Har problem sedan lång tid tillbaka med en mindre Elo Touch skärm och RPi.
Problemfri i Win miljö

Har xinput calibrator installerad men calibrerings data sparas inte till fil från scriptfilen.

Problemet är att om jag knackar på vänster sida så är markören på höger sida och så vill man ju inte ha det.

Finns det någon här som kan reda ut varför inte dessa data skrivs in?
Vare sig xinput eller log skrivs inte :humm: ej heller meddelanden.
http://ozzmaker.com/enable-x-windows-on-piscreen/

Kod: Markera allt

#!/bin/sh
# script to make the changes permanent (xinput is called with every Xorg start)
#
# can be used from Xsession.d
# script needs tee and sed (busybox variants are enough)
#
# original script: Martin Jansa <Martin.Jansa@gmail.com>, 2010-01-31
# updated by Tias Guns <tias@ulyssis.org>, 2010-02-15
# updated by Koen Kooi <koen@dominion.thruhere.net>, 2012-02-28

PATH="/usr/bin:$PATH"

BINARY="xinput_calibrator"
CALFILE="/etc/pointercal.xinput"
LOGFILE="/var/log/xinput_calibrator.pointercal.log"

if [ -e $CALFILE ] ; then
  if grep replace $CALFILE ; then
    echo "Empty calibration file found, removing it"
    rm $CALFILE
  else
    echo "Using calibration data stored in $CALFILE"
    . $CALFILE && exit 0
  fi
fi

CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
if [ ! -z "$CALDATA" ] ; then
  echo $CALDATA > $CALFILE
  echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
fi
Zkronk
Inlägg: 1423
Blev medlem: 23 augusti 2005, 16:44:36
Ort: Uppsala

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av Zkronk »

Kör du scriptet med super user-rättigheter (sudo)?
En vanlig användare brukar normalt inte ha skrivrättigheter till varken /etc eller /var/log, så då skulle det inte vara så konstigt att filerna inte skrivs till disken.

Kolla också att du har programmen tee och sed installerade, genom att skriva dessa kommandon i en terminal.
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Kolla ossmaker länken punkt4. scriptet körs när man startar RPin så jag antar att rättigheter är skrivna i scripten.

Ska försöka köra manuellt som sudo
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Kod: Markera allt

pi@raspberrypi:~ $ sudo /home/pi/xinput_calibrator/scripts/xinput_calibrator_pointercal.sh
ERROR: XorgPrint Calibrator does not support the supplied --output-type
Error: unable to apply or save configuration valuespi@raspberrypi:~ $
Typiskt att det är strul med rättigheter eller annat :(
Kulla
Inlägg: 1264
Blev medlem: 7 januari 2010, 10:06:11
Ort: Sandared
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av Kulla »

Jag tror inte att det är rättigheter i frågan.

Vad säger output av xinput_calibrator --help?
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

pi@raspberrypi:~ $ man xinput_calibrator --output
--misclick nr_of_pixels
set the misclick threshold (0=off, default: 15 pixels)

--no-timeout
turns off the timeout

--output-type auto|xorg.conf.d|hal|xinput
type of config to ouput (auto=automatically detect, default: auto)

--fake Emulate a fake driver (for testing purposes)
Useful to test the calibrator without applying the values, and possibly even without having a touchscreen.

--geometry widthxheight
Manually provide the geometry (width and height) for the calibration window.

USAGE
Run xinput_calibrator in a terminal, as it prints out the calibration values and instructions on standard output.

After clicking the 4 calibration points, xinput_calibrator will calculate the new calibration values. Depending on the Xorg touchscreen driver you use, the new values can be made permanent in different ways:

Evdev:
Automatically recalibrates the driver for this session,
Supports following --output-types: auto, xorg.conf.d, hal, xinput

Usbtouchscreen:
Automatically recalibrates the *kernel module*, saved in /etc/modprobe.conf.local
Supports following --output-types: auto

Other Xorg touchscreen drivers:
No automatic calibration possible,
Supports following --output-types: auto, xorg.conf.d, hal

EXAMPLES
To run the calibrator, type in your terminal:

xinput_calibrator

If something goes wrong, or not as expected, turn on verbose messages:

xinput_calibrator -v

If you have to manually provide the current calibration values (when using EVDEV, you can use this to reset the calibration first):

xinput_calibrator --precalib 0 1000 0 1000

TROUBLESHOOTING
In general, run the calibrator with the -v option, it will tell you what happens and what goes wrong.

Mis-click detection, the calibrator can automatically detect clicks with unreasonable values. This prevents you from ending up with a bogus calibration.

If you keep getting the message 'Mis-click detected, restarting...', one of the following is happening:
1. you are bad at clicking on crosses, use a stylus or increase the --misclick threshold
2. your device is not properly supported by the kernel, it interprets the clicks wrong
3. your screen has a non-linear deformation, 4-point calibration can not help you

Och detta från VERBOSE

pi@raspberrypi:~ $ xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'ORtek Wireless Touchpad Keyboard' id=8, does not report Absolute events.
DEBUG: Selected device: Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Calibrating standard Xorg driver "Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535

If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
DEBUG: Found that 'Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface' is a sysfs name.
INFO: width=800, height=600
DEBUG: Adding click 0 (X=686, Y=95)
DEBUG: Adding click 1 (X=97, Y=94)
DEBUG: Adding click 2 (X=678, Y=519)
DEBUG: Adding click 3 (X=90, Y=516)
--> Making the calibration permanent <--
DEBUG: Found that 'Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface' is a sysfs name.
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface"
Option "MinX" "63903"
Option "MaxX" "-375"
Option "MinY" "2621"
Option "MaxY" "64224"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection


Problemet är att inget av de ovan fetmarkerade 'adresserna' tar, visst kan lägga in dessa i filerna men de läses inte in.

Så det skriptet jag laddade ner sist enl tidigare inlägg fungerar inte heller, så frågan är var dessa data skall sparas för att Raspbian skall läsa in calibreringsdatat. Vore skönt att slippa tangentbordet och bara kunna köra rakt av med touch då jag till 99% bara har denna till frukost underhållning med Youtube ;)
Kulla
Inlägg: 1264
Blev medlem: 7 januari 2010, 10:06:11
Ort: Sandared
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av Kulla »

Har du testat att skriva koden som du fick i '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)

Kod: Markera allt

Section "InputClass"
Identifier	"calibration"
MatchProduct	"Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface"
Option	"MinX"	"63903"
Option	"MaxX"	"-375"
Option	"MinY"	"2621"
Option	"MaxY"	"64224"
Option	"SwapXY"	"0" # unless it was already set to 1
Option	"InvertX"	"0" # unless it was already set
Option	"InvertY"	"0" # unless it was already set
EndSection
perra_e
Inlägg: 983
Blev medlem: 13 februari 2009, 16:26:53
Ort: Jönköping

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av perra_e »

tecno skrev:Har problem sedan lång tid tillbaka med en mindre Elo Touch skärm och RPi.
Problemfri i Win miljö

Har xinput calibrator installerad men calibrerings data sparas inte till fil från scriptfilen.

Problemet är att om jag knackar på vänster sida så är markören på höger sida och så vill man ju inte ha det.
Jag har kämpat väldigt mycket med i princip samma problem på LinuxCnc.
Testade allt jag hittade på nätet, men gav till slut upp.
Det blev en ny skärm och LinuxMint för LinuxCnc till slut. https://forum.linuxcnc.org/forum/9-inst ... int-lmde-2
Hoppas du får ordning på det!

--Per
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Kulla skrev:Har du testat att skriva koden som du fick i '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)

Kod: Markera allt

Section "InputClass"
Identifier	"calibration"
MatchProduct	"Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface"
Option	"MinX"	"63903"
Option	"MaxX"	"-375"
Option	"MinY"	"2621"
Option	"MaxY"	"64224"
Option	"SwapXY"	"0" # unless it was already set to 1
Option	"InvertX"	"0" # unless it was already set
Option	"InvertY"	"0" # unless it was already set
EndSection
Från inlägget innan:
Problemet är att inget av de ovan fetmarkerade 'adresserna' tar, visst kan lägga in dessa i filerna men de läses inte in.
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

perra_e skrev:
tecno skrev:Har problem sedan lång tid tillbaka med en mindre Elo Touch skärm och RPi.
Problemfri i Win miljö

Har xinput calibrator installerad men calibrerings data sparas inte till fil från scriptfilen.

Problemet är att om jag knackar på vänster sida så är markören på höger sida och så vill man ju inte ha det.
Jag har kämpat väldigt mycket med i princip samma problem på LinuxCnc.
Testade allt jag hittade på nätet, men gav till slut upp.
Det blev en ny skärm och LinuxMint för LinuxCnc till slut. https://forum.linuxcnc.org/forum/9-inst ... int-lmde-2
Hoppas du får ordning på det!

--Per
Hej Per,
Jo tack jag vet hur det är, har en touch nu till svarven modell Ä med RS232 = funkar kanon med W2K men inte fan i LCNC.
Har inte råd just nu att köpa nytt, vill ha nya datorer och touch skärmar till fräsen och svarven. Inte lyckats hitta sponsorer ;)
Hoppas allt väl med dig.
/Bengt
Kulla
Inlägg: 1264
Blev medlem: 7 januari 2010, 10:06:11
Ort: Sandared
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av Kulla »

Kolla här https://www.raspberrypi.org/forums/view ... hp?t=71774

Han från andra inlägg skriver att han behövde spara allt i /usr/share/X11/xorg.conf.d/10-evdev.conf och att det funkar med Elo Touch
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Ska kolla detta.

Men.. DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

Elo 1515L är inte min modell, jag har ET1229L-8CWA-1-G så touchen är inte samma.
Kulla
Inlägg: 1264
Blev medlem: 7 januari 2010, 10:06:11
Ort: Sandared
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av Kulla »

Borde inte spela någon roll, så länge X server läser config fil från rätt ställe (i teori).

Eftersom RPi ser den, calibrator hittar den och känner igen touch, så kommunikation är där.
Användarvisningsbild
tecno
Inlägg: 27022
Blev medlem: 6 september 2004, 17:34:45
Skype: tecnobs
Ort: Sparreholm, Södermanland N 59° 4.134', E 16° 49.743'
Kontakt:

Re: Finns det någon överjävligt duktig på Touch och Linux?

Inlägg av tecno »

I den länkens conf fil finns redan Evdev touch inlagt = går ej att redigera med sudo nano.
Skriv svar