Numerical Display Method, Device, Equipment and Readable Storage Medium for Automotive Instrument

By analyzing AD sampled information or CAN messages and calling a general numerical display program, the existing automotive instrument numerical display methods have solved the problems of high chip storage space and high after-sales maintenance costs, achieving more efficient numerical display and maintenance.

CN114860185BActive Publication Date: 2025-06-13DONGFENG AUTOMOBILE ELECTRONICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210475446.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-06-13
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The numerical display method of existing automotive instruments occupies a high amount of chip storage space, and the cost of after-sales maintenance and change is high.

Method used

By analyzing AD sampling information or CAN packets, the integer value of the data to be displayed is obtained, the parameters of the preset configuration are determined based on the data to be displayed, and the general numerical display program is called to display the data to be displayed.

Benefits of technology

It improves the versatility of the numerical display program, reduces the use of the chip storage space of the numerical display program, reduces the workload when subsequent display data changes, and reduces development costs and after-sales risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860185B_ABST
    Figure CN114860185B_ABST
Patent Text Reader

Abstract

The present invention provides a numerical display method, device, equipment and readable storage medium for an automotive instrument. The numerical display method for the automotive instrument includes: parsing the information sampled by AD or CAN messages to obtain the integer value of the data to be displayed; determining the parameters configured in advance based on the data to be displayed; and calling a general numerical display program to display the data to be displayed based on the parameters configured in advance and the integer value of the data to be displayed. Through the present invention, on the basis of realizing the display function of multi-position and multi-type data values on the vehicle instrument, the generality of the numerical display program can be improved, the occupation of the chip storage space by the numerical display program can be reduced, the workload when the data to be displayed needs to be changed subsequently can be reduced, and at the same time, the development cost and after-sales risk can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent displays, and particularly to a numerical display method, device, equipment and readable storage medium for an automotive instrument. Background Art

[0002] With the progress of automotive electronic technology, more and more content needs to be displayed on the liquid crystal of the automotive instrument, such as radar distance, oil pressure, battery voltage, short mileage, total mileage, brake pressure, vehicle weighing and other information. These contents are mostly displayed numerically, which is intuitive, accurate, and convenient for the driver to master the overall vehicle status, and is very important for safe driving.

[0003] Since these display contents vary in their display positions, data lengths, and decimal places on the liquid crystal according to actual needs such as driver habits, the existing practice usually designs different functions for each display data. For example, the display position is directly placed as an immediate number into the corresponding specific function. The display function with decimal place requirements has a decimal point and a decimal part display program more than the display function without a decimal part. The program lengths of multiple display functions with different data lengths before and after the decimal point are also different.

[0004] This method occupies a relatively large amount of the limited program storage space of the chip. And once the customer has a change requirement for the display position, the number of digits before and after the decimal point, it is necessary to modify each corresponding sub-function one by one. The modification workload is large, it is easy to make mistakes, it is not convenient for maintenance, and the development cost and after-sales risk are relatively high. For example, if the display position changes, it is necessary to modify the corresponding horizontal and vertical coordinate values, and according to the size of the display area, it is necessary to determine the starting and ending coordinates of the display, which means that if one coordinate value changes, multiple immediate numbers need to be modified. Since the ending coordinate and the starting coordinate also involve calculations based on the display width, the modification is relatively cumbersome and error-prone. If the number of digits before and after the decimal point changes, it not only involves calculations of the starting and ending coordinates and the display width, but also for an increase in the number of digits, it is necessary to consider the implementation of the increased digits display, and for a decrease in the number of digits, it is necessary to consider removing the display part of the decreased digits, which is time-consuming and laborious. On the other hand, the automotive instrument market is highly competitive and the cost requirements are stringent. The higher the program storage space occupied, the higher-end chips need to be used, resulting in adverse consequences such as increased costs and reduced competitiveness. Summary of the Invention

