Use the color palette to flash alarm content

Source: Internet
Author: User

Title: flashing alarm content using the color palette

Author: favory. Peng (2010-05-11)

 

In the monitor or other medical instruments, you will see that some parameters need to flash constantly. In the medical instruments, this indicates that the detection parameters are beyond the set alarm range. The blinking is to remind users that the parameters are too high, greater than or less than the lower limit (too long !!!);

Generally, the blinking mode is similar to the following two methods:

1. display parameters in the alarm with two colors at a fixed frequency;

2. display or hide parameters in the alarm at a fixed frequency;

No matter what blinking method is used, it is always a parameter in the repeatedly displayed alarm. In the display process, a large amount of CPU resources are consumed, and the poor processing will make the user feel the font display process, if this parameter is too large, it will have a particularly significant impact on the system. For example, poor processing in the monitor will affect the display of physiological waveforms (ECG, ple, etc, of course, if you have a strong CPU capacity or video card support, you don't have to worry about it, so you don't have to look at it. (This is yours, huh, huh !).

For a long time, it seems that I haven't talked about the key point (don't worry, I'll reveal it right away). Next I'll talk about how I solved this problem. It's actually very simple, maybe the ox knows what I want to say when they see the title;

Using the color palette to flash the alarm content is actually to use the color value of a color number in the display palette to flash the alarm parameters, when the parameter is displayed, if the parameter enters the alarm status, we will use the color number of the specified palette to display this parameter, and then change the color value of this color number according to the fixed frequency and rules, in this way, the color of the parameter is changed to achieve the parameter alarm flickering effect.

 

/*************************************** ******************

* Author: favory. Peng 2009/12/2

* Function: change the color of the color palette.

* Parameter: Target color number, source color number

**************************************** ******************/

Void guiapi LCD _changcolor (uint8 cdst, uint8 CSRC)

{

Panel_info.controller.lcdc-> lcdc_lut_entry [cdst] =

Panel_info.controller.lcdc-> lcdc_lut_entry [CSRC];

}

 

Note: This method may damage the content of the original palette, which is unfavorable for displaying BMP images, you can only find a remote color number and use it as an alarm parameter to display the color number. Pray that this color number is not used in the image (luck is required ); the solution I want is to select two color numbers (A and B) with similar colors and use one of them (a) to display the color numbers in the alarm parameters, add a judgment in the function of displaying the image. When a is encountered, use B to replace it. This will confuse us. Of course, the effect of the image display will be worse, as long as the color selection is close enough, this is not a big problem.

 

Note: although this article is not highly technical, this ideal is good. I would like to thank my colleague Comrade Wen for his help. I hope this ideal will be helpful to friends who have similar applications ....

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.