Clone calibrui Module

Source: Internet
Author: User

Problem description: How to clone the calibrui module during system customization. Modify the UI and control operations on the touch screen on time based on the software requirements.
Let's talk about the method first. The "How to replace the calibrui module" in the wince document describes how to do this. Clone the calibrui module in Pb to generate the project calibrui [gwe2 clone. All the modifications we have to make are in this project. After modification, click sysgen in build OS. Okay, you have done it.
The method is simple. But it is a good thing to do. Many problems will occur in the process of doing so. I wrote down my problems and solutions. For reference.
First, look for solutions from confusion. I just encountered a touch screen calibration problem. I don't know how to do it.
I originally thought that the driver had completed the calibrate function, and then introduced an interface. The application layer controls the UI and calls the driver to start calibrate. I ignored the existence of the OS. The architecture is still not good. The correct solution should be to encapsulate a calibrate module in the OS, which leads to the calibrui module as the UI interface so that developers can perform actions here to change the UI and control. This is really good. It works for portability, modularity, and so on.
When you are confused and helpless, you can find a solution on the Internet. Basically, you can only use the touchcalibrate function on the Internet. However, this function can only start the calibrate in the OS. Now you can call the calibrate function, so the UI control of the calibrate function should also be implemented. This idea is correct. If you want to find the touchcalibrate () code, you can change the UI under its control. Sadly, the touchcalibrate () Code cannot be found. I don't know if I did not find the code or Microsoft didn't open it. If so, it is no wonder that everyone will say that Microsoft is not honest. Why? I am so depressed that I have paid a lot of attention. As a result, Microsoft told you, Haha, I will not tell you the answer you want. In confusion, the light was shocked. "The book has its own face like a jade", and the Goddess has come out of the document. The "How to replace the calibrui module" is found ". Experience: If you encounter problems, read the document carefully and find the solution from the document that is most likely to solve your problem. The solutions found on the Internet can only be referenced. You must understand what problems it solves. Unfortunately, most articles on the Internet only talk about their own methods, rather than the problems they can solve.
Second, with "how to replace the calibrui module", we need to verify its feasibility. Change the UI prompt information to Chinese for testing. This is the problem encountered when building OS-> sysgen. This is the most time-consuming. Sysgen takes 10 minutes at a time. When a person is waiting, the time is getting older and walking slowly. The sysgen DEBUG command is successful, but the problem has not been solved yet. I don't know why. Therefore, you can only try sysgen release. The sysgen release passed, but the school was on time and was still running in Chinese. Depressed, goddess does not work. The team lead solved this problem and made the goddess a reality. He cannot find calibrui_clone.rc in the error message of sysgen. Therefore, manually copy calibrui_clone.res to the 0409 and 0804 folders of % wince500 % \ pbworkspaces \ % OS _ designname % \ calibrui \ OBJ \ armv4i \ retail. (The OS language I have customized is in Chinese and English. 0804,0409 stands for both Chinese and English ). Okay, sysgen passed, and the Chinese calibration prompt came out. Experience can save time, that is, wealth. The team lead calls the program and the ability to check errors is worth learning. When I used Pb for the first time, I was dumpfounded when I encountered an error. I don't know how to adjust it. Note that if calibrui_clone.rc is changed, manually replace calibrui_clone.rc in the preceding two folders. After changing calibrui [gwe2 clone. To clear the % wince500 % \ pbworkspaces \ % OS _ designname % \ reldir \ smdk2443_armv4i_releasefile, delete gwes.exe as few as possible. Gwes.exe will not be updated when sysgeness is not repeated. That is to say, you cannot see the result you want. Maybe you want to check the clean before building. I did. This should be a Microsoft Bug. However, the team lead said that we have not used any patches for Pb. I wonder if this problem is still widespread.
Finally, after seeing the bright Avenue. The UI is changed along with this method as needed. I mainly changed calibrui. cpp and calibrui_clone.rc. I will introduce the main functions of calibrui. cpp. To change it, you must first know what it is.
Touchcalibrateui_initialize for initialization. Save two global variables.
Touchcalibrateui_drawmainscreen prints calibration operation instructions.
Touchcalibrateui_handleuserinputmessage captures screen events and performs corresponding operations.
Touchcalibrateui_drawconfirmationscreen prints the new calibration measurement and prompts whether to save it.
Touchcalibrateui_waitforconfirmation is waiting for the user to decide and print the relevant information.
These five functions are first sequenced by the called Start sequence.
Touchcalibrateui_drawmainscreen and touchcalibrateui_drawconfirmationscreen both call touchcalibratedrawscreentext. Touchcalibratedrawscreentext is used to hit a string to the screen. I made some changes in this function. Such as changing the screen background color and changing the color of printed words.
The screen calibration problem that has been plagued for a long time has finally been solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.