[0005] The main objective of the present invention is to provide a numerical display method, device, equipment and readable storage medium for an automotive instrument, aiming to solve the technical problems that the existing method for numerical display of automotive instruments has a high occupancy of the chip storage space and high costs for after-sales maintenance and changes.

[0006] In a first aspect, the present invention provides a numerical display method for an automotive instrument, and the numerical display method for the automotive instrument includes the following steps:

[0007] Parse the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed;

[0008] Determine the parameters of the preset configuration based on the data to be displayed;

[0009] Based on the parameters of the preset configuration and the integer value of the data to be displayed, call the general numerical display program to display the data to be displayed.

[0010] Optionally, the parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed. The step of calling the general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed includes:

[0011] Based on the maximum number of digits before the decimal point and the integer value of the data to be displayed, determine the number of invalid leading zeros in the high-order part of the data to be displayed;

[0012] Based on the number of invalid leading zeros in the high-order part of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed;

[0013] Based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed, determine the second target horizontal and vertical coordinates of the decimal point;

[0014] Clear the display of the invalid leading zeros in the high-order part of the data to be displayed;

[0015] Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, display the integer value and the decimal point of the data to be displayed.

[0016] Optionally, if the data to be displayed is vertical modulo / horizontal modulo, the value unit of the vertical coordinate / horizontal coordinate should at least correspond to a preset number of pixels, and the vertical / horizontal digital display range of a single piece of data to be displayed includes at least 2 times the preset number of pixels.

[0017] Optionally, if the data to be displayed is vertical modulo, the step of calculating the first target horizontal and vertical coordinates of the integer value of the data to be displayed based on the number of invalid leading zeros in the high-order part of the data to be displayed and the horizontal and vertical coordinates of the initial display position includes:

[0018] Use the vertical coordinate of the data to be displayed as the first target vertical coordinate of the integer value of the data to be displayed;

[0019] Multiply the number of invalid leading zeros in the high-order part of the data to be displayed by the number of pixels corresponding to the preset display width to obtain the target value;

[0020] Add the abscissa of the initial display position to the target value to obtain the first target abscissa of the integer value of the data to be displayed.

[0021] Optionally, if the display requirement of the data to be displayed changes, change the parameters of the corresponding preset configuration.

[0022] Optionally, the pictures of characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters.

[0023] In a second aspect, the present invention also provides a numerical display device for an automotive instrument, and the numerical display device for the automotive instrument includes:

[0024] An analysis module, configured to analyze the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed;

[0025] A determination module, configured to determine the parameters of the preset configuration based on the data to be displayed;

[0026] A display module, configured to call a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed.

[0027] Optionally, the parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed. The display module is further specifically configured to:

[0028] Based on the maximum number of digits before the decimal point and the integer value of the data to be displayed, determine the number of invalid zeros at the high position of the data to be displayed;

[0029] Based on the number of invalid zeros at the high position of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed;

[0030] Based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed, determine the second target horizontal and vertical coordinates of the decimal point;

[0031] Clear the display of invalid zeros at the high position of the data to be displayed;

[0032] Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, display the integer value and the decimal point of the data to be displayed.

[0033] Optionally, if the data to be displayed is vertical modulo / horizontal modulo, the value unit of the vertical coordinate / horizontal coordinate at least correspondingly includes a preset number of pixels, and the vertical / horizontal digital display range of a single piece of data to be displayed includes at least 2 times or more of the preset number of pixels.

[0034] Optionally, if the data to be displayed is vertical modulo, the display module is further specifically configured to:

[0035] Use the ordinate of the data to be displayed as the first target ordinate of the integer value of the data to be displayed;

[0036] Multiply the number of invalid zeros in the high bit of the data to be displayed by the number of pixels corresponding to the preset display width to obtain a target value;

[0037] Use the abscissa of the initial display position plus the target value to obtain the first target abscissa of the integer value of the data to be displayed.

[0038] Optionally, if the display requirement of the data to be displayed changes, change the parameters of the corresponding preset configuration.

[0039] Optionally, the pictures of characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters.

