Ceiling Screen Control Method, Device, Computer Equipment and Storage Medium
By real-time monitoring and calculating the angle change value of the ceiling screen and determining the calibration rotation angle, the motor blockage caused by ceiling screen installation error is solved, and the precise control of the ceiling screen and the long life of the motor is achieved.
Patent Information
- Application Number
- CN202211157437.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-09-22
AI Technical Summary
In the prior art, the installation error of the ceiling screen causes the vehicle terminal to be unable to accurately determine the maximum or minimum angle of the ceiling screen, which in turn causes the motor to be blocked, wasted power and may damage the motor.
By obtaining the magnetic signal of the ceiling screen in real time, calculate the angle change value between the current angle and the previous angle. If the change value is less than the preset difference, update the angle change count. When the count is greater than the predesigned number, determine the current angle as the calibration rotation angle, and control the rotation of the ceiling screen according to the calibration rotation angle in response to the control command.
On the basis of not requiring the installation accuracy of the ceiling screen, the ceiling screen rotation is controlled by obtaining the calibrated rotation angle, which avoids the motor blockage, thereby avoiding the noise caused by the motor blockage and extending the service life of the motor.
Smart Images

Figure CN115556677B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of device control, and in particular, to a control method, device, computer device and storage medium for a ceiling screen. Background Art
[0002] A ceiling screen is a human-machine interaction device installed inside a vehicle. Usually, the vehicle-mounted terminal (ECU, Electronic Control Unit) of the vehicle controls the rotation of the ceiling screen by controlling a permanent magnet synchronous motor to realize the switching between the unfolded state and the closed state of the ceiling screen. At the same time, during the process of the vehicle-mounted terminal controlling the rotation of the ceiling screen, the current angle of the ceiling screen is determined by obtaining the magnet detection signal, and then the current state of the ceiling screen is confirmed.
[0003] However, since the magnets used to determine the current angle of the ceiling screen usually have errors during the installation process, the current angle determined by the vehicle-mounted terminal through the magnet detection signal also has errors. Due to the inaccurate current angle obtained, it is impossible to accurately determine whether the ceiling screen has rotated to the maximum angle or the minimum angle. Taking the ceiling screen rotating to the maximum angle as an example, due to the error in detecting the angle, the vehicle-mounted terminal determines that the current angle is not the maximum angle. The vehicle-mounted terminal will continue to control the rotation of the ceiling screen, which will cause the motor to stall, wasting power resources and also causing the motor to make noise. At the same time, the long-term stall of the motor will also cause damage to the motor. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and provide a control method, device, computer device and storage medium for a ceiling screen to solve the problem of how to avoid motor stall.
[0005] In a first aspect, the present application provides a control method for a ceiling screen, which is applied to a vehicle-mounted terminal connected to the ceiling screen. The method includes:
[0006] Respond to the calibration instruction of the ceiling screen and control the ceiling screen to rotate in a preset direction;
[0007] Obtain the magnetic encoder signal of the ceiling screen in real time, obtain the current angle of the ceiling screen, and calculate the angle change value between the current angle and the previous angle;
[0008] If the angle change value is less than a preset difference, update the angle change count of the ceiling screen;
[0009] When the angle change count is greater than a preset count, determine the current angle as the calibrated rotation angle of the ceiling screen;
[0010] In response to the received control instruction of the ceiling screen, control the ceiling screen to rotate according to the calibrated rotation angle.
[0011] In combination with the first aspect, in a first possible implementation manner, the step of in response to the received control instruction of the ceiling screen, controlling the ceiling screen to rotate according to the calibrated rotation angle includes:
[0012] Based on the calibrated rotation angle, generate a first rotation speed angle range of the ceiling screen, wherein the calibrated rotation angle is not within the first rotation speed angle range;
[0013] In response to the received control instruction of the ceiling screen, determine whether the current angle is within the first rotation speed angle range;
[0014] If the current angle is within the first rotation speed angle range, control the ceiling screen to rotate at a first rotation speed;
[0015] If the current angle is not within the first rotation speed angle range, control the ceiling screen to rotate at a second rotation speed, wherein the second rotation speed is less than the first rotation speed.
[0016] In combination with the first aspect, in a second possible implementation manner, the calibration instruction includes a closed angle calibration instruction and an unfolded angle calibration instruction, and the preset directions include a first direction and a second direction that are opposite to each other. The step of in response to the received calibration instruction of the ceiling screen, controlling the ceiling screen to rotate along the preset direction includes:
[0017] If the received closed angle calibration instruction of the ceiling screen is received, control the ceiling screen to rotate along the first direction;
[0018] If the received unfolded angle calibration instruction of the ceiling screen is received, control the ceiling screen to rotate along the second direction.
[0019] In combination with the second possible implementation manner of the first aspect, in a third possible implementation manner, the calibrated rotation angle includes an unfolded calibration angle and a closed calibration angle. The step of when the angle change count is greater than a preset count, determining the current angle as the calibrated rotation angle of the ceiling screen includes:
[0020] When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the first direction, determine the current angle as the closed calibration angle of the ceiling screen;
[0021] When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the second direction, determine the current angle as the unfolded calibration angle of the ceiling screen.
[0022] Combined with the third possible implementation manner of the first aspect, in the fourth possible implementation manner, after controlling the ceiling screen to rotate according to the calibrated rotation angle in response to the received control instruction of the ceiling screen, it further includes:
[0023] If the current angle is equal to the closed calibration angle, generate a first prompt message for prompting that the ceiling screen is in the closed state;
[0024] If the current angle is equal to the unfolded calibration angle, generate a second prompt message for prompting that the ceiling screen is at the maximum unfolded angle.
[0025] Combined with the first aspect, in the fifth possible implementation manner, the real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle includes:
[0026] Real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle and the previous angle of the ceiling screen;
[0027] Subtract the previous angle from the current angle to obtain the angle change value between the current angle and the previous angle.
[0028] Combined with the first aspect, in the sixth possible implementation manner, after the real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle, it further includes:
[0029] If the angle change value is greater than or equal to the preset difference, clear the angle change count of the ceiling screen.
[0030] In a second aspect, the present application provides a ceiling screen control device, which is applied to an in-vehicle terminal connected to the ceiling screen. The device includes:
[0031] A calibration instruction module, configured to control the ceiling screen to rotate along a preset direction in response to the received calibration instruction of the ceiling screen;
[0032] An angle obtaining module, configured to real-time acquire the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle;
[0033] A counting update module, configured to update the angle change count of the ceiling screen if the angle change value is less than the preset difference;
[0034] A calibrated rotation angle module, configured to determine the current angle as the calibrated rotation angle of the ceiling screen when the angle change count is greater than the preset count;
[0035] A rotation control module, configured to respond to a received control instruction of the ceiling-mounted screen and control the rotation of the ceiling-mounted screen according to the calibrated rotation angle.
[0036] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the ceiling-mounted screen control method described in the first aspect is implemented.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the ceiling-mounted screen control method described in the first aspect is implemented.
[0038] The present application provides a ceiling-mounted screen control method, which is applied to an in-vehicle terminal connected to the ceiling-mounted screen. The method includes: responding to a received calibration instruction of the ceiling-mounted screen, controlling the ceiling-mounted screen to rotate along a preset direction; acquiring a magnetic encoding signal of the ceiling-mounted screen in real time to obtain a current angle of the ceiling-mounted screen, and calculating an angle change value between the current angle and a previous angle; if the angle change value is less than a preset difference value, updating an angle change count of the ceiling-mounted screen; when the angle change count is greater than a preset count, determining the current angle as the calibrated rotation angle of the ceiling-mounted screen; responding to a received control instruction of the ceiling-mounted screen, and controlling the rotation of the ceiling-mounted screen according to the calibrated rotation angle. On the basis of not requiring the installation accuracy of the ceiling-mounted screen, the rotation of the ceiling-mounted screen is controlled by obtaining the calibrated rotation angle, avoiding the jamming of the motor driving the rotation of the ceiling-mounted screen, and further avoiding the noise generated by the motor jamming. Description of the Drawings
[0039] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the protection scope of the present invention. In each drawing, similar components are numbered similarly.
[0040] Figure 1 Shows a flowchart of the ceiling-mounted screen control method provided by an embodiment of the present invention;
[0041] Figure 2 Shows a schematic structural diagram of an in-vehicle terminal provided by an embodiment of the present invention;
[0042] Figure 3 Shows a schematic structural diagram of a ceiling-mounted screen control device provided by an embodiment of the present invention. Detailed Embodiments
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
[0044] Generally, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0045] In the following, the terms "comprising", "having" and their cognates that can be used in various embodiments of the present invention are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0046] In addition, the terms "first", "second", "third", etc. are only used for descriptive distinction and cannot be understood as indicating or implying relative importance.
[0047] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the various embodiments of the present invention belong. The terms (such as those defined in a commonly used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.
[0048] Embodiment 1
[0049] Please refer to Figure 1 , Figure 1 which shows a flowchart of the ceiling screen control method provided by the embodiment of the present invention. Figure 1 The ceiling screen control method in is applied to an in-vehicle terminal connected to the ceiling screen, and the method includes the following steps:
[0050] Step 110, in response to the calibration instruction received by the ceiling screen, control the ceiling screen to rotate in a preset direction.
[0051] It should be understood that the in-vehicle terminal is set according to actual needs and can be an ECU, a mobile terminal, etc., which is not limited herein. Before using the ceiling screen, calibrate the rotation angle of the ceiling screen through a calibration command. In response to the received calibration command of the ceiling screen, drive the ceiling screen to move at a constant speed, and then control the ceiling screen to rotate along a preset direction, where the preset direction is set according to actual needs and is not limited herein.
[0052] Please refer to Figure 2 , Figure 2 which shows a schematic structural diagram of the in-vehicle terminal provided by an embodiment of the present invention. In this embodiment, the in-vehicle terminal 210 includes a power supply 211, a processor 212, and a driver chip 213.
[0053] The power supply 211 is used to supply power to the processor 212 and the driver chip 213. The processor 212 is sequentially connected to the ceiling screen 240 through the driver chip 213, the motor 220, and the gear set 230. The processor 212 is configured to respond to the received command and send a feedback command to the driver chip 213, where the type of the processor 212 is selected according to actual needs and can be a microcontroller unit (MCU) or a single-chip microcomputer, etc., which is not limited herein. The driver chip 213 is used to drive the motor 220 to drive the gear set 230 to rotate, and drive the ceiling screen 240 to rotate at a constant speed along a preset direction through the rotation of the gear set 230, where the type of the motor 220 is selected according to actual needs and can be a permanent magnet synchronous motor, etc., which is not limited herein.
[0054] Step 120, continuously obtain the magnetic encoding signal of the ceiling screen, obtain the current angle of the ceiling screen, and calculate the angle change value between the current angle and the previous angle.
[0055] Since the change in the angle or displacement of the magnetic material will cause a change in resistance or voltage, a magnetoresistive element can be used to measure the angle or displacement value of the changing magnetic material. In this embodiment, the current angle and the previous angle of the ceiling screen are obtained through the magnetic encoding signal measured when the position of the installed magnet changes. Based on the current angle and the previous angle of the ceiling screen, calculate the angle change value of the ceiling screen. It should be understood that since there is usually an error in the angle detected by the magnetic encoding signal, the current angle obtained based on the magnetic encoding signal is not necessarily equal to the actual rotation angle of the ceiling screen, which will not be elaborated herein.
[0056] As an example, the continuously obtaining the magnetic encoding signal of the ceiling screen, obtaining the current angle of the ceiling screen, and calculating the angle change value between the current angle and the previous angle includes:
[0057] Obtain the magnetic encoding signal of the ceiling screen in real time to get the current angle and the previous angle of the ceiling screen;
[0058] Subtract the previous angle from the current angle to obtain the angle change value between the current angle and the previous angle.
[0059] For ease of understanding, in the embodiments of the present application, an example is given of obtaining the magnetic encoding signal of the ceiling screen at intervals of 200 ms. Every 200 ms time interval, the angle change value of the ceiling screen is calculated once. Specifically, the magnetic encoding signal of the ceiling screen is obtained in real time. When 200 ms has passed, the current angle of the ceiling screen at the 200th ms and the previous angle at the 0th ms are obtained, and the previous angle is subtracted from the current angle to obtain the angle change value between the current angle and the previous angle. When 400 ms has passed, the current angle of the ceiling screen at the 400th ms and the previous angle at the 200th ms are obtained, and the previous angle is subtracted from the current angle to obtain the angle change value between the current angle and the previous angle. By calculating the angle change value between the current angle and the previous angle, it is determined whether the ceiling screen has rotated to the maximum angle or the minimum angle, thereby avoiding the idling of the motor.
[0060] Step 130, if the angle change value is less than the preset difference, update the angle change count of the ceiling screen.
[0061] Usually, when the ceiling screen is in the closed state, the angle of the ceiling screen is the minimum angle, that is, the angle of the ceiling screen is 0 degrees. When the ceiling screen is in the unfolded state, the unfolded angle of the ceiling screen changes within a range greater than 0 degrees and less than or equal to 180 degrees. When the unfolded angle of the ceiling screen is the maximum angle, that is, the angle of the ceiling screen is 180 degrees, it has a good visual effect.
[0062] If the angle of the ceiling screen is not 0 degrees or 180 degrees, the ceiling screen rotates uniformly in the preset direction, and the angle of the ceiling screen also changes uniformly. If the angle of the ceiling screen is 0 degrees or 180 degrees, the motor driving the ceiling screen is blocked, and the ceiling screen cannot continue to rotate in the preset direction, resulting in the non-uniform change of the angle of the ceiling screen. When the angle change value is less than the preset difference, update the angle change count of the ceiling screen.
[0063] Step 140, when the angle change count is greater than the preset count, determine the current angle as the calibrated rotation angle of the ceiling screen.
[0064] For example, when the ceiling screen rotates to 0 degrees, if there is a detection error in the vehicle-mounted terminal, resulting in the detected angle of the ceiling screen being 1 degree, the vehicle-mounted terminal will continue to drive the ceiling screen to rotate by controlling the motor to try to rotate the ceiling screen to 0 degrees, which in turn causes the motor to stall. Since the angle of the ceiling screen does not change uniformly when the motor driving the ceiling screen stalls. When the angle of the ceiling screen does not change uniformly within the preset time range, that is, when the angle change count is greater than the preset count, the current angle is determined as the calibrated rotation angle of the ceiling screen. By recording the calibrated rotation angle when the motor stalls, the vehicle-mounted terminal is prevented from misjudging that the ceiling screen has not rotated to the target angle, thereby avoiding the motor from stalling.
[0065] As an example, after obtaining the magnetic encoding signal of the ceiling screen in real time to get the current angle of the ceiling screen and calculating the angle change value between the current angle and the previous angle, it further includes:
[0066] If the angle change value is greater than or equal to the preset difference, the angle change count of the ceiling screen is cleared.
[0067] Due to abnormal conditions such as insufficient power supply of the motor driving the ceiling screen, the angle of the ceiling screen will also not change uniformly. According to the angle change count, it is determined whether the motor stalls. For ease of understanding, in the embodiments of the present application, the preset difference is 8 and the preset count is 3. Specifically, taking the example of obtaining the magnetic encoding signal of the ceiling screen at intervals of 200 ms in real time. When the ceiling screen does not rotate to the calibrated angle, the motor drives the ceiling screen to rotate uniformly in the preset direction, and the rotational speed of the motor driving the ceiling screen is 2000 rpm. After 200 ms, it is determined that the angle change value obtained based on the magnetic encoding signal is less than 8, so the angle change count of the ceiling screen is incremented by one. When 400 ms has passed, the angle change value obtained based on the magnetic encoding signal is 40. Since the angle change value is greater than or equal to the preset difference, the angle change count of the ceiling screen is cleared. When 600 ms has passed, the angle change value is less than the preset difference every 200 ms, and the obtained angle change count of the ceiling screen is 3. Since the obtained angle change count of the ceiling screen is greater than the preset count, it is determined that the motor driving the ceiling screen stalls, and the current angle is determined as the calibrated rotation angle of the ceiling screen.
[0068] Step 150, in response to the received control instruction of the ceiling screen, control the ceiling screen to rotate according to the calibrated rotation angle.
[0069] After completing the rotation calibration of the ceiling screen and obtaining the calibrated rotation angle, the angle of the ceiling screen can be reset to the initial angle. When a control instruction for the ceiling screen is received, the ceiling screen is controlled to rotate within a range not exceeding the calibrated rotation angle according to the calibrated rotation angle. If the current angle of the ceiling screen is equal to the calibrated angle, the motor stops driving the ceiling screen to rotate, preventing the motor from being blocked. On the basis of not requiring the installation accuracy of the ceiling screen, by obtaining the calibrated rotation angle to control the rotation of the ceiling screen, the motor driving the ceiling screen from being blocked is avoided, and thus the noise generated by the motor blockage is avoided.
[0070] As an example, the calibration instruction includes a closing angle calibration instruction and an unfolding angle calibration instruction, and the preset directions include a first direction and a second direction in opposite directions. Responding to the received calibration instruction for the ceiling screen and controlling the ceiling screen to rotate along the preset direction includes:
[0071] If the closing angle calibration instruction for the ceiling screen is received, control the ceiling screen to rotate along the first direction;
[0072] If the unfolding angle calibration instruction for the ceiling screen is received, control the ceiling screen to rotate along the second direction.
[0073] The closing angle calibration is used to calibrate the current angle of the ceiling screen obtained when the ceiling screen is actually at the minimum angle as the calibrated rotation angle. The unfolding angle calibration is used to calibrate the current angle of the ceiling screen obtained when the ceiling screen is actually at the maximum angle as the calibrated rotation angle. If the closing angle calibration instruction for the ceiling screen is received, control the ceiling screen to rotate along the first direction until the angle change count is greater than the preset count, and then determine the currently detected angle of the ceiling screen as the calibrated rotation angle of the ceiling screen. If the unfolding angle calibration instruction for the ceiling screen is received, control the ceiling screen to rotate along the second direction until the angle change count is greater than the preset count, and then determine the currently detected angle of the ceiling screen as the calibrated rotation angle of the ceiling screen.
[0074] In an alternative example, the calibrated rotation angle includes an unfolding calibration angle and a closing calibration angle. When the angle change count is greater than the preset count and the current angle is determined as the calibrated rotation angle of the ceiling screen, it includes:
[0075] When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the first direction, determine the current angle as the closing calibration angle of the ceiling screen;
[0076] When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the second direction, determine the current angle as the unfolding calibration angle of the ceiling screen.
[0077] The first direction is the rotation direction during the process of the ceiling screen rotating to the minimum angle. When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the first direction, the current angle is determined as the closed calibration angle of the ceiling screen. The closed calibration angle is the current angle of the ceiling screen detected by the vehicle-mounted terminal based on the magnetic encoding signal when the ceiling screen rotates to the minimum angle. The second direction is the rotation direction during the process of the ceiling screen rotating to the maximum angle. When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the second direction, the current angle is determined as the unfolded calibration angle of the ceiling screen. The unfolded calibration angle is the current angle of the ceiling screen detected by the vehicle-mounted terminal based on the magnetic encoding signal when the ceiling screen rotates to the maximum angle.
[0078] It should be understood that taking the ceiling screen actually rotating to 0 degrees as an example, due to the error in the current angle obtained by the vehicle-mounted terminal based on the magnetic encoding signal, the detected current angle of the ceiling screen may be 1 degree, or may be 2 degrees, etc. For the convenience of understanding, in the embodiments of the present application, there is no error in the current angle obtained by the vehicle-mounted terminal based on the magnetic encoding signal, that is, the unfolded calibration angle is 180 degrees and the closed calibration angle is 0 degrees.
[0079] In an optional example, after responding to the received control instruction of the ceiling screen and controlling the rotation of the ceiling screen according to the calibrated rotation angle, it further includes:
[0080] If the current angle is equal to the closed calibration angle, generate a first prompt message for prompting that the ceiling screen is in the closed state;
[0081] If the current angle is equal to the unfolded calibration angle, generate a second prompt message for prompting that the ceiling screen is at the maximum unfolded angle.
[0082] If the current angle is equal to the closed calibration angle, continuing to drive the ceiling screen to rotate in the first direction by the motor will cause the motor to be blocked. Generate a first prompt message for prompting that the ceiling screen is in the closed state to prompt that the ceiling screen cannot be controlled to rotate in the first direction anymore. If the current angle is equal to the unfolded calibration angle, continuing to drive the ceiling screen to rotate in the second direction by the motor will cause the motor to be blocked. Generate a second prompt message for prompting that the ceiling screen is at the maximum unfolded angle to prompt that the ceiling screen cannot be controlled to rotate in the second direction anymore.
[0083] As an example, responding to the received control instruction of the ceiling screen and controlling the rotation of the ceiling screen according to the calibrated rotation angle includes:
[0084] Based on the calibrated rotation angle, generate a first rotation speed angle range of the ceiling screen, where the calibrated rotation angle is not within the first rotation speed angle range;
[0085] In response to the received control instruction of the ceiling screen, determine whether the current angle is within the first rotation speed angle range;
[0086] If the current angle is within the first rotation speed angle range, control the ceiling screen to rotate at the first rotation speed;
[0087] If the current angle is not within the first rotation speed angle range, control the ceiling screen to rotate at the second rotation speed, where the second rotation speed is less than the first rotation speed.
[0088] Based on the calibrated rotation angle, generate a first rotation speed angle range that does not include the calibrated rotation angle. Specifically, taking the calibrated rotation angle as 0 degrees or 180 degrees as an example, generate a first rotation speed angle range of 15 degrees to 165 degrees. If the current angle is 150, it is confirmed that the current angle is within the first rotation speed angle range, and the ceiling screen is controlled to rotate at the first rotation speed. If the current angle is 170 degrees, it is confirmed that the current angle is not within the first rotation speed angle range, and the ceiling screen is controlled to rotate at the second rotation speed, where the second rotation speed is less than the first rotation speed. When the current angle of the ceiling screen approaches the calibrated rotation speed, reduce the rotation speed of the ceiling screen to reduce the impact caused by the ceiling screen switching from rotation to stopping.
[0089] The present application provides a ceiling screen control method applied to an in-vehicle terminal connected to the ceiling screen. The method includes: in response to the received calibration instruction of the ceiling screen, controlling the ceiling screen to rotate in a preset direction; obtaining the magnetic encoder signal of the ceiling screen in real time to obtain the current angle of the ceiling screen, and calculating the angle change value between the current angle and the previous angle; if the angle change value is less than the preset difference, update the angle change count of the ceiling screen; when the angle change count is greater than the preset count, determine the current angle as the calibrated rotation angle of the ceiling screen; in response to the received control instruction of the ceiling screen, control the rotation of the ceiling screen according to the calibrated rotation angle. On the basis of not requiring the installation accuracy of the ceiling screen, by obtaining the calibrated rotation angle to control the rotation of the ceiling screen, the motor driving the ceiling screen from jamming is avoided, and thus the noise generated by the motor jamming is avoided.
[0090] Embodiment 2
[0091] Please refer to Figure 3 , Figure 3 which shows the structural schematic diagram of the ceiling screen control device provided by the embodiment of the present invention. Figure 3 The ceiling screen control device 300 in
[0092] The calibration instruction module 310 is configured to, in response to the received calibration instruction of the ceiling screen, control the ceiling screen to rotate in a preset direction;
[0093] An angle acquisition module 320 is configured to acquire the magnetic encoding signal of the ceiling screen in real time, obtain the current angle of the ceiling screen, and calculate the angle change value between the current angle and the previous angle;
[0094] A count update module 330 is configured to update the angle change count of the ceiling screen if the angle change value is less than a preset difference;
[0095] A calibrated rotation angle module 340 is configured to determine the current angle as the calibrated rotation angle of the ceiling screen when the angle change count is greater than a preset count;
[0096] A rotation control module 350 is configured to respond to the control instruction of the ceiling screen received, and control the rotation of the ceiling screen according to the calibrated rotation angle.
[0097] As an example, the rotation control module 350 includes:
[0098] An angle range sub-module is configured to generate a first rotation speed angle range of the ceiling screen based on the calibrated rotation angle, wherein the calibrated rotation angle is not within the first rotation speed angle range;
[0099] A range judgment sub-module is configured to respond to the control instruction of the ceiling screen received, and judge whether the current angle is within the first rotation speed angle range;
[0100] A first rotation speed sub-module is configured to control the ceiling screen to rotate at a first rotation speed if the current angle is within the first rotation speed angle range;
[0101] A second rotation speed sub-module is configured to control the ceiling screen to rotate at a second rotation speed if the current angle is not within the first rotation speed angle range, wherein the second rotation speed is less than the first rotation speed.
[0102] As an example, the calibration instruction includes a closed angle calibration instruction and an unfolded angle calibration instruction, the preset directions include a first direction and a second direction that are opposite, and the calibration instruction module 310 includes:
[0103] A first direction rotation sub-module is configured to control the ceiling screen to rotate along the first direction if the closed angle calibration instruction of the ceiling screen is received;
[0104] A second direction rotation sub-module is configured to control the ceiling screen to rotate along the second direction if the unfolded angle calibration instruction of the ceiling screen is received.
[0105] In an alternative example, the calibrated rotation angle includes an unfolded calibration angle and a closed calibration angle, and the calibrated rotation angle module 340 includes:
[0106] A closing calibration sub-module, configured to determine the current angle as the closing calibration angle of the ceiling-mounted screen when the angle change count is greater than a preset count and the rotation direction of the ceiling-mounted screen is the first direction;
[0107] An unfolding calibration sub-module, configured to determine the current angle as the unfolding calibration angle of the ceiling-mounted screen when the angle change count is greater than a preset count and the rotation direction of the ceiling-mounted screen is the second direction.
[0108] In an optional example, the ceiling-mounted screen control device 300 further includes:
[0109] A first prompt module, configured to generate a first prompt message for prompting that the ceiling-mounted screen is in a closed state if the current angle is equal to the closing calibration angle;
[0110] A second prompt module, configured to generate a second prompt message for prompting that the ceiling-mounted screen is at the maximum unfolding angle if the current angle is equal to the unfolding calibration angle.
[0111] As an example, the angle obtaining module 320 includes:
[0112] A current angle sub-module, configured to obtain the magnetic encoding signal of the ceiling-mounted screen in real time to obtain the current angle and the previous angle of the ceiling-mounted screen;
[0113] An angle change sub-module, configured to subtract the previous angle from the current angle to obtain an angle change value between the current angle and the previous angle.
[0114] As an example, the ceiling-mounted screen control device 300 further includes:
[0115] A count clearing module, configured to clear the angle change count of the ceiling-mounted screen if the angle change value is greater than or equal to the preset difference.
[0116] The ceiling-mounted screen control device 300 is configured to execute the corresponding steps in the above-mentioned ceiling-mounted screen control method, and the specific implementation of each function will not be described in detail here. In addition, the optional examples in Embodiment 1 are also applicable to the ceiling-mounted screen control device 300 in Embodiment 2.
[0117] An embodiment of the present application further provides a computer device, which includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the ceiling-mounted screen control method as described in Embodiment 1 is implemented.
[0118] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the ceiling screen control method described in Embodiment 1 is implemented.
[0119] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and structure diagrams in the drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the structure diagram and / or flowchart, as well as the combination of blocks in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0120] In addition, in each embodiment of the present invention, the various functional modules or units can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0121] If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0122] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A method for controlling a ceiling screen, characterized in that, it is applied to a vehicle-mounted terminal connected to the ceiling screen, and the method includes: Respond to the calibration instruction of the ceiling screen received, and control the ceiling screen to rotate in a preset direction; Obtain the magnetic encoding signal of the ceiling screen in real time, obtain the current angle of the ceiling screen, and calculate the angle change value between the current angle and the previous angle; If the angle change value is less than a preset difference, update the angle change count of the ceiling screen; When the angle change count is greater than a preset count, determine the current angle as the calibrated rotation angle of the ceiling screen; Respond to the control instruction of the ceiling screen received, and control the ceiling screen to rotate according to the calibrated rotation angle; The step of responding to the control instruction of the ceiling screen received and controlling the ceiling screen to rotate according to the calibrated rotation angle includes: Based on the calibrated rotation angle, generate a first rotation speed angle range of the ceiling screen, wherein the calibrated rotation angle is not within the first rotation speed angle range; Respond to the control instruction of the ceiling screen received, and judge whether the current angle is within the first rotation speed angle range; If the current angle is within the first rotation speed angle range, control the ceiling screen to rotate at a first rotation speed; If the current angle is not within the first rotation speed angle range, control the ceiling screen to rotate at a second rotation speed, wherein the second rotation speed is less than the first rotation speed; After the ceiling screen completes the calibration instruction and obtains the calibrated rotation angle, reset the angle of the ceiling screen to the initial angle. When receiving the control instruction of the ceiling screen, control the ceiling screen to rotate within a range not exceeding the calibrated rotation angle; The calibration instruction includes a closing angle calibration instruction and an unfolding angle calibration instruction, and the preset direction includes a first direction and a second direction in opposite directions. The step of responding to the calibration instruction of the ceiling screen received and controlling the ceiling screen to rotate in the preset direction includes: If the closing angle calibration instruction of the ceiling screen is received, control the ceiling screen to rotate in the first direction; If the unfolding angle calibration instruction of the ceiling screen is received, control the ceiling screen to rotate in the second direction; The calibrated rotation angle includes an unfolding calibration angle and a closing calibration angle. The step of when the angle change count is greater than a preset count and determining the current angle as the calibrated rotation angle of the ceiling screen includes: When the angle change count is greater than a preset count and the rotation direction of the ceiling screen is the first direction, determine the current angle as the closing calibration angle of the ceiling screen; When the angle change count is greater than a preset count and the rotation direction of the ceiling screen is the second direction, determine the current angle as the unfolding calibration angle of the ceiling screen.
2. The method for controlling a ceiling screen according to claim 1, characterized in that, after the step of responding to the control instruction of the ceiling screen received and controlling the ceiling screen to rotate according to the calibrated rotation angle, it further includes: If the current angle is equal to the closed calibration angle, generate a first prompt message for prompting that the ceiling screen is in the closed state; If the current angle is equal to the unfolded calibration angle, generate a second prompt message for prompting that the ceiling screen is at the maximum unfolded angle.
3. The ceiling screen control method according to claim 1, characterized in that, The real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle includes: Real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle and the previous angle of the ceiling screen; Subtract the previous angle from the current angle to obtain the angle change value between the current angle and the previous angle.
4. The ceiling screen control method according to claim 1, characterized in that, After the real-time acquisition of the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle, it further includes: If the angle change value is greater than or equal to the preset difference, clear the angle change count of the ceiling screen.
5. A ceiling screen control device, characterized in that, Applied to a vehicle-mounted terminal connected to the ceiling screen, the device includes: A calibration instruction module for responding to the received calibration instruction of the ceiling screen and controlling the ceiling screen to rotate in a preset direction; An angle obtaining module for real-time acquiring the magnetic encoding signal of the ceiling screen to obtain the current angle of the ceiling screen and calculate the angle change value between the current angle and the previous angle; A count update module for updating the angle change count of the ceiling screen if the angle change value is less than the preset difference; A calibrated rotation angle module for determining the current angle as the calibrated rotation angle of the ceiling screen when the angle change count is greater than the preset count; A rotation control module for responding to the received control instruction of the ceiling screen and controlling the ceiling screen to rotate according to the calibrated rotation angle; The responding to the received control instruction of the ceiling screen and controlling the ceiling screen to rotate according to the calibrated rotation angle includes: Based on the calibrated rotation angle, generate a first rotation speed angle range of the ceiling screen, wherein the calibrated rotation angle is not within the first rotation speed angle range; Respond to the received control instruction of the ceiling screen and determine whether the current angle is within the first rotation speed angle range; If the current angle is within the first rotation speed angle range, control the ceiling screen to rotate at the first rotation speed; If the current angle is not within the first rotation speed angle range, control the ceiling screen to rotate at the second rotation speed, wherein the second rotation speed is less than the first rotation speed; After the ceiling screen completes the calibration instruction and obtains the calibrated rotation angle, reset the angle of the ceiling screen to the initial angle, and when receiving the control instruction of the ceiling screen, control the ceiling screen to rotate within a range not exceeding the calibrated rotation angle; The calibration instructions include a closing angle calibration instruction and an unfolding angle calibration instruction. The preset directions include a first direction and a second direction that are opposite to each other. Controlling the ceiling screen to rotate in the preset direction in response to the received calibration instruction of the ceiling screen includes: If the closing angle calibration instruction of the ceiling screen is received, controlling the ceiling screen to rotate in the first direction; If the unfolding angle calibration instruction of the ceiling screen is received, controlling the ceiling screen to rotate in the second direction; The calibrated rotation angle includes an unfolding calibration angle and a closing calibration angle. When the angle change count is greater than a preset count, determining the current angle as the calibrated rotation angle of the ceiling screen includes: When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the first direction, determining the current angle as the closing calibration angle of the ceiling screen; When the angle change count is greater than the preset count and the rotation direction of the ceiling screen is the second direction, determining the current angle as the unfolding calibration angle of the ceiling screen.
6. A computer device, characterized in that, the computer device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it implements the ceiling screen control method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the ceiling screen control method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Stepping motor instantaneous locked-rotor self-recovery method and device
CN106559019A
Method for resetting air conditioner HVAC air door position
CN109532391A
On-vehicle device, calibration device, method and program
JP2009113748A
On-vehicle pop-up display device
JP2011073572A