Calibration method, device and apparatus for touch screen
By creating calibration tasks on the graphical user interface layer and the touch driver layer respectively, the problems of wasted memory resources and unclear code module layering in LCD resistive touch screen calibration are solved. This achieves separation of display and driver, reduces development costs and porting workload, and improves calibration efficiency and accuracy.
Patent Information
- Application Number
- CN202111595040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In the existing technology, the calibration process of LCD resistive touch screens integrates the display function into the LCD driver layer, which leads to wasted memory resources and unclear code module layering, increasing the workload of porting.
By creating a first calibration task on the graphical user interface layer and a second calibration task on the touch driver layer, the display and driver are separated. The GUI layer is used to complete the display functions required for calibration, while the touch driver layer is responsible for the execution of the calibration task and the transmission of results.
This separation of display and driver reduces memory usage and code size, simplifies porting, and improves calibration efficiency and accuracy.
Smart Images

Figure CN116339528B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of touch screen technology, and in particular to a method, apparatus, and device for calibrating a touch screen. Background Technology
[0002] Most existing terminal interaction devices are equipped with touchscreens to provide users with a convenient and quick input method. Based on their working principle and the medium through which information is transmitted, touchscreens can be divided into four types: resistive touchscreens, infrared touchscreens, capacitive touchscreens, and surface acoustic wave (SAW) touchscreens.
[0003] Currently, resistive touchscreens, such as LCD resistive touchscreens, which are widely used, exhibit variations in touch accuracy due to differences in production batches and assembly processes. Therefore, parameter calibration is often necessary. In LCD resistive screen calibration, most existing technologies integrate display function code for displaying calibration points into the LCD driver layer, with the calibration process completed at either the LCD driver or touch driver layer. This technology, integrating some display functions into the LCD driver layer, consumes more memory, and the code module layering is not clearly defined. When porting a new LCD driver, additional development and adaptation of the display functions in the LCD driver layer are required, increasing the workload. Summary of the Invention
[0004] This invention provides a method, apparatus, and device for calibrating a touch screen, which can separate the display and driving functions, reducing development costs and memory resource usage.
[0005] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is: to provide a touchscreen calibration method, comprising:
[0006] Create a first calibration task that runs on the graphical user interface layer and a second calibration task that runs on the touch driver layer;
[0007] The touch driver layer executes the second calibration task at the current preset calibration point and sends the execution status of the second calibration task to the graphical user interface layer;
[0008] If the execution status of the second calibration task is "calibration completed", the touch driver layer generates a calibration result and sends the calibration result to the graphical user interface layer. The graphical user interface layer then executes the first calibration task to display the calibration result.
[0009] According to one embodiment of the present invention, after the touch driving layer executes the second calibration task at the current preset calibration point and sends the execution status of the second calibration task to the graphical user interface layer, it further includes:
[0010] If the execution status of the second calibration task is "calibration not completed", the touch driver layer sends the calibration coordinates corresponding to the next preset calibration point to the graphical user interface layer. The graphical user interface layer executes the first calibration task to display the next preset calibration point. The touch driver layer uses the next preset calibration point as the current preset calibration point and continues to execute the second calibration task.
[0011] According to one embodiment of the present invention, the touch driving layer executing the second calibration task at the current preset calibration point and sending the execution status of the second calibration task to the graphical user interface layer includes:
[0012] The touch driver layer samples the touch parameters of the current preset calibration point, determines whether the execution status of the second calibration task is "calibration completed" based on the sampling results, and sends the determination result to the graphical user interface layer.
[0013] According to one embodiment of the present invention, the touch driver layer samples the touch parameters of the current preset calibration point, determines whether the execution status of the second calibration task is "calibration completed" based on the sampling result, and sends the determination result to the graphical user interface layer, including:
[0014] The touch driver layer samples the touch parameters of the current preset calibration point and calculates the number of samples based on the sampling results;
[0015] Compare the number of samples with the number of preset calibration points;
[0016] Based on the comparison results, determine whether the execution status of the second calibration task is "calibration completed".
[0017] According to one embodiment of the present invention, determining whether the execution status of the second calibration task is "calibration completed" based on the comparison result includes:
[0018] If the number of samples is less than the number of preset calibration points, then the execution status of the second calibration task is that the calibration is not completed.
[0019] If the number of samples is equal to the number of preset calibration points, then the execution status of the second calibration task is calibration completed.
[0020] According to one embodiment of the present invention, the touch driving layer samples the touch parameters of the current preset calibration point, including:
[0021] The touch driver layer sends the calibration coordinates corresponding to the current preset calibration point to the graphical user interface layer, and the graphical user interface layer controls the display screen to display the current preset calibration point through the display driver layer;
[0022] The touch driver layer acquires the user's touch events on the touch screen, samples the touch parameters generated by the touch events, and obtains the sampling result of the current preset calibration point based on the touch parameters.
[0023] According to an embodiment of the present invention, before the touch driver layer acquires the user's touch event on the touch screen, it further includes:
[0024] The touch driver layer accumulates the waiting time for touch from the time the current preset calibration point is displayed on the screen, and determines whether the waiting time for touch exceeds a preset value;
[0025] When the waiting time for touch exceeds the preset value, the touch driver layer generates a calibration failure result and terminates the second calibration task;
[0026] When the waiting time for touch does not exceed the preset value, the touch driver layer detects the user's touch events on the touch screen in real time.
[0027] According to one embodiment of the present invention, if the execution status of the second calibration task is calibration completed, then the touch driver layer generates the calibration result including:
[0028] The calibration parameters are calculated based on the calibration coordinates corresponding to all preset calibration points and the sampling results corresponding to each preset calibration point.
[0029] Determine whether the calibration parameters were calculated successfully;
[0030] If the calibration parameters are calculated successfully, a calibration result indicating successful calibration is generated.
[0031] If the calibration parameter calculation fails, a calibration failure result is generated.
[0032] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is: to provide a touch screen calibration device, comprising:
[0033] A module is created to create a first calibration task that runs on the graphical user interface layer and a second calibration task that runs on the touch driver layer.
[0034] The first execution module is used to execute the second calibration task at the current preset calibration point in the touch driver layer and send the execution status of the second calibration task to the graphical user interface layer;
[0035] The second execution module is configured to, if the execution status of the second calibration task is calibration completed, generate a calibration result in the touch driver layer and send the calibration result to the graphical user interface layer, and the graphical user interface layer executes the first calibration task to display the calibration result.
[0036] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide an electronic device, including the above-mentioned calibration device for the touch screen.
[0037] The beneficial effects of this invention are: by creating a first calibration task running on the graphical user interface layer and a second calibration task running on the touch driver layer, the interaction between the graphical user interface layer and the touch driver layer is realized simultaneously, thereby achieving the separation of display and driver in the calibration process. This solves the problems of memory resource waste and unclear code module layering caused by integrating display functions in the driver layer in traditional calibration schemes, as well as the large amount of porting work. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the touchscreen architecture according to an embodiment of the present invention;
[0039] Figure 2 This is a flowchart illustrating the calibration method for a touchscreen according to the first embodiment of the present invention;
[0040] Figure 3 This is a flowchart illustrating the calibration method for a touchscreen according to the second embodiment of the present invention;
[0041] Figure 4 This is a flowchart illustrating the calibration method for a touchscreen according to the third embodiment of the present invention;
[0042] Figure 5 This is a schematic flowchart of the touchscreen calibration method according to the fourth embodiment of the present invention;
[0043] Figure 6 This is a flowchart illustrating the calibration method for a touchscreen according to the fifth embodiment of the present invention.
[0044] Figure 7 This is a schematic diagram of the structure of a touch screen calibration device according to an embodiment of the present invention;
[0045] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0047] The terms "first," "second," and "third" used in this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this invention are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0048] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0049] Figure 1 This is a schematic diagram of a touchscreen architecture, such as... Figure 1As shown, the touchscreen 100 can be a resistive touchscreen. Taking an LCD (Liquid Crystal Display) resistive touchscreen as an example, it includes an LCD display 10, a touchscreen 20, an LCD driving layer 30 connected to the LCD display 10, a touch driving layer 40 connected to the touchscreen 20, an MCU (Microcontroller Unit) 80 connected to both the LCD driving layer 30 and the touch driving layer 40, a GUI (Graphical User Interface) layer 90 running on the MCU 80, and a real-time operating system. The real-time operating system is used to create a first calibration task running on the GUI layer 90 and a second calibration task running on the touch driving layer 40, and to enable communication between the first and second calibration tasks. The GUI layer 90 is used to customize display content according to user needs, such as displaying images, icons, and buttons. The LCD driving layer 30 receives display data from the GUI layer 90 and uses it to drive the LCD display 10. The touch driving layer 40 transmits preset calibration coordinates and touch events to the GUI layer 90 and uses them to drive the touchscreen 20.
[0050] In this embodiment, the LCD driver layer 30 and touch driver layer 40 do not need to implement display-related functions. The display functions required for calibration are entirely completed by the GUI layer 90, achieving separation of display and driving. Because this embodiment does not require implementing display-related code outside the GUI layer 90, the amount of code can be reduced, thus saving memory space. Since the LCD driver layer 30 and touch driver layer 40 only need to handle their respective hardware driver functions, when porting other LCDs or touch drivers, there is no need to undertake the additional work of porting display-related functions, thereby reducing the workload of porting and facilitating the porting of LCD and touch drivers.
[0051] Figure 2 This is a schematic flowchart of the touchscreen calibration method according to the first embodiment of the present invention. It should be noted that if substantially the same result is obtained, the method of the present invention is not necessarily identical. Figure 2 The illustrated process sequence is limited. For example... Figure 2 As shown, the method includes the following steps:
[0052] Step S201: Create a first calibration task running on the GUI layer and a second calibration task running on the touch driver layer.
[0053] In step S201, the calibration process can be triggered by events such as external buttons, communication, or touchscreen buttons. When the MCU receives a calibration trigger event, a calibration task can be created based on the real-time operating system. In one feasible embodiment, the first calibration task is a GUI-layer calibration task used for drawing the calibration interface, and the second calibration task is a touch-driver-layer calibration task used for handling calibration timing, data sampling, and calibration parameter calculation.
[0054] Step S202: The touch driver layer executes the second calibration task of the current preset calibration point and sends the execution status of the second calibration task to the GUI layer.
[0055] In step S202, multiple calibration points can be preset according to user needs. These preset calibration points are coordinate points that need to be displayed under GUI layer control, providing the user with touch position prompts. The touch driver layer executes a second calibration task for each preset calibration point, sampling each point. The second calibration task ends when all preset calibration points have been sampled. Therefore, the execution status of the second calibration task includes two states: calibration completed and calibration not completed.
[0056] In one feasible embodiment, the touch driver layer sends the execution status of the second calibration task to the GUI layer via a communication port. As an example, the communication port can be, but is not limited to, an SPI communication port, an I2C interface, etc.
[0057] In one feasible embodiment, step S202 specifically involves: the touch driver layer sampling the touch parameters of the current preset calibration point, determining whether the execution status of the second calibration task is "calibration complete" based on the sampling result, and sending the execution status of the second calibration task to the GUI layer. More specifically, the touch driver layer acquires the resistance values of the X and Y axes of the current preset calibration point on the touchscreen using an ADC (Analog-to-digital converter), converts the ADC sampled values into corresponding sampled coordinates on the touchscreen, and uses these as the sampling results.
[0058] Step S203: If the execution status of the second calibration task is calibration completed, the touch driver layer generates the calibration result and sends the calibration result to the GUI layer. The GUI layer executes the first calibration task to display the calibration result.
[0059] After receiving the calibration completion notification from the second calibration task, the GUI layer controls the display of the calibration results.
[0060] In one feasible embodiment, the calibration result includes two types: calibration success and calibration failure. As an example, in step S203, calibration parameters are calculated based on the calibration coordinates corresponding to all preset calibration points and the sampling results corresponding to each preset calibration point; it is then determined whether the calibration parameters are calculated successfully; if the calibration parameters are calculated successfully, a calibration success result is generated; if the calibration parameters are calculated unsuccessfully, a calibration failure result is generated.
[0061] In one feasible embodiment, when calculating the calibration parameters, it is necessary to verify the validity of the ADC sampling results. If the sampling results are valid, the calibration parameters are calculated successfully; if the sampling results are invalid, the calibration parameters are calculated unsuccessfully.
[0062] In one feasible embodiment, the touch driver layer sends the calibration results to the GUI layer via a communication port. As an example, the communication port can be, but is not limited to, an SPI communication port, an I2C interface, etc.
[0063] The touchscreen calibration method of this invention creates a first calibration task running on the GUI layer and a second calibration task running on the touch driver layer, while simultaneously enabling interaction between the GUI display layer and the touch driver layer. This achieves separation of display and driver in the calibration process, solving the problems of wasted memory resources and unclear code module layering, as well as the large workload of porting, caused by integrating display functions into the driver layer in traditional calibration schemes.
[0064] In one feasible embodiment, such as Figure 3 As shown, after step S202, the touchscreen calibration method further includes:
[0065] Step S204: If the execution status of the second calibration task is that the calibration is not finished, the touch driver layer sends the calibration coordinates corresponding to the next preset calibration point to the GUI layer. The GUI layer executes the first calibration task to display the next preset calibration point. The touch driver layer takes the next preset calibration point as the current preset calibration point and continues to execute the second calibration task.
[0066] In one feasible embodiment, the touch driver layer sends the calibration coordinates corresponding to the next preset calibration point to the GUI layer via a communication port, which may be, but is not limited to, an SPI communication port, an I2C interface, etc. In this embodiment, after the GUI layer obtains the calibration coordinates corresponding to the next preset calibration point, it controls the LCD display to show the next preset calibration point through the LCD driver layer, thus prompting the user on the touchscreen position. When the touch driver layer obtains a touch event from the user on the touchscreen, it enters the second calibration task, that is, re-executes step S202. For another feasible embodiment, please refer to... Figure 4 Step S202 includes the following steps:
[0067] Step S401: The touch driver layer samples the touch parameters of the current preset calibration point and calculates the number of samples based on the sampling results;
[0068] In this embodiment, the touch parameters of each preset calibration point are sampled by the ADC to generate corresponding sampling results. When sampling the touch parameters of the current preset calibration point, the number of samples already sampled is incremented by 1, which is used as the sampling number corresponding to the current preset calibration point. For example, if two preset calibration points have been sampled before the current preset calibration point is sampled, then the current preset calibration point is the third preset calibration point, and the corresponding sampling number is 3.
[0069] Step S402: Compare the number of samples with the number of preset calibration points;
[0070] The number of preset calibration points in this embodiment can be set according to user needs or the actual situation of the calibration process.
[0071] Step S403: Determine whether the execution status of the second calibration task is "calibration completed" based on the comparison results.
[0072] In one feasible embodiment, if the number of samples is less than the number of preset calibration points, the execution status of the second calibration task is "calibration not completed"; if the number of samples is equal to the number of preset calibration points, the execution status of the second calibration task is "calibration completed".
[0073] In one feasible embodiment, for example, there are three preset calibration points: a first preset calibration point, a second preset calibration point, and a third preset calibration point. Assuming the current preset calibration point is the second preset calibration point, the sampling quantity corresponding to the current preset calibration point is 2, which is less than 3. That is, the sampling quantity is less than the number of preset calibration points. Therefore, the second calibration task is not yet complete, and sampling at the third preset calibration point is still required. Alternatively, assuming the current preset calibration point is the third preset calibration point, the sampling quantity corresponding to the current preset calibration point is 3. That is, the sampling quantity is equal to the number of preset calibration points. Therefore, the second calibration task is complete.
[0074] The above methods enable automated calibration of touchscreens, reducing manual intervention and effectively improving calibration efficiency and accuracy.
[0075] In one feasible embodiment, please refer to Figure 5 Step S401 further includes the following steps:
[0076] Step S501: The touch driver layer sends the calibration coordinates corresponding to the current preset calibration point to the GUI layer, and the GUI layer controls the display screen to display the current preset calibration point through the display driver layer.
[0077] In this embodiment, the GUI layer controls the LCD display to show the current preset calibration point through the LCD driver layer, prompting the user to the touch position on the touch screen.
[0078] Step S502: The touch driver layer acquires the user's touch events on the touch screen, samples the touch parameters generated by the touch events, and obtains the sampling results of the current preset calibration point based on the touch parameters.
[0079] When a user performs a touch operation on the touchscreen based on the current preset calibration point displayed on the screen, a touch event is generated, and the touch parameters generated by the touch event are sampled.
[0080] Under normal circumstances, when a user touches the touchscreen based on the current preset calibration point displayed on the screen, the touch position should be the current preset calibration point. Therefore, the touch event can be regarded as an event of touching the current preset calibration point, and the sampling result of the current preset calibration point can be obtained based on the sampled touch parameters.
[0081] Taking a resistive touchscreen as an example, the touch parameters generated by a touch event include the resistance value of the touch point, such as the resistance value along the X-axis and the resistance value along the Y-axis. Specifically, the resistance value of the touch point can be sampled using an ADC. Alternatively, the touch parameters generated by a touch event can also include the sampling coordinates of the touch point, which can be obtained by converting the resistance values along the X-axis and Y-axis. For example, the resistance values along the X-axis and Y-axis of the user's touch position can be collected by an ADC and converted into corresponding sampling coordinates on the touchscreen, which can then be used as the sampling result of the current preset calibration point.
[0082] The sampling results can determine whether the user's touch position is accurate, and thus determine whether the position of the current preset calibration point displayed on the screen is accurate.
[0083] In one feasible embodiment, please refer to Figure 6 The steps preceding step S502 include the following:
[0084] Step S601: The touch driver layer starts accumulating the waiting time from the current preset calibration point displayed on the screen, and determines whether the waiting time exceeds the preset value.
[0085] Among them, starting from the current preset calibration point displayed on the LCD screen, the waiting time for touch can be accumulated by a timer until a touch event is detected or the waiting time for touch exceeds the preset value.
[0086] The preset value can be a pre-set value, which can be set by the MCU by default or manually set by the user. The user can set or adjust the preset value according to actual needs. The preset value can be greater than or equal to 1 second. For example, the preset value can be 10 seconds, or it can be 5 seconds, 2 seconds or 1 second.
[0087] Step S602: When the waiting time for touch exceeds the preset value, the touch driver layer generates a calibration failure result and ends the second calibration task.
[0088] Step S603: When the waiting time for touch does not exceed the preset value, the touch driver layer detects the user's touch events on the touch screen in real time.
[0089] Furthermore, when the touch driver layer detects a touch event, it triggers the ADC to sample the touch parameters of the current preset calibration point; when the touch driver layer does not detect a touch event, it will continue to time and determine whether the waiting time for touch exceeds the preset value.
[0090] By employing the methods described above, the level of calibration automation can be further improved, and overdue calibration tasks can be terminated in a timely manner, thereby increasing calibration efficiency.
[0091] The touchscreen calibration method of this invention creates a first calibration task running on the GUI layer and a second calibration task running on the touch driver layer, while simultaneously enabling interaction between the GUI display layer and the touch driver layer. This achieves separation of display and driver in the calibration process, solving the problems of wasted memory resources and unclear code module layering, as well as the large workload of porting, caused by integrating display functions into the driver layer in traditional calibration schemes.
[0092] Figure 7 This is a schematic diagram of the structure of a touchscreen calibration device according to an embodiment of the present invention. Figure 7 As shown, the device 70 includes a creation module 71, a first execution module 72, and a second execution module 73.
[0093] The creation module 71 is used to create a first calibration task running on the GUI layer and a second calibration task running on the touch driver layer;
[0094] The first execution module 72 is used by the touch driver layer to execute the second calibration task at the current preset calibration point and send the execution status of the second calibration task to the GUI layer;
[0095] The second execution module 73 is used to generate a calibration result and send the calibration result to the GUI layer if the execution status of the second calibration task is calibration completed. The GUI layer then executes the first calibration task to display the calibration result.
[0096] Please see Figure 8 , Figure 8This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 8 As shown, the electronic device 80 includes the aforementioned touchscreen calibration device 70.
[0097] Electronic devices 80 can be terminal devices such as computers, servers, mobile phones, and tablets.
[0098] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0099] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0100] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A calibration method for a touchscreen, characterized in that, include: Create a first calibration task that runs on the graphical user interface layer and a second calibration task that runs on the touch driver layer; The first calibration task is used to draw the calibration interface, and the second calibration task is used to process the calibration timing, data sampling, and calibration parameter calculation. The touch driver layer executes the second calibration task at the current preset calibration point and sends the execution status of the second calibration task to the graphical user interface layer; This includes: the touch driver layer sampling the touch parameters of the current preset calibration point, determining whether the execution status of the second calibration task is calibration completed based on the sampling result, and sending the determination result to the graphical user interface layer; If the execution status of the second calibration task is calibration completed, the touch driver layer generates a calibration result and sends the calibration result to the graphical user interface layer, and the graphical user interface layer executes the first calibration task to display the calibration result; If the execution status of the second calibration task is "calibration not completed", the touch driver layer sends the calibration coordinates corresponding to the next preset calibration point to the graphical user interface layer. The graphical user interface layer executes the first calibration task to display the next preset calibration point. The touch driver layer uses the next preset calibration point as the current preset calibration point and continues to execute the second calibration task.
2. The calibration method according to claim 1, characterized in that, The touch driver layer samples the touch parameters of the current preset calibration point, determines whether the execution status of the second calibration task is "calibration completed" based on the sampling result, and sends the determination result to the graphical user interface layer, including: The touch driver layer samples the touch parameters of the current preset calibration point and calculates the number of samples based on the sampling results; Compare the number of samples with the number of preset calibration points; Based on the comparison results, determine whether the execution status of the second calibration task is "calibration completed".
3. The calibration method according to claim 2, characterized in that, The step of determining whether the execution status of the second calibration task is "calibration completed" based on the comparison result includes: If the number of samples is less than the number of preset calibration points, then the execution status of the second calibration task is that the calibration is not completed. If the number of samples is equal to the number of preset calibration points, then the execution status of the second calibration task is calibration completed.
4. The calibration method according to claim 2, characterized in that, The touch driver layer samples the touch parameters of the current preset calibration point, including: The touch driver layer sends the calibration coordinates corresponding to the current preset calibration point to the graphical user interface layer, and the graphical user interface layer controls the display screen to display the current preset calibration point through the display driver layer; The touch driver layer acquires the user's touch events on the touch screen, samples the touch parameters generated by the touch events, and obtains the sampling result of the current preset calibration point based on the touch parameters.
5. The calibration method according to claim 4, characterized in that, Before the touch driver layer acquires the user's touch events on the touchscreen, it also includes: The touch driver layer accumulates the waiting time for touch from the time the current preset calibration point is displayed on the screen, and determines whether the waiting time for touch exceeds a preset value; When the waiting time for touch exceeds the preset value, the touch driver layer generates a calibration failure result and terminates the second calibration task; When the waiting time for touch does not exceed the preset value, the touch driver layer detects the user's touch events on the touch screen in real time.
6. The calibration method according to claim 1, characterized in that, If the execution status of the second calibration task is "calibration completed", then the touch driver layer generates the calibration result including: The calibration parameters are calculated based on the calibration coordinates corresponding to all preset calibration points and the sampling results corresponding to each preset calibration point. Determine whether the calibration parameters were calculated successfully; If the calibration parameters are calculated successfully, a calibration result indicating successful calibration is generated. If the calibration parameter calculation fails, a calibration failure result is generated.
7. A calibration device for a touchscreen, characterized in that, include: A module is created to create a first calibration task that runs on the graphical user interface layer and a second calibration task that runs on the touch driver layer. The first calibration task is used to draw the calibration interface, and the second calibration task is used to process the calibration timing, data sampling, and calibration parameter calculation. The first execution module is used to execute the second calibration task at the current preset calibration point in the touch driver layer and send the execution status of the second calibration task to the graphical user interface layer; This includes: the touch driver layer sampling the touch parameters of the current preset calibration point, determining whether the execution status of the second calibration task is calibration completed based on the sampling result, and sending the determination result to the graphical user interface layer; The second execution module is configured to, if the execution status of the second calibration task is calibration completed, generate a calibration result in the touch driver layer and send the calibration result to the graphical user interface layer, and the graphical user interface layer executes the first calibration task to display the calibration result; if the execution status of the second calibration task is calibration not completed, the touch driver layer sends the calibration coordinates corresponding to the next preset calibration point to the graphical user interface layer, the graphical user interface layer executes the first calibration task to display the next preset calibration point, and the touch driver layer uses the next preset calibration point as the current preset calibration point and continues to execute the second calibration task.
8. An electronic device, characterized in that, include: The calibration device for a touch screen as described in claim 7.
Citation Information
Patent Citations
Screen calibrating method and device for touch screen in Android system
CN103488368A
Calibration error confirmation method and device, and mobile terminal
CN106899298A