[0040] In a third aspect, the present invention further provides a numerical display device for an automotive instrument. The numerical display device for an automotive instrument includes a processor, a memory, and a numerical display program for an automotive instrument stored on the memory and executable by the processor. When the numerical display program for an automotive instrument is executed by the processor, the steps of the numerical display method for an automotive instrument as described above are implemented.

[0041] In a fourth aspect, the present invention further provides a readable storage medium. A numerical display program for an automotive instrument is stored on the readable storage medium. When the numerical display program for an automotive instrument is executed by a processor, the steps of the numerical display method for an automotive instrument as described above are implemented.

[0042] The present invention provides a numerical display method for an automotive instrument, including: parsing the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed; determining the parameters of the preset configuration based on the data to be displayed; and calling a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed. Through the present invention, on the basis of realizing the display function of multi-position and multi-type data values on the vehicle instrument, the versatility of the numerical display program is improved, the chip storage space occupied by the numerical display program is reduced, the workload when the data to be displayed needs to be changed subsequently is reduced, and at the same time, the development cost and after-sales risk are reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic hardware structure diagram of a numerical display device for an automotive instrument involved in the embodiment solution of the present invention;

[0044] Figure 2 It is a schematic flowchart of an embodiment of the numerical display method for an automotive instrument of the present invention;

[0045] Figure 3 Schematic diagram of the process of calling a general numerical display program for an embodiment of the numerical display method of an automotive instrument according to the present invention;

[0046] Figure 4 Schematic diagram of the process of calculating the first target horizontal and vertical coordinates for an embodiment of the numerical display method of an automotive instrument according to the present invention;

[0047] Figure 5 Schematic diagram of the functional modules for an embodiment of the numerical display device of an automotive instrument according to the present invention.

[0048] The realization, functional features and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. Specific embodiments

[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0050] In a first aspect, an embodiment of the present invention provides a numerical display device for an automotive instrument.

[0051] Referring to Figure 1 , Figure 1 is a schematic diagram of the hardware structure of the numerical display device for an automotive instrument involved in the embodiment of the present invention. In the embodiment of the present invention, the numerical display device for an automotive instrument may include a processor 1001 (such as a Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 may include an I2C bus, an SPI bus, a LIN bus, or a CAN bus, etc., for realizing the connection and communication between these components; the user interface 1003 may include a display screen (Display) and an input unit such as an internal button or an external button; the network interface 1004 may optionally include a standard wired interface (such as a LIN interface, a CAN interface, or an Ethernet interface, etc.) and a wireless interface (such as a Wireless-FIdelity, WI-FI interface); the memory 1005 may be a high-speed random access memory (random access memory, RAM), or a stable memory (non-volatile memory), such as an internal chip Flash ROM, a disk memory, etc. The memory 1005 may optionally also be a storage device independent of the aforementioned processor 1001. Those skilled in the art can understand that Figure 1 the hardware structure shown in does not constitute a limitation to the present invention, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0052] Continue to refer toFigure 1 , Figure 1 In the memory 1005 as a computer storage medium, it may include an operating system, a network communication module, a user interface module, and a numerical display program for the vehicle instrument. Among them, the processor 1001 may call the numerical display program for the vehicle instrument stored in the memory 1005 and execute the numerical display method for the vehicle instrument provided by the embodiments of the present invention.

[0053] In a second aspect, embodiments of the present invention provide a numerical display method for a vehicle instrument.

[0054] Referring to Figure 2 , Figure 2 is a schematic flowchart of an embodiment of the numerical display method for the vehicle instrument of the present invention.

[0055] In an embodiment of the numerical display method for the vehicle instrument of the present invention, the numerical display method for the vehicle instrument includes:

[0056] Step S10: Parse the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed;

