-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Describe the bug
The corners of the round screen are hard to press :-)
Expected behavior
Red squares within the screen extents when the display is round.
Images
Thoughts
You could perhaps have an optional parameter to the calibrate() method 'round=False'
Here's some code I wrote to place 3 squares around the radius of a round display in touch_calibrate.py...
def calibrate(indev, cal_data):
if not task_handler.TaskHandler.is_running():
th_running = False
task_handler.TaskHandler()
else:
th_running = True
width = indev._orig_width # NOQA
height = indev._orig_height # NOQA
# coords = [
# [20, 20], # upper left
# [width - 40, 20], # upper right
# [20, height - 40] # lower left
# ]
# target_points = [
# dict(x=30, y=30), # upper left
# dict(x=width - 30, y=30), # upper right
# dict(x=30, y=height - 30), # lower left
# ]
from math import sin, cos, radians, floor
radius = width // 2
opposite = floor( sin(radians(30)) * (radius-30) )
adjacent = floor( cos(radians(30)) * (radius-30) )
coords = [
[radius -10, 20], # upper left
[radius - adjacent -10, radius + opposite - 10], # upper right
[radius + adjacent -10, radius + opposite - 10] # lower left
]
target_points = [
dict(x=radius, y=30), # upper middle
dict(x=radius-adjacent, y=radius+opposite), # upper right
dict(x=radius+adjacent, y=radius+opposite), # lower left
]
captured_points = [
dict(x=[], y=[]),
dict(x=[], y=[]),
dict(x=[], y=[])
]
old_scrn = lv.screen_active() # NOQA
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels