Airborne display brightness adjusting method, system, equipment and medium
By establishing state machine jump logic and filtering processing technology in the on-board display, the leakage and jitter problems of knob encoder acquisition are solved, and the stability and accuracy of brightness adjustment are achieved.
Patent Information
- Application Number
- CN202411802024.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, problems of leakage and poor real-time performance are prone to occur when collecting the knob encoder through software, and problems of errors, leakage or multiple extractions occur due to jitter during acquisition through FPGA.
Establish the state machine jump logic based on the phase level relationship between the A-phase level and the B-phase level in the pulse output by the knob encoder, and generates the left-hand or right-hand pulse signal of a single-sampled clock cycle through the state machine, and processes the signal through the set filtering time to obtain a stable brightness increase and decrease signal.
It effectively avoids the problems of missing, missed and multi-retrieval in the collection of knob encoder, improves the stability and accuracy of knob encoder acquisition, and ensures accurate adjustment of the display brightness.
Smart Images

Figure CN119785728A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a display brightness adjustment technology, and in particular to an airborne display brightness adjustment method, system, equipment and medium. Background Art
[0002] At present, the brightness adjustment of airborne displays is implemented by adjusting the knob encoder. The knob signal is directly filtered and collected by software. Since software tasks are executed sequentially, when the software processing task volume is relatively large, missed acquisition may occur. In addition, the direct use of fixed-time filtering by the software will also cause acquisition delays, which reduces the sensitivity of the display knob acquisition.
[0003] There is also an FPGA that uses the A and B phase levels output by the encoder to set the corresponding state machine to determine whether it is in the forward rotation state or the reverse rotation state to achieve brightness adjustment. Although the real-time performance of this acquisition can be guaranteed, when the knob encoder is damaged or has poor mechanical properties, it will oscillate repeatedly during the rotation of the knob. If the A phase or B phase signal oscillates repeatedly, the trigger state machine will jump incorrectly, resulting in misjudgment, which reduces the accuracy of brightness adjustment. Summary of the invention
[0004] In order to solve the technical problems of missed sampling and poor real-time performance when the knob encoder is collected by software, and the technical problems of wrong sampling, missed sampling or over-sampling due to jitter when the knob encoder is collected by FPGA, the present invention discloses a method for adjusting the brightness of an airborne display, which comprises the following steps:
[0005] S1. Establish the state machine jump logic according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder;
[0006] S2, collecting the initial pulse output by the knob encoder, and judging the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, generating a left-handed pulse signal or a right-handed pulse signal of a single sampling clock cycle through the state machine; if the change sequence is inconsistent with the state machine jump logic, discarding the initial pulse;
[0007] S3, setting a filtering time according to the inherent mechanical characteristics of the knob encoder, filtering the left-hand pulse signal or the right-hand pulse signal by the filtering time to obtain a brightness increase or decrease signal;
[0008] S4. For the current brightness value of the onboard display, increase or decrease the preset brightness value according to the brightness increase or decrease signal to obtain a new brightness value.
[0009] Furthermore, in step S1, according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder, a state machine jump logic is established, including:
[0010] S11, the phase level difference between the A phase level and the B phase level in the pulse output by the given knob encoder;
[0011] S12, in one pulse, the first jump logic of the state machine is set to be A phase level is low level and B phase level is high level, A phase level is high level and B phase level is high level, A phase level is high level and B phase level is low level, and A phase level is low level and B phase level is low level in sequence;
[0012] S13, in one pulse, the second jump logic of the state machine is set to be A phase level is high level and B phase level is low level, A phase level is high level and B phase level is high level, A phase level is low level and B phase level is high level, and A phase level is low level and B phase level is low level in sequence;
[0013] S14. Use the first jump logic and the second jump logic as state machine jump logic.
[0014] Further, in step S2, the initial pulse output by the knob encoder is collected, and the change sequence of the A-phase level and the B-phase level in the initial pulse is judged to be consistent with the state machine jump logic, including:
[0015] S21, rotating the knob encoder to collect the initial pulse output by the knob encoder;
[0016] S22, extracting the jump data of the A phase level and the B phase level respectively from the front end to the end direction of the initial pulse;
[0017] S23. Match the jump data of the A-phase level and the jump data of the B-phase level with the jump logic of the state machine. If the jump data of the A-phase level and the jump data of the B-phase level are consistent with the jump logic of the state machine, the initial pulse is judged to be valid; if the jump data of the A-phase level and the jump data of the B-phase level are inconsistent with the jump logic of the state machine, the initial pulse is judged to be invalid and discarded.
[0018] Furthermore, in step S2, a left-hand pulse signal or a right-hand pulse signal with a single sampling clock cycle is generated by a state machine, including:
[0019] S24, when it is defined that the initial pulse satisfies the first jump logic, the initial pulse is determined to be a left-handed pulse, and a left-handed pulse signal with a single sampling clock cycle is generated by a left-handed state machine;
[0020] S25, when it is defined that the initial pulse satisfies the second jump logic, the initial pulse is determined to be a right-hand pulse, and a right-hand pulse signal with a single sampling clock cycle is generated by a right-hand state machine;
[0021] S26, defining that when the left-hand pulse signal is output, the current brightness value of the onboard display is reduced, and when the right-hand pulse signal is output, the current brightness value of the onboard display is increased.
[0022] Further, in step S3, a filter time is set according to the inherent mechanical characteristics of the knob encoder, and the left-hand pulse signal or the right-hand pulse signal is filtered by the filter time to obtain a brightness increase or decrease signal, including:
[0023] S31, setting a filter time according to the inherent mechanical characteristics of the knob encoder, and using the filter time as the maximum count of the counter;
[0024] S32, starting counting of the counter from the falling edge of the left-hand pulse signal or the right-hand pulse signal;
[0025] S33, when the rising edge of the left-hand pulse signal or the right-hand pulse signal is detected, clearing the counter;
[0026] S34, when the maximum count of the counter is equal to the filtering time and the rising edge of the left-handed pulse signal or the right-handed pulse signal is not detected, the left-handed pulse signal or the right-handed pulse signal is used as a brightness increase or decrease signal;
[0027] S35. Keep the count value of the counter as the maximum count until the next left-hand pulse signal or the rising edge of the right-hand pulse signal is detected, and clear the counter.
[0028] The embodiment of the present invention also provides an airborne display brightness adjustment system, including a state machine jump logic establishment module, a jump filter time setting module, a pulse acquisition and anti-shake processing module, a time filtering module and a brightness adjustment module.
[0029] The state machine jump logic establishment module is used to establish the state machine jump logic according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder;
[0030] The jump filter time setting module is used to set the filter time according to the inherent mechanical characteristics of the knob encoder;
[0031] The pulse acquisition and anti-shake processing module is used to acquire the initial pulse output by the knob encoder, and to judge the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, a left-handed pulse signal or a right-handed pulse signal of a single sampling clock cycle is generated by the state machine; if the change sequence is inconsistent with the state machine jump logic, the initial pulse is discarded;
[0032] The time filtering module is used to filter the left-handed pulse signal or the right-handed pulse signal according to the filtering time to obtain a brightness increase or decrease signal;
[0033] The brightness adjustment module is used to increase or decrease a preset brightness value according to a brightness increase or decrease signal for the current brightness value of the onboard display to obtain a new brightness value.
[0034] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned methods for adjusting the brightness of an onboard display when executing the computer program, so as to solve the technical problems of missed sampling and poor real-time performance caused by sampling a knob encoder through software, and the technical problems of mis-sampling or over-sampling caused by jitter when sampling a knob encoder through FPGA.
[0035] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing any of the above-mentioned methods for adjusting the brightness of an onboard display, so as to solve the technical problems of missed sampling and poor real-time performance caused by sampling a knob encoder through software, and the technical problems of mis-sampling or over-sampling caused by jitter when sampling a knob encoder through FPGA.
[0036] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above technical solutions adopted in the embodiments of this specification include at least: the method for adjusting the brightness of an airborne display of the present invention establishes a state machine jump logic according to the phase relationship between the A-phase level and the B-phase level in the pulse, and the pulse output by the knob encoder can be anti-shake processed through the state machine jump logic, and the left-handed pulse signal or right-handed pulse signal of the generated single sampling clock cycle can be filtered through the set filtering time to obtain a stable brightness increase or decrease signal to increase or decrease the brightness of the display screen. The method of the present invention can use FPGA as the core processing device, make full use of the parallel processing capability and real-time processing characteristics of FPGA, avoid collecting jitter pulses, missed or multiple pulses, and ensure the stability of the knob encoder collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flow chart of a method for adjusting the brightness of an airborne display disclosed in an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the first jump logic of the state machine disclosed in an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the second jump logic of the state machine disclosed in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of the brightness adjustment system of an airborne display disclosed in an embodiment of the present invention;
[0042] Among them, 401 is a state machine jump logic establishment module; 402 is a jump filter time setting module; 403 is a pulse acquisition and anti-shake processing module; 404 is a time filtering module; 405 is a brightness adjustment module. DETAILED DESCRIPTION
[0043] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0044] The following describes the implementation methods of the present application through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and the features of the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0045] The embodiment of the present invention discloses a method for adjusting the brightness of an onboard display. Figure 1 As shown, the method comprises the following steps:
[0046] S1. Establish the state machine jump logic according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder;
[0047] S2, collecting the initial pulse output by the knob encoder, and judging the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, generating a left-handed pulse signal or a right-handed pulse signal of a single sampling clock cycle through the state machine; if the change sequence is inconsistent with the state machine jump logic, discarding the initial pulse;
[0048] S3, setting a filtering time according to the inherent mechanical characteristics of the knob encoder, filtering the left-hand pulse signal or the right-hand pulse signal by the filtering time to obtain a brightness increase or decrease signal;
[0049] S4. For the current brightness value of the onboard display, increase or decrease the preset brightness value according to the brightness increase or decrease signal to obtain a new brightness value.
[0050] The method of the present invention processes the initial pulse output by the knob encoder through two filtering methods to obtain a stable pulse. The principle is: first, a fixed state machine jump relationship (i.e., state machine jump logic) is set according to the phase relationship between the A phase level and the B phase level in the initial pulse output by the knob encoder. If a pulse signal with jitter burrs appears in the initial pulse, the state machine will not jump normally, and the forward rotation (i.e., right rotation) or reverse rotation (i.e., left rotation) operation will not be triggered; secondly, if the knob encoder is seriously damaged, a signal that repeatedly jumps may appear when the knob is turned, which is easy to trigger the normal jump of the state machine, thereby causing the FPGA to misjudge the forward rotation or reverse rotation output as a multi-sample situation. In order to avoid this state, after setting the forward and reverse rotation jump state machine judgment, the forward and reverse rotation signals after judgment are time-filtered according to the inherent characteristics of the knob switch and the maximum jitter time (i.e., jump filter time), thereby ensuring the accurate acquisition of the knob encoder. The present invention realizes anti-shake of the brightness adjustment of the airborne display by setting the correct state jump sequence and the time filtering combination, thereby ensuring the accurate adjustment of the brightness of the airborne display.
[0051] Furthermore, in step S1, according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder, a state machine jump logic is established, including:
[0052] S11, a phase level difference between the A phase level and the B phase level in the pulse output by the given knob encoder, for example, the phase level difference between the two phase levels can be set to 90°, or can be set to 60° or set according to actual needs;
[0053] S12, in one pulse, the first jump logic of the state machine is set to be A phase level is low level and B phase level is high level, A phase level is high level and B phase level is high level, A phase level is high level and B phase level is low level, and A phase level is low level and B phase level is low level in sequence;
[0054] S13, in one pulse, the second jump logic of the state machine is set to be A phase level is high level and B phase level is low level, A phase level is high level and B phase level is high level, A phase level is low level and B phase level is high level, and A phase level is low level and B phase level is low level in sequence;
[0055] S14. Use the first jump logic and the second jump logic as state machine jump logic.
[0056] It should be noted that the high level can be represented by 1, and the low level can be represented by 0. The second jump logic of the state machine is R1→R2→R3→R4→R1→…, that is, Figure 3 As shown in 10→11→01→00→10→…. The first jump logic of the state machine is L1→L2→L3→L4→L1→…, that is, Figure 2 00→01→11→10→00→… as shown in the figure.
[0057] Further, in step S2, the initial pulse output by the knob encoder is collected, and the change sequence of the A-phase level and the B-phase level in the initial pulse is judged to be consistent with the state machine jump logic, including:
[0058] S21, rotating the knob encoder to collect the initial pulse output by the knob encoder;
[0059] S22, extracting the jump data of the A phase level and the B phase level respectively from the front end to the end direction of the initial pulse;
[0060] S23. Match the jump data of the A-phase level and the jump data of the B-phase level with the jump logic of the state machine. If the jump data of the A-phase level and the jump data of the B-phase level are consistent with the jump logic of the state machine, the initial pulse is judged to be valid; if the jump data of the A-phase level and the jump data of the B-phase level are inconsistent with the jump logic of the state machine, the initial pulse is judged to be invalid and discarded.
[0061] For specific implementation, see Figure 2 and Figure 3 As shown, Figure 2 This is a schematic diagram of the first jump logic. Figure 3The diagram is a schematic diagram of the second jump logic. When rotating right, the jump sequence of the state machine in the second jump logic is R1→R2→R3→R4. When a complete jump in this sequence occurs, it is considered that the knob is rotated right once, and a right rotation state signal is generated. If an abnormal jump occurs between R1, R2, R3, and R4 (R1's next jump state is not R2, R2's next jump state is not R3, R3's next jump state is not R4, and R4's next jump state is not R1), the current state remains unchanged, and this abnormal jump is considered to be jitter, and no forward rotation state signal is generated. When rotating left, the jump order of the state machine in the first jump logic is L1→L2→L3→L4. When a complete jump in this order occurs, it is considered that the knob is rotated left once, and a left-rotation state signal is generated. If an abnormal jump occurs between L1, L2, L3, and L4 (the next jump state of L1 is not L2, the next jump state of L2 is not L3, the next jump state of L3 is not L4, and the next jump state of L4 is not L1), the current state remains unchanged, and this abnormal jump is considered to be jitter, and no reverse rotation state signal is generated.
[0062] Furthermore, in step S2, a left-hand pulse signal or a right-hand pulse signal with a single sampling clock cycle is generated by a state machine, including:
[0063] S24, when it is defined that the initial pulse satisfies the first jump logic, the initial pulse is determined to be a left-handed pulse, and a left-handed pulse signal with a single sampling clock cycle is generated by a left-handed state machine;
[0064] S25, when it is defined that the initial pulse satisfies the second jump logic, the initial pulse is determined to be a right-hand pulse, and a right-hand pulse signal with a single sampling clock cycle is generated by a right-hand state machine;
[0065] S26, defining that when the left-hand pulse signal is output, the current brightness value of the onboard display is reduced, and when the right-hand pulse signal is output, the current brightness value of the onboard display is increased.
[0066] Further, in step S3, a filter time is set according to the inherent mechanical characteristics of the knob encoder, and the left-hand pulse signal or the right-hand pulse signal is filtered by the filter time to obtain a brightness increase or decrease signal, including:
[0067] S31, setting a filter time according to the inherent mechanical characteristics of the knob encoder, and using the filter time as the maximum count of the counter;
[0068] S32, starting counting of the counter from the falling edge of the left-hand pulse signal or the right-hand pulse signal;
[0069] S33, when the rising edge of the left-hand pulse signal or the right-hand pulse signal is detected, clearing the counter;
[0070] S34, when the maximum count of the counter is equal to the filtering time and the rising edge of the left-handed pulse signal or the right-handed pulse signal is not detected, the left-handed pulse signal or the right-handed pulse signal is used as a brightness increase or decrease signal;
[0071] S35. Keep the count value of the counter as the maximum count until the next left-hand pulse signal or the rising edge of the right-hand pulse signal is detected, and clear the counter.
[0072] In specific implementation, the jitter pulse can be initially eliminated through step S2, and a left-hand pulse signal or a right-hand pulse signal is generated for the jitter-eliminated pulse. Since the pulse determined by the state machine jump logic is also multi-sampled, the positive and negative state signals obtained by repeated oscillation of the jitter waveform at the beginning or end of a cycle may also have jitter or multi-sample conditions. In this state, according to the inherent mechanical characteristics of the encoder device, the left-hand pulse signal or the right-hand pulse signal is filtered for the maximum jitter time to obtain a final and stable brightness increase or decrease signal.
[0073] When the brightness of the onboard display is adjusted in step S4, step S3 outputs a brightness increase or decrease signal that meets the requirements, that is, the brightness can be adjusted once by the preset brightness value. At this time, a brightness increase or decrease adjustment operation with a preset brightness value of 10 will be triggered. Specifically, when a positive brightness increase or decrease signal is obtained, 10 is added to the current brightness value (the brightness value range is 0-1000) to generate a new brightness value, and the current brightness value is sent to the LCD display module via RS232 to adjust the display brightness value.
[0074] Based on the same inventive concept, an airborne display brightness adjustment system is also provided in an embodiment of the present invention, as described in the following embodiments. Since the principle of solving the problem by the airborne display brightness adjustment system is similar to that of the airborne display brightness adjustment method, the implementation of the airborne display brightness adjustment system can refer to the implementation of the airborne display brightness adjustment method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0075] Figure 4 is a structural block diagram of an onboard display brightness adjustment system disclosed in an embodiment of the present invention, such as Figure 4 As shown, it includes a state machine jump logic establishment module 401, a jump filter time setting module 402, a pulse collection and anti-shake processing module 403, a time filtering module 404 and a brightness adjustment module 405. The structure is described below.
[0076] The state machine jump logic establishment module 401 is used to establish the state machine jump logic according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder;
[0077] The jump filter time setting module 402 is used to set the filter time according to the inherent mechanical characteristics of the knob encoder;
[0078] The pulse acquisition and anti-shake processing module 403 is used to acquire the initial pulse output by the knob encoder, and to judge the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, a left-handed pulse signal or a right-handed pulse signal of a single sampling clock cycle is generated by the state machine; if the change sequence is inconsistent with the state machine jump logic, the initial pulse is discarded;
[0079] The time filtering module 404 is used to filter the left-handed pulse signal or the right-handed pulse signal according to the filtering time to obtain a brightness increase or decrease signal;
[0080] The brightness adjustment module 405 is used to increase or decrease a preset brightness value according to a brightness increase or decrease signal for the current brightness value of the onboard display to obtain a new brightness value.
[0081] The method for adjusting the brightness of an airborne display of the present invention establishes a state machine jump logic according to the phase relationship between the A-phase level and the B-phase level in the pulse, and the pulse output by the knob encoder can be anti-shake processed through the state machine jump logic, and the left-handed pulse signal or right-handed pulse signal of the generated single sampling clock cycle can be filtered through the set filtering time to obtain a stable brightness increase and decrease signal to increase or decrease the brightness of the display screen. The method of the present invention can use FPGA as a core processing device, fully utilize the parallel processing capability and real-time processing characteristics of FPGA, avoid collecting jitter pulses, missed or over-collected pulses, and ensure the stability of the knob encoder collection.
[0082] In this embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned methods for adjusting the brightness of an onboard display when executing the computer program.
[0083] Specifically, the computer device may be a computer terminal, a server or a similar computing device.
[0084] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing any of the above-mentioned onboard display brightness adjustments.
[0085] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include transitory media such as modulated data signals and carrier waves.
[0086] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0087] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modifications and equivalent substitutions made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims
1. A method for adjusting the brightness of an airborne display, characterized in that: include: According to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder, the state machine jump logic is established; Collecting the initial pulse output by the knob encoder, and judging the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, generating a left-handed pulse signal or a right-handed pulse signal of a single sampling clock cycle through the state machine; If the change sequence is inconsistent with the state machine jump logic, discard the initial pulse; The filter time is set according to the inherent mechanical characteristics of the knob encoder, and the left-hand pulse signal or the right-hand pulse signal is filtered by the filter time to obtain a brightness increase or decrease signal; For the current brightness value of the onboard display, the preset brightness value is increased or decreased according to the brightness increase or decrease signal to obtain a new brightness value.
2. The method for adjusting the brightness of an airborne display according to claim 1, characterized in that: According to the phase level relationship between the A-phase level and the B-phase level in the pulse output by the knob encoder, the state machine jump logic is established, including: The phase level difference between the A phase level and the B phase level in the pulse output by the given knob encoder; In one pulse, the first jump logic of the state machine is set to be, in sequence, the A phase level is low and the B phase level is high, the A phase level is high and the B phase level is high, the A phase level is high and the B phase level is low, and the A phase level is low and the B phase level is low; In one pulse, the second jump logic of the state machine is set to be, in sequence, the A phase level is high and the B phase level is low, the A phase level is high and the B phase level is high, the A phase level is low and the B phase level is high, and the A phase level is low and the B phase level is low; The first jump logic and the second jump logic are used as state machine jump logic.
3. The method for adjusting the brightness of an airborne display according to claim 2, characterized in that: Collecting the initial pulse output by the knob encoder, and judging the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: Rotate the knob encoder to collect the initial pulse output by the knob encoder; Extracting the jump data of the A phase level and the B phase level from the front end to the end direction of the initial pulse respectively; The jump data of the A-phase level and the jump data of the B-phase level are matched with the jump logic of the state machine. If the jump data of the A-phase level and the jump data of the B-phase level are consistent with the jump logic of the state machine, the initial pulse is judged to be valid; if the jump data of the A-phase level and the jump data of the B-phase level are inconsistent with the jump logic of the state machine, the initial pulse is judged to be invalid and discarded.
4. The method for adjusting the brightness of an airborne display according to claim 3, characterized in that: A left-hand pulse signal or a right-hand pulse signal with a single sampling clock cycle is generated by a state machine, including: When the initial pulse is defined to satisfy the first jump logic, the initial pulse is judged to be a left-handed pulse, and a left-handed pulse signal of a single sampling clock cycle is generated by a left-handed state machine; When the initial pulse is defined to satisfy the second jump logic, the initial pulse is judged to be a right-hand pulse, and a right-hand pulse signal with a single sampling clock cycle is generated by a right-hand state machine; It is defined that when the left-hand pulse signal is output, the current brightness value of the onboard display is reduced, and when the right-hand pulse signal is output, the current brightness value of the onboard display is increased.
5. The method for adjusting the brightness of an airborne display according to claim 1, characterized in that: The filter time is set according to the inherent mechanical characteristics of the knob encoder, and the left-hand pulse signal or the right-hand pulse signal is filtered by the filter time to obtain a brightness increase or decrease signal, including: The filter time is set according to the inherent mechanical characteristics of the knob encoder, and the filter time is used as the maximum count of the counter; Starting counting from the falling edge of the left-hand pulse signal or the right-hand pulse signal; When the rising edge of the left-hand pulse signal or the right-hand pulse signal is detected, the counter is cleared; When the maximum count of the counter is equal to the filtering time and the rising edge of the left-handed pulse signal or the right-handed pulse signal is not detected, the left-handed pulse signal or the right-handed pulse signal is used as a brightness increase or decrease signal; The count value of the counter is maintained at the maximum count until the next left-hand pulse signal or the rising edge of the right-hand pulse signal is detected, and the counter is cleared.
6. An airborne display brightness adjustment system, characterized in that: include: A state machine jump logic establishment module, the state machine jump logic establishment module is used to establish the state machine jump logic according to the phase level relationship between the A phase level and the B phase level in the pulse output by the knob encoder; A jump filter time setting module, wherein the jump filter time setting module is used to set the filter time according to the inherent mechanical characteristics of the knob encoder; A pulse acquisition and anti-shake processing module, the pulse acquisition and anti-shake processing module is used to acquire the initial pulse output by the knob encoder, and to judge the consistency between the change sequence of the A-phase level and the B-phase level in the initial pulse and the state machine jump logic, including: if the change sequence is consistent with the state machine jump logic, a left-handed pulse signal or a right-handed pulse signal with a single sampling clock cycle is generated by the state machine; if the change sequence is inconsistent with the state machine jump logic, the initial pulse is discarded; A time filtering module, the time filtering module is used to filter the left-handed pulse signal or the right-handed pulse signal according to the filtering time to obtain a brightness increase or decrease signal; The brightness adjustment module is used to increase or decrease a preset brightness value according to a brightness increase or decrease signal for the current brightness value of the onboard display to obtain a new brightness value.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for adjusting the brightness of an onboard display according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the onboard display brightness adjustment method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Rotary knob value adjusting method based on incremental rotary encoder and related device
CN104698927A
Method and device for controlling encoder switch and electrical device
CN109388080A
A system and method for frequency division and counting of pulse signals of rotary pulse encoder
CN111726115A
Decoding method of incremental encoder and related device
CN111953353A
Clock frequency monitoring system and method and SoC integrated circuit
CN117311449A