[0057] In this embodiment, the data to be displayed in the vehicle instrument includes battery voltage, oil pressure, front axle load, total rear axle load, and vehicle weight, etc. Among them, the battery voltage comes from AD sampling, and the voltage value to be displayed can be obtained after conversion; the front axle load, total rear axle load, and vehicle weight come from the CAN message, and the values to be displayed can be obtained by combining the communication protocol conversion; the oil pressure can come from the AD signal or the CAN message according to different instrument calibrations. Therefore, by parsing the information sampled by AD or the CAN message, the value of the data to be displayed can be obtained. In the prior art, when parsing the information sampled by AD or the CAN message, if the value of the data to be displayed has a decimal part, that is, a floating-point value, when directly using the floating-point value to participate in the operations in the parsing, the operation efficiency will be relatively slow, and the decimal part and the integer part of the floating-point value need to be stored separately. When subsequently displaying the data to be displayed, the decimal part and the integer part of the floating-point value need to be called separately.

[0058] Therefore, in the solution of this embodiment, magnification processing will be performed when parsing the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed. For example, if the data to be displayed is the front axle load and the value is 9.15t, then the corresponding magnification processing is performed to obtain the integer value of the data to be displayed as 915, with the unit of 0.01. Among them, when performing operations in the parsing, the operation efficiency of integer values is faster than that of floating-point values. At the same time, since integer values can be stored in binary form, when subsequently displaying the data to be displayed, the integer value in binary form can be directly called for display, which is more convenient than calling floating-point values.

[0059] Step S20: Determine the parameters of the preset configuration based on the data to be displayed.

[0060] In this embodiment, the data to be displayed in the vehicle instrument includes battery voltage, oil pressure, front axle load, total rear axle load, and vehicle weight, etc. Each piece of data to be displayed has its corresponding preset configuration parameters, and these preset configuration parameters depend on the display requirements of the data to be displayed, including display accuracy, display position, etc. When the data to be displayed is the front axle load, if the maximum of the front axle load is 655.35t, the display accuracy can be set to 0.01, and according to the degree of influence of the front axle load on vehicle driving, it is set at a relatively upper position in the instrument, and this position corresponds to the pixel coordinates where the numerical value starts to be displayed in the instrument. When the corresponding data needs to be displayed, determine the above preset configuration parameters including display accuracy and display position based on the attributes of the data to be displayed.

[0061] Step S30: Based on the parameters of the preset configuration and the integer value of the data to be displayed, call the general numerical display program to display the data to be displayed.

[0062] In this embodiment, after obtaining the preset configuration parameters corresponding to the data to be displayed and the integer value of the data to be displayed, the general numerical display program can be called to display the data to be displayed. Compared with the prior art, since each display content has different display requirements, the corresponding function programs to be displayed are also different. After obtaining the display data, it is necessary to call the corresponding function programs to display the data to be displayed respectively. In the solution of this embodiment, different data to be displayed correspond to different preset configuration parameters, and there is no need to set corresponding different function programs for different display data. As long as when displaying the corresponding data, determine the preset configuration parameters corresponding to the data to be displayed, and then call the general numerical display program to display the numerical value of the data to be displayed based on different preset configuration parameters. The general numerical display program in the above method has high versatility, occupies less chip storage space, has low development cost, and is also convenient for maintenance in case of subsequent changes or failures.

[0063] Further, in one embodiment, referring to Figure 3 , the parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed, and step S30 further includes:

[0064] Step S301: Based on the maximum number of digits before the decimal point and the integer value of the data to be displayed, determine the number of invalid leading zeros of the high-order part of the data to be displayed.

[0065] Step S302: Based on the number of invalid leading zeros of the high-order part of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed.

[0066] Step S303: Determine the second target horizontal and vertical coordinates of the decimal point based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed.

[0067] Step S304: Clear the display of invalid zeros in the high positions of the data to be displayed.

[0068] Step S305: Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, display the integer value and the decimal point of the data to be displayed.

