WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: WaveShare 7'' touchescreen calibration issue with Jivelite on PicorePlaer 5.0.1  (Read 2643 times)

Offline tparvais

  • Newbie
  • *
  • Posts: 2
Hello

I've been advised to post my question in this forum. Hope this is the good one and thank you beforehand for any help.

I need help to calibrate my touchscreen.

I have the touchscreen 7'' Waveshare HDMI LCD (C) on a raspberrypi 3B with PicorePlayer 5.0(Tiny Core Linux)

This is using TS_LIB.

I adapted pcp_startup.sh accordingly to use BYZHYYZHY By ZH851 Touchscreen as identifier to be able to detect which event to use (event6 in my case)


Code: [Select]
I: Bus=0003 Vendor=0eef Product=0005 Version=0110
N: Name="BYZHYYZHY By ZH851 Mouse"
P: Phys=usb-3f980000.usb-1.4/input0
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0EEF:0005.0004/input/input6
U: Uniq=c0U585P865
H: Handlers=mouse1 event5 js0
B: PROP=0
B: EV=1b
B: KEY=70000 0 0 0 0 0 0 0 0
B: ABS=3
B: MSC=10

I: Bus=0003 Vendor=0eef Product=0005 Version=0110
N: Name="BYZHYYZHY By ZH851 Touchscreen"
P: Phys=usb-3f980000.usb-1.4/input0
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0EEF:0005.0004/input/input7
U: Uniq=c0U585P865
H: Handlers=mouse2 event6
B: PROP=0
B: EV=1b
B: KEY=401 0 1 0 0 0 0 0 0 0 0
B: ABS=100 3
B: MSC=10


in config.txt, I've added the following

Code: [Select]
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

Everything works fine for display, except the touchpad feature. only top-left corner seems ok. the cursor does not react properly.
. I must use a mouse use the screen

So I presume I shall calibrate the touchscreen. I did the following:

Code: [Select]
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event6 /usr/local/bin/ts_calibrate
I see the crosshair on the screen.

It seems the calibration process does not work well: sometimes it does not pass via all the corners points and jumps directly to the end. Thus the calibration file pointercal that is generated is not good.

Here is my ts.conf file:

Code: [Select]
# Access plugins
################

# Uncomment if you wish to use the linux input layer event interface
module_raw input

# For other driver modules, see the ts.conf man page


# Filter plugins
################

# Uncomment if first or last samples are unreliable
# module skip nhead=1 ntail=1

# Uncomment if needed for devices that measure pressure
#module pthres pmin=1

#module variance delta=30

# Uncomment if needed
 module debounce drop_threshold=500

# Uncomment if needed to filter spikes
# module median depth=5

# Uncomment to enable smoothing of fraction N/D
# module iir N=6 D=10

# Uncomment if needed
# module lowpass factor=0.1 threshold=1

# Uncomment if needed to filter noise samples
#module dejitter delta=100

# Uncomment and adjust if you need to invert an axis or both
# module invert x0=800 y0=480
#module invert x0=1024 y0=600

# Uncomment to use ts_calibrate's settings
 module linear

I tried to use different values, no effect.

I tried to calibrate by pressing very fast the screen to pass successfully to 5 area and I got this:


Code: [Select]
tc@piCorePlayer:/usr/local/bin$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event6 /usr/local/bin/ts_calibrate
xres = 1024, yres = 600
Took 4 samples...
Top left : X =   16 Y =  600
Took 11 samples...
Top right : X =    0 Y =  600
Took 10 samples...
Bot right : X =    0 Y =  600
Took 8 samples...
Bot left : X =    0 Y =  600
Took 18 samples...
Center : X =    0 Y =  600
ts_calibrate: determinant is too small -- 0.000000
Calibration failed.

Sometimes, when it skips some calibration corners, the file is properly generated but of course the parameters are wrong.

So I'm stuck. is there an alternative to generate this pointercal config file ? to calibrate this screen ?

I've done some search on this forum and abroad without finding the right calibration parameters.

any idea to solve that problem ?

Thank you and happy new year to all !

Thomas

PS: i tried this touchsreen on Standard Raspbian desktop OS and it works like a charm without any config except config.txt

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
hi tparvais,

piCorePlayer is not supported through this forum.

Standard piCore is not used in piCorePlayer.

regards
Greg

Offline tparvais

  • Newbie
  • *
  • Posts: 2
hi tparvais,

piCorePlayer is not supported through this forum.
Standard piCore is not used in piCorePlayer.
regards
Greg

Hello
I'm litle bit lost: I read on picoreplayer that it's using piCore, which is derivated from TinyCore.
As I want to find a solution to my issue, I post both in Picoreplayer forum but also here as the problem is coming from ts_calibrate / TS_LIB which is not picoreplayer topic only, (If I'm not wrong)

any suggestion where to get help on my issue will be appreciated :)

Thomas

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
hi Thomas,

The TinyCore/piCore moderators have requested piCorePlayer not be supported through this forum.

regards
Greg