[0069] In this embodiment, after determining the parameters of the preset configuration based on the data to be displayed, if the parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal digits, and the horizontal and vertical coordinates of the initial display position of the data to be displayed, then assign the parameters of the initial display position (vertical coordinate start_page, horizontal coordinate start_address), the maximum number of digits before the decimal point (n1_lentch), the number of decimal digits (n2_lentch), and the integer data value (u16t_value) to different data to be displayed. At this time, the function definition corresponding to the general numerical display program is void value_display(unsigned char start_page, unsigned short start_address, unsigned char n1_lentch, unsigned char n2_lentch, unsigned short u16t_value). When it is necessary to display the battery voltage, call value_display(14, 255, 2, 0, voltage_value); when it is necessary to display the front axle load, call value_display(2, 174, 3, 2, front_load_value); when displaying the total rear axle load, call value_display(6, 174, 3, 2, rear_load_value) to implement the display function of multi-position and multi-type data values. Among them, voltage_value is the integer value of the battery voltage, front_load_value is the integer value of the front axle load, and rear_load_value is the integer value of the total rear axle load.

[0070] Specifically, the steps of calling a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed include: determining the number of invalid zeros at the high position of the data to be displayed based on the maximum number of digits before the decimal point and the integer value of the data to be displayed. After obtaining the number of invalid zeros at the high position of the data to be displayed, based on the number of invalid zeros at the high position of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed, that is, the first target horizontal and vertical coordinates correspond to the initial pixel position where the integer value of the data to be displayed is displayed on the instrument. Based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed, determine the second target horizontal and vertical coordinates of the decimal point, that is, the second target horizontal and vertical coordinates correspond to the pixel position where the decimal point of the data to be displayed is displayed on the instrument. Clear the display of the invalid zeros at the high position of the data to be displayed to avoid display errors when changing the value of the displayed data, such as changing from a three-digit number to a two-digit number, which may cause a change in the order of magnitude. Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, display the integer value and the decimal point of the data to be displayed. The above general numerical display program is applicable to the display of any data to be displayed on the instrument.

[0071] For example, if the data to be displayed is the front axle load and the display function of the corresponding configuration parameter obtained by calling is value_display(2, 174, 3, 2, front_load_value), it can be determined that the starting position abscissa of the front axle load numerical display is the 174th pixel, and the ordinate corresponds to the second page (assuming 8 pixels = 1 page), there are two digits after the decimal point of the front axle load, and the maximum number of digits before the decimal point of the front axle load is three. If the integer value of the front axle load obtained by parsing the CAN message is front_load_value = 915, then the actual displayed value of the front axle load should be 9.15. Based on this, it can be calculated that the number of invalid zeros at the high position of the data to be displayed is two. If it is vertical modulo and the digital display width is 9 pixels, then based on the number of invalid zeros at the high position of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculate the first target horizontal and vertical coordinates of the integer value 915 of the data to be displayed as (2, 192), with the ordinate displayed first and the abscissa displayed later. Based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed, determine the second target horizontal and vertical coordinates of the decimal point as (2, 201), with the ordinate displayed first and the abscissa displayed later. Clear the display of the invalid zeros at the high position of the data to be displayed, that is, clear the high-position display between (2, 174) and (2, 192). Based on (2, 192) and (2, 201), display the integer value and the decimal point of the data to be displayed, and the displayed value on the vehicle instrument is 9.15.

[0072] Further, in one embodiment, if the data to be displayed is vertically modulo / horizontally modulo, the value unit of the vertical coordinate / horizontal coordinate at least correspondingly includes a preset number of pixels, and the vertical / horizontal digital display range of a single piece of data to be displayed includes at least more than 2 times the preset number of pixels.

[0073] In this embodiment, in order to avoid display anomalies such as screen distortion caused by incorrect parameter setting, if the data to be displayed is vertically modulo, the value unit of the vertical coordinate at least correspondingly includes a preset number of pixels, and the vertical digital display range of a single piece of data to be displayed includes at least more than 2 times the preset number of pixels. If the data to be displayed is horizontally modulo, the value unit of the horizontal coordinate at least correspondingly includes a preset number of pixels, and the horizontal digital display range of a single piece of data to be displayed includes at least more than 2 times the preset number of pixels. For example, if the size of the display screen of an automotive instrument is 320 pixels × 240 pixels horizontally × vertically, then if the data to be displayed is vertically modulo, at this time the value unit of the vertical coordinate at least includes 8 pixels. When the value of a single piece of data to be displayed, such as the front axle load, is 9.15, the vertical display lengths of the numbers 9, 1, and 5 should at least cover 16 pixel positions. This can avoid display anomalies such as screen distortion caused by incorrect parameter setting, resulting in a poor visual experience.

[0074] Further, in one embodiment, referring to Figure 4 , if the data to be displayed is vertically modulo, step S302 further includes:

[0075] Step S3021, using the vertical coordinate of the data to be displayed as the first target vertical coordinate of the integer value of the data to be displayed;

[0076] Step S3022, multiplying the number of invalid leading zeros in the data to be displayed by the number of pixels corresponding to the preset display width to obtain a target value;

[0077] Step S3023, adding the target value to the horizontal coordinate of the initial display position to obtain the first target horizontal coordinate of the integer value of the data to be displayed.

[0078] In this embodiment, if the data to be displayed is vertically modulo, the vertical coordinates of the numerical values in each piece of data to be displayed are the same, while the horizontal coordinates of specific numerical values are different, depending on the width occupied by each numerical value and the position of each numerical value. Specifically, if the data to be displayed is vertically modulo, the steps of calculating the first target horizontal and vertical coordinates of the integer value of the data to be displayed based on the number of invalid leading zeros in the data to be displayed and the horizontal and vertical coordinates of the initial display position specifically include: using the vertical coordinate of the data to be displayed as the first target vertical coordinate of the integer value of the data to be displayed; multiplying the number of invalid leading zeros in the data to be displayed by the number of pixels corresponding to the preset display width to obtain a target value; adding the target value to the horizontal coordinate of the initial display position to obtain the first target horizontal coordinate of the integer value of the data to be displayed.

[0079] For example, if the data to be displayed is vertically modulo - taken and the data to be displayed is the front - axle load, and the called display function of the corresponding configured parameters is value_display(2, 174, 3, 2, front_load_value), then it can be determined that the abscissa of the starting position of the front - axle load value display is the 174th pixel, and the ordinate corresponds to the 2nd page (assuming a preset number of pixels per page, here 8 pixels = 1 page). There are two digits after the decimal point of the front - axle load, and the maximum number of digits before the decimal point of the front - axle load is three. If the integer value of the front - axle load parsed from the CAN message is front_load_value = 915, it means that the number of invalid leading zeros in the high - order part of the data to be displayed is two, and the actual displayed value of the front - axle load should be 9.15. Among them, the starting display ordinates of the numbers 9, 1, and 5 in the front - axle load are the same, all being the 2nd page, that is, the 16th pixel. However, the abscissas are different. If the width occupied by each digit is 9 pixels, then calculate the number of invalid leading zeros in the high - order part of the data to be displayed multiplied by 9 pixels, and the obtained target value is 18 pixels. Add 18 pixels to the abscissa of the starting position of the front - axle load value display, which is the 174th pixel, to get the first target abscissa for starting to display the number 9, which is 192 pixels. That is, the first target abscissa and ordinate of the integer value 915 of the front - axle load are (2, 192). For vertical modulo - taking, the ordinate is displayed first and the abscissa is displayed later.

[0080] Further, in one embodiment, if the display requirement of the data to be displayed changes, the parameters of the corresponding preset configuration are changed.

[0081] In this embodiment, when the display requirement of the data to be displayed changes, since different data to be displayed in this embodiment scheme all call this general numerical display program to display the integer value of the data to be displayed according to the preset process, and each data to be displayed only has differences in the corresponding preset configuration parameters, and the preset configuration parameters depend on the display requirements of the data to be displayed, including display accuracy, display position, etc. When the requirement of the data to be displayed changes, only the corresponding preset configuration parameters need to be changed. Compared with the prior art where the corresponding sub - function display programs need to be changed one by one, the workload of changing in this embodiment scheme is small, it is not easy to make mistakes and is convenient for maintenance, and both the development cost and after - sales risk are reduced.

[0082] Further, in one embodiment, the pictures of the characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters.

[0083] In this embodiment, the pictures of the characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters, which can reduce the irritation to the eyes and increase visual comfort.

[0084] In this embodiment, a method for numerically displaying an automotive instrument is provided, including: parsing the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed; determining the parameters of the preset configuration based on the data to be displayed; and calling a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed. Through the present invention, on the basis of realizing the display function of multi-position and multi-type data values on the vehicle instrument, the generality of the numerical display program is improved, the occupation of the chip storage space by the numerical display program is reduced, the workload for subsequent changes in the data to be displayed is alleviated, and at the same time, the development cost and after-sales risk are reduced.

[0085] In a third aspect, an embodiment of the present invention further provides a numerical display device for an automotive instrument.

[0086] Referring to Figure 5 , a schematic diagram of the functional modules of an embodiment of the numerical display device for an automotive instrument.

[0087] In this embodiment, the numerical display device for the automotive instrument includes:

[0088] A parsing module 10, configured to parse the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed;

[0089] A determining module 20, configured to determine the parameters of the preset configuration based on the data to be displayed;

[0090] A display module 30, configured to call a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed.

[0091] Further, in an embodiment, the parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed. The display module 30 is further specifically configured to:

[0092] Determine the number of invalid leading zeros of the data to be displayed based on the maximum number of digits before the decimal point and the integer value of the data to be displayed;

[0093] Calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed based on the number of invalid leading zeros of the data to be displayed and the horizontal and vertical coordinates of the initial display position;

[0094] Determine the second target horizontal and vertical coordinates of the decimal point based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed;

[0095] Clear the display of the invalid leading zeros at the high position of the data to be displayed;

[0096] Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, display the integer value and decimal point of the data to be displayed.

[0097] Further, in one embodiment, if the data to be displayed is vertical modulo / horizontal modulo, the value unit of the vertical coordinate / horizontal coordinate at least correspondingly includes a preset number of pixels, and the vertical / horizontal digital display range of a single piece of data to be displayed includes at least more than 2 times the preset number of pixels.

[0098] Further, in one embodiment, if the data to be displayed is vertical modulo, the display module 30 is further specifically configured to:

[0099] Use the vertical coordinate of the data to be displayed as the first target vertical coordinate of the integer value of the data to be displayed;

[0100] Multiply the number of invalid zeros in the high position of the data to be displayed by the number of pixels corresponding to the preset display width to obtain a target value;

[0101] Use the sum of the horizontal coordinate of the initial display position and the target value to obtain the first target horizontal coordinate of the integer value of the data to be displayed.

[0102] Further, in one embodiment, if the display requirement of the data to be displayed changes, then change the parameters of the corresponding preset configuration.

[0103] Further, in one embodiment, the pictures of the characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters.

[0104] Among them, the function implementation of each module in the above numerical display device of the vehicle instrument corresponds to each step in the above embodiment of the numerical display method of the vehicle instrument, and its function and implementation process will not be elaborated here one by one.

[0105] Fourthly, the embodiment of the present invention further provides a readable storage medium.

[0106] The readable storage medium of the present invention stores a numerical display program for a vehicle instrument, wherein when the numerical display program for the vehicle instrument is executed by a processor, the steps of the numerical display method of the vehicle instrument as described above are implemented.

[0107] Among them, the method implemented when the numerical display program of the vehicle instrument is executed can refer to each embodiment of the numerical display method of the vehicle instrument of the present invention, and will not be elaborated here.

[0108] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or system. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.

[0109] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0110] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device to execute the methods described in various embodiments of the present invention.

[0111] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for numerical display of an automotive instrument, characterized in that, the method for numerical display of the automotive instrument includes: Parsing the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed; Determining the parameters of the preset configuration based on the data to be displayed; Based on the parameters of the preset configuration and the integer value of the data to be displayed, calling a general numerical display program to display the data to be displayed; The parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed. The step of calling a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed includes: Based on the maximum number of digits before the decimal point and the integer value of the data to be displayed, determining the number of invalid zeros at the high position of the data to be displayed; Based on the number of invalid zeros at the high position of the data to be displayed and the horizontal and vertical coordinates of the initial display position, calculating the first target horizontal and vertical coordinates of the integer value of the data to be displayed; Based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed, determining the second target horizontal and vertical coordinates of the decimal point; Clearing the display of invalid zeros at the high position of the data to be displayed; Based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates, displaying the integer value and the decimal point of the data to be displayed.

2. The method for numerical display of an automotive instrument according to claim 1, characterized in that: If the data to be displayed is vertical modulo / horizontal modulo, the value unit of the vertical coordinate / horizontal coordinate at least corresponds to including a preset number of pixels, and the vertical / horizontal digital display range of a single piece of data to be displayed includes at least 2 times or more of the preset number of pixels, where the preset number of pixels is 8 pixels.

3. The method for numerical display of an automotive instrument according to claim 1, characterized in that, If the data to be displayed is vertical modulo, the step of calculating the first target horizontal and vertical coordinates of the integer value of the data to be displayed based on the number of invalid zeros at the high position of the data to be displayed and the horizontal and vertical coordinates of the initial display position includes: Taking the vertical coordinate of the data to be displayed as the first target vertical coordinate of the integer value of the data to be displayed; Multiplying the number of invalid zeros at the high position of the data to be displayed by the number of pixels corresponding to the preset display width to obtain a target value; Taking the sum of the horizontal coordinate of the initial display position and the target value to obtain the first target horizontal coordinate of the integer value of the data to be displayed.

4. The method for numerical display of an automotive instrument according to claim 1, characterized in that: If the display requirement of the data to be displayed changes, the corresponding parameters of the preset configuration are changed.

5. The method for numerical display of an automotive instrument according to claim 1, characterized in that: The pictures of characters and Chinese characters corresponding to the data to be displayed are all displayed in reverse with black background and white characters.

6. A numerical display device for an automotive instrument, characterized in that, the numerical display device for the automotive instrument includes: A parsing module for parsing the information sampled by AD or the CAN message to obtain the integer value of the data to be displayed; A determining module for determining the parameters of the preset configuration based on the data to be displayed; A display module, configured to call a general numerical display program to display the data to be displayed based on the parameters of the preset configuration and the integer value of the data to be displayed; The parameters of the preset configuration include the maximum number of digits before the decimal point, the number of decimal places, and the horizontal and vertical coordinates of the initial display position of the data to be displayed. The display module is further configured to: Determine the number of leading invalid zeros of the data to be displayed based on the maximum number of digits before the decimal point and the integer value of the data to be displayed; Calculate the first target horizontal and vertical coordinates of the integer value of the data to be displayed based on the number of leading invalid zeros of the data to be displayed and the horizontal and vertical coordinates of the initial display position; Determine the second target horizontal and vertical coordinates of the decimal point based on the maximum number of digits before the decimal point and the horizontal and vertical coordinates of the initial display position of the data to be displayed; Clear the display of the leading invalid zeros of the data to be displayed; Display the integer value and the decimal point of the data to be displayed based on the first target horizontal and vertical coordinates and the second target horizontal and vertical coordinates.

7. A numerical display device for a vehicle instrument, Characterized in that, The numerical display device for the vehicle instrument includes a processor, a memory, and a numerical display program for the vehicle instrument stored on the memory and executable by the processor. When the numerical display program for the vehicle instrument is executed by the processor, the steps of the numerical display method for the vehicle instrument according to any one of claims 1 to 5 are implemented.

8. A readable storage medium, Characterized in that, The readable storage medium stores a numerical display program for a vehicle instrument. When the numerical display program for the vehicle instrument is executed by a processor, the steps of the numerical display method for the vehicle instrument according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Numerical processing method and device

    CN111367502A