Display parameter adjusting method, display control method and electronic equipment
By using low-cost Hall effect sensors or mechanical switches to detect level signals in AIO devices, the problems of high-cost G-sensor chips and complex circuit designs are solved, enabling automatic adjustment of screen resolution in both portrait and landscape orientations, reducing costs and improving system design flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-09
- Publication Date
- 2026-03-13
AI Technical Summary
Existing AIO solutions for adjusting screen display parameters by rotating the screen require high-cost G-sensor chips and complex circuit designs, increasing PCB space usage and labor costs.
Using low-cost Hall effect sensors or mechanical switches as detection components, the screen mode is determined by detecting the level signal through the positional coordination between the body and the base, and the display parameters are dynamically adjusted.
It reduces hardware and labor costs, frees up PCB layout space, improves system design flexibility, and enables automatic horizontal and vertical screen adjustment without the need for high-cost algorithm chips and complex circuits.
Smart Images

Figure CN121661934A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a method for adjusting display parameters, a display control method, and an electronic device. Background Technology
[0002] Existing solutions for adjusting screen display parameters when rotating the screen of an AIO (All-in-One) device include: currently, referencing mobile phones or tablets, adding a G-sensor (gravity sensor) control circuit and corresponding algorithm chip to the PCBA (Printed Circuit Board Assembly) to achieve automatic adjustment of screen display parameters, such as switching screen resolution, when the AIO rotates between portrait and landscape modes.
[0003] However, existing solutions, due to the use of G-sensors, require high-cost algorithm chips and complex circuit designs, resulting in high costs. Furthermore, due to the complexity of firmware-level sensor adaptation, using G-sensors necessitates developers configuring corresponding firmware according to specific requirements, incurring significant manpower costs. In addition, the complex circuit design of G-sensors occupies a large amount of PCB (printed circuit board) traces, reducing the available PCB space for AIO projects. Summary of the Invention
[0004] The purpose of this application is to provide a method for adjusting display parameters, a display control method, and an electronic device.
[0005] In a first aspect, this embodiment provides a method for adjusting display parameters, applied to an electronic device. The electronic device includes a body and a base. The body can be mounted on the base in either landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions. The method includes: The detection originates from the level signals corresponding to the first and second positions, respectively; wherein the level signals are provided based on the cooperation of the first detection component, the second detection component, and the third detection component. Based on the level signal, determine the current screen information of the device; the screen information includes landscape mode and portrait mode; Based on the screen information, determine the display parameters corresponding to the screen information, and display the screen using the determined display parameters.
[0006] In some embodiments, detecting the level signals from the first position and the second position respectively includes: Based on the electrical connection between the first general-purpose input / output interface of the motherboard chip and the first detection component, the electrical connection between the second general-purpose input / output interface of the motherboard chip and the second detection component, and the positions of the first and second detection components relative to the third detection component, level signals from the first position and the second position are provided, and level signals from the first position and the second position are detected respectively.
[0007] In some embodiments, the first detection component and the second detection component both include a first Hall effect detection device, the third detection component includes a second Hall effect detection device, and the first Hall effect detection device and the second Hall effect detection device are adapted to each other. Based on the positions of the first and second detection components relative to the third detection component, level signals corresponding to the first and second positions are provided, including: Based on the magnetic field signals collected between the first detection component, the second detection component, and the third detection component, level signals corresponding to the first and second positions are provided. When a magnetic field signal is acquired from between the first detection component and the third detection component, the level signal of the first general-purpose input / output interface is the first level; When a magnetic field signal is acquired from between the second and third detection components, the level signal of the second general-purpose input / output interface is at the first level.
[0008] In some embodiments, the first detection component and the second detection component both include a first mechanical switch, and the third detection component includes a second mechanical switch, wherein the first mechanical switch is adapted to the second mechanical switch; Based on the positions of the first and second detection components relative to the third detection component, level signals corresponding to the first and second positions are provided, including: Based on the trigger signals collected from the first detection component, the second detection component, and the third detection component, level signals corresponding to the first and second positions are provided; When a trigger signal generated by the cooperation of the first detection component and the third detection component is acquired, the level signal of the first general-purpose input / output interface is the first level; When a trigger signal generated by the cooperation of the second and third detection components is acquired, the level signal of the second general-purpose input / output interface is the first level.
[0009] In some embodiments, determining the screen information of the current device based on a level signal includes: The screen information of the current machine is determined based on the detected level signals of the first and second general-purpose input / output interfaces of the motherboard chip of the machine.
[0010] In some embodiments, determining the current screen information of the device based on the detected level signals of the first and second general-purpose input / output interfaces of the device's motherboard chip includes: If the level signal of the first general-purpose input / output interface or the level signal of the second general-purpose input / output interface is detected to be at the first level, a system control interrupt is triggered, and the corresponding interrupt general event is executed to determine the screen information of the current machine.
[0011] In some embodiments, a corresponding general interrupt event is executed to determine the current screen information of the device, including: Determine the level signals of the first general-purpose input / output interface and the level signals of the second input / output interface; If the level signal of the first general-purpose input / output interface is determined to be at the first level and the level signal of the second general-purpose input / output interface is determined to be at the second level, then the screen information of the current device is determined to be in portrait mode. If the level signal of the first general-purpose input / output interface is determined to be the second level and the level signal of the second general-purpose input / output interface is determined to be the first level, then the screen information of the current machine is determined to be landscape mode.
[0012] In some embodiments, based on screen information, determining display parameters corresponding to the screen information and displaying the determined display parameters includes: Based on the screen information, determine the display parameters corresponding to the screen information; Based on the determined display parameters, modify the content of the display interface provided by the system; Content is displayed based on the modified display interface.
[0013] Secondly, embodiments of this application provide a display control method applied to an electronic device. The electronic device includes a body and a base. The body can be mounted on the base in either a landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions. The method includes: Based on the first detection component, the second detection component and the third detection component, it is determined whether the machine body is set on the base in landscape mode or portrait mode; If the machine is set up on the base in landscape mode, the screen of the machine is controlled to display the first display parameter. If the machine is set up on the base in portrait mode, the screen of the machine is controlled to display the second display parameter. The first display parameter and the second display parameter are different.
[0014] Thirdly, this application provides an electronic device, including a body and a base. The body can be mounted on the base in either a landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions. The device includes at least a memory and a processor. The memory stores a computer program. When the processor executes the computer program in the memory, it implements the steps of the display parameter adjustment method provided in any of the above embodiments, or the steps of the display control method provided in the above embodiments.
[0015] This application embodiment features a first detection component at a first position on the device body, a second detection component at a second position on the device body, and a third detection component at the mounting position on the base. The cooperation of these three detection components provides corresponding level signals for the first and second positions, respectively. By detecting these level signals, screen information is determined, identifying whether the device body is mounted on the base in landscape or portrait mode. Based on this screen information, display parameters are determined and displayed using these parameters. This application utilizes three low-cost detection components to determine whether the device body is in landscape or portrait mode, thus displaying the device with the corresponding parameters. This eliminates the need for high-cost algorithm chips and complex circuit designs, thereby reducing costs. Furthermore, it reduces the complexity of firmware-level sensor adaptation, eliminating the need for developers to adjust firmware according to specific requirements, thus reducing labor costs. The absence of complex circuit design frees up high-density PCB layout space, which can be reallocated to other key functional modules, improving system design flexibility. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a method for adjusting display parameters provided in an embodiment of this application; Figure 2 This is a front view schematic diagram of a machine body arranged in landscape mode on a base, provided as an embodiment of this application; Figure 3 To be Figure 2 A front view diagram showing the main body rotating and positioned on the base in portrait mode; Figure 4 This is a rear view diagram showing the mecha set up in landscape mode on the base, with positions B and C of the mecha coinciding. Figure 5 This is a rear view diagram showing the mecha set up in landscape mode on the base, with positions A and C of the mecha coinciding. Figure 6This is a schematic diagram of the circuit principle of the machine body and the base; Figure 7 This is a flowchart illustrating a display control method provided in an embodiment of this application. Detailed Implementation
[0017] Various embodiments and features of this application are described herein with reference to the accompanying drawings.
[0018] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.
[0019] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0020] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0021] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.
[0022] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0023] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0024] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0025] The purpose of this application is to address the limitation that all-in-one (AIO) PCs must use a G-sensor chip to adjust screen resolution when rotating the screen. Currently, in AIO solutions, supporting manual rotation of the screen for automatic resolution adjustment requires high-end products to add expensive G-sensor algorithm control chips and corresponding circuitry. This is costly and requires developers to configure firmware according to specific requirements, incurring significant manpower costs. Furthermore, the complex circuit design of G-sensors occupies a large amount of PCB (printed circuit board) traces, reducing the available PCB space in AIO projects.
[0026] This application aims to achieve automatic screen resolution adjustment for landscape and portrait rotation using a low-cost and simple solution that enables high-end AIOs to achieve this through various complex control circuits and programs.
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0028] This embodiment provides a method for adjusting display parameters, applied to an electronic device, which can be an AIO device. An all-in-one computer is a computer device that integrates components such as a host, monitor, and speakers into one unit. Combined with... Figures 2 to 6 As shown, the electronic device includes a body and a base. The body integrates components such as the main unit, display, and speaker, while the base supports the body. The body can be mounted on the base in either landscape or portrait mode. A first detection component is located at the first position A of the body, a second detection component is located at the second position B of the body, and a third detection component is located at the mounting position C of the base. The first and second positions are different locations; the mounting position refers to the position where the body and base are fixed.
[0029] Combination Figure 1 As shown, the method for adjusting the display parameters may include steps S101 to S103.
[0030] S101, detect the level signals from the first position and the second position respectively; wherein, the level signals are provided based on the cooperation of the first detection component, the second detection component and the third detection component; Specifically, the structural design can be used to set a first detection component at a first position A inside the rotatable body, a second detection component at a second position B, and a third detection component at an installation position C inside the non-rotatable base as a reference.
[0031] When the device is set in landscape mode on the base, the second position B and the installation position C fall into the corresponding range (e.g., overlap, approach, or abut). Manually rotate the device. When the device is set in portrait mode on the base, the first position A and the installation position C fall into the corresponding range (e.g., overlap, approach, or abut).
[0032] The level signals from the first position A and the second position B are provided through the cooperation of the first detection component located at the first position A, the second detection component located at the second position B, and the third detection component located at the third position C.
[0033] S102, based on the level signal, determine the current screen information of the device; wherein, the screen information includes landscape mode and portrait mode; Based on the detected level signals from the first position A and the second position B, such as the level signal of the first general-purpose input / output interface GPIOX corresponding to the first position A and the level signal of the second general-purpose input / output interface GPIOY corresponding to the second position B, it is determined whether the current device is set on the base in landscape mode or portrait mode. X and Y respectively identify the GPIO port identifiers, such as GPIO1, GPIO2, etc., and are not specifically limited to GPIO.
[0034] S103, based on the screen information, determines the display parameters corresponding to the screen information, and displays the determined display parameters.
[0035] Optionally, display parameters may include screen resolution, display brightness, color, etc. The following explanation uses screen resolution as an example.
[0036] If it is determined that the current mecha is set in landscape mode on the base, determine the screen resolution of the current mecha in landscape mode corresponding to the screen information. For example, if the screen resolution of the current mecha in landscape mode is 1920x1080, then the screen of the mecha will be displayed at a screen resolution of 1920x1080.
[0037] If it is determined that the current mecha is set in portrait mode on the base, determine the screen resolution of the current mecha in portrait mode corresponding to the screen information. For example, if the screen resolution of the current mecha in portrait mode is 1080x1920, then the screen of the mecha will be displayed at a screen resolution of 1080x1920.
[0038] This application embodiment features a first detection component at a first position on the device body, a second detection component at a second position on the device body, and a third detection component at the mounting position on the base. The cooperation of these three detection components provides corresponding level signals for the first and second positions, respectively. By detecting these level signals, screen information is determined, identifying whether the device body is mounted on the base in landscape or portrait mode. Based on this screen information, display parameters are determined and displayed using these parameters. This application utilizes three low-cost detection components to determine whether the device body is in landscape or portrait mode, thus displaying the device with the corresponding parameters. This eliminates the need for high-cost algorithm chips and complex circuit designs, thereby reducing costs. Furthermore, it reduces the complexity of firmware-level sensor adaptation, eliminating the need for developers to adjust firmware according to specific requirements, thus reducing labor costs. The absence of complex circuit design frees up high-density PCB layout space, which can be reallocated to other key functional modules, improving system design flexibility.
[0039] Specifically, the technical solution of this application firstly significantly optimizes the BOM (Bill of Materials) cost structure: by replacing the traditional gravity sensor (G-sensor) solution, it directly simplifies various materials (up to 17 items including ICs and peripheral circuits), achieving a structural reduction in hardware costs. Secondly, it reduces the complexity of firmware-level sensor adaptation: using a G-sensor requires R&D personnel to adjust and match the G-sensor parameters according to specific requirements and import the corresponding firmware for compatibility. By replacing the traditional gravity sensor solution, R&D personnel do not need to adjust the corresponding firmware according to specific requirements, reducing labor costs. Thirdly, it frees up high-density PCB layout space: addressing the high PCB space resource constraints faced by AIO multi-functional integrated design, the technical solution of this application saves PCB trace space that can be reallocated to other key functional modules, improving system design flexibility.
[0040] In some embodiments, detecting the level signals from the first position and the second position respectively includes: Based on the electrical connection between the first general purpose input / output interface GPIOX of the motherboard chip and the first detection component at the first position A, the electrical connection between the second general purpose input / output interface GPIOY of the motherboard chip and the second detection component at the second position B, and the positions of the first and second detection components relative to the third detection component, level signals from the first position A and the second position B are provided, and level signals from the first position and the second position B are detected respectively.
[0041] Optionally, the motherboard chipset includes a PCH (Platform Controller Hub). See also Figure 6 As shown, the first general purpose input / output interface GPIOX of the PCH of the machine is electrically connected to the first detection component of the first position A, and is electrically connected to the power supply terminal VCC through the first resistor R1. The second general purpose input / output interface GPIOY of the PCH of the machine is electrically connected to the second detection component of the second position B, and is electrically connected to the power supply terminal VCC through the second resistor R2.
[0042] When the physical posture of the device changes, for example, from landscape mode to portrait mode, or vice versa, the positions of the first detection component at the first position A and the second detection component at the second position B are different relative to the third detection component at the mounting position C of the base. Based on the electrical connection between the first detection component and the second detection component and the general purpose input / output interface of the motherboard chip of the device, level signals from the first general purpose input / output interface GPIOX corresponding to the first position A and the second general purpose input / output interface GPIOY corresponding to the second position B are provided. Thus, by detecting the level signals of the first general purpose input / output interface GPIOX and the second general purpose input / output interface GPIOY, the level signals corresponding to the first position A and the second position B are detected respectively.
[0043] Optionally, the aforementioned detection component can be a Hall effect sensor or a mechanical switch, or other non-gravity and low-complexity device. This application's embodiment determines the current screen information of the device using a non-gravity detection component, which is not limited by gravity environments. Especially in low-gravity or zero-gravity environments, this application, based on a non-gravity sensing mechanism, is more versatile and practical.
[0044] In some embodiments, both the first and second detection components include a first Hall effect sensor, and the third detection component includes a second Hall effect sensor. The first and second Hall effect sensors are adapted to each other; that is, the first detection component includes a first Hall effect sensor, the second detection component includes a first Hall effect sensor, and both first Hall effect sensors are adapted to the second Hall effect sensor. Both the first and second Hall effect sensors can be passive magnetic Hall effect sensors.
[0045] Based on the positions of the first and second detection components relative to the third detection component, level signals corresponding to the first and second positions are provided, including: Based on the magnetic field signals collected between the first detection component, the second detection component, and the third detection component, level signals corresponding to the first and second positions are provided. When a magnetic field signal is acquired from between the first detection component and the third detection component, the level signal of the first general-purpose input / output interface is the first level; When a magnetic field signal is acquired from between the second and third detection components, the level signal of the second general-purpose input / output interface is at the first level.
[0046] Optionally, the first level is a low level.
[0047] When the physical posture of the machine changes, the positions of the first detection component at the first position A and the second detection component at the second position B are different relative to the third detection component at the mounting position C of the base.
[0048] See Figure 4 When the device is positioned horizontally on the base, positions B and C fall within their corresponding ranges. A magnetic field signal is generated between the first Hall effect sensor at position B and the second Hall effect sensor at position C, triggering the second general-purpose input / output interface (GPIOY) of the PCH, which is electrically connected to the first Hall effect sensor at position B, to go low (first level). However, since the first Hall effect sensor at position A and the second Hall effect sensor at position C do not fall within their corresponding ranges, no magnetic field signal is generated between them. Therefore, the level of the first general-purpose input / output interface (GPIOX) of the PCH remains high (second level).
[0049] See Figure 5 When the device is mounted on the base in portrait mode, positions A and C fall within their corresponding ranges. A magnetic field signal is generated between the first Hall effect sensor at position A and the second Hall effect sensor at position C, triggering the first general-purpose input / output interface (GPIOX) of the PCH, which is electrically connected to the first Hall effect sensor at position A, to go low (first level). However, the first Hall effect sensor at position B and the second Hall effect sensor at position C do not fall within their corresponding ranges, and no magnetic field signal is generated between them. Therefore, the level of the second general-purpose input / output interface (GPIOY) of the PCH remains high (second level).
[0050] Optionally, both the first Hall effect sensor and the second Hall effect sensor can be conical magnetic permeators. The magnetic force is concentrated at the end of the conical magnetic permeator, which will significantly enhance the magnetic signal, make it easier to identify, and reduce environmental interference.
[0051] In some embodiments, the first detection component and the second detection component both include a first mechanical switch, and the third detection component includes a second mechanical switch. The first mechanical switch and the second mechanical switch are adapted to each other. That is, the first detection component includes a first mechanical switch, the second detection component includes a first mechanical switch, both first mechanical switches are adapted to the second mechanical switch, and both the first mechanical switch and the second mechanical switch can be push-button type mechanical switches.
[0052] Based on the positions of the first and second detection components relative to the third detection component, level signals corresponding to the first and second positions are provided, including: Based on the trigger signals collected from the first detection component, the second detection component, and the third detection component, level signals corresponding to the first and second positions are provided; When a trigger signal generated by the cooperation of the first detection component and the third detection component is acquired, the level signal of the first general-purpose input / output interface is the first level; When a trigger signal generated by the cooperation of the second and third detection components is acquired, the level signal of the second general-purpose input / output interface is the first level.
[0053] Optionally, the first level is a low level.
[0054] When the physical posture of the machine changes, the positions of the first detection component at the first position A and the second detection component at the second position B are different relative to the third detection component at the mounting position C of the base.
[0055] See Figure 4 When the device is positioned horizontally on the base, positions B and C fall within their corresponding ranges. The first mechanical switch at position B and the second mechanical switch at position C physically contact each other and generate a trigger signal. This causes the level of the second general-purpose input / output interface GPIOY of the PCH, which is electrically connected to the first mechanical switch at position B, to go low (first level). However, the first mechanical switch at position A and the second mechanical switch at position C do not fall within their corresponding ranges, and they do not physically contact each other, resulting in no trigger signal. Therefore, the level of the first general-purpose input / output interface GPIOX of the PCH remains high (second level).
[0056] See Figure 5When the device is mounted on the base in portrait mode, positions A and C fall within their corresponding ranges. The first mechanical switch at position A and the second mechanical switch at position C make physical contact and generate a trigger signal. This triggers the first general-purpose input / output interface (GPIOX) of the PCH, which is electrically connected to the first Hall effect sensor at position A, to go low (first level). However, the first mechanical switch at position B and the second mechanical switch at position C do not fall within their corresponding ranges. They do not make physical contact and there is no trigger signal. Therefore, the level of the second general-purpose input / output interface (GPIOY) of the PCH remains high (second level).
[0057] Optionally, the mechanical switch may include a cylindrical physical button. For example, cylindrical physical buttons are installed in the first position A and the second position B respectively. When the machine body is rotated, the physical button is pressed by the support column to pull down the level signal of the corresponding general purpose input / output interface (GPIO), thereby triggering a system control interrupt and improving detection accuracy.
[0058] Of course, the first detection component, the second detection component, and the third detection component can also be other sensors or switches, and this application does not make any specific limitations.
[0059] In some embodiments, determining the screen information of the current device based on a level signal includes: The screen information of the current machine is determined based on the detected GPIOX and GPIOY level signals of the first and second general-purpose input / output interfaces of the motherboard chip.
[0060] In some embodiments, the screen information of the current device is determined based on the detected level signals of the first general-purpose input / output interface GPIOX and the second general-purpose input / output interface GPIOY of the device's motherboard chip, including: If the level signal of the first general-purpose input / output interface GPIOX or the level signal of the second general-purpose input / output interface GPIOY is detected to be at the first level, a system control interrupt is triggered, and the corresponding interrupt general event is executed to determine the screen information of the current machine.
[0061] In some embodiments, a corresponding general interrupt event is executed to determine the current screen information of the device, including: Determine the level signal of the first general-purpose input / output interface GPIOX and the level signal of the second input / output interface GPIOY; If it is determined that the level signal of the first general-purpose input / output interface GPIOX is the first level and the level signal of the second general-purpose input / output interface GPIOY is the second level, then it is determined that the screen information of the current machine is portrait mode. If it is determined that the level signal of the first general-purpose input / output interface GPIOX is the second level and the level signal of the second general-purpose input / output interface GPIOY is the first level, then the screen information of the current machine is determined to be landscape mode.
[0062] Optionally, the first level can be low and the second level can be high. Of course, the first level can also be high, and correspondingly, the second level can be ground. This application does not make any specific limitation.
[0063] The following explanation uses the example of a low level for the first level and a high level for the second level.
[0064] See Figure 4 When the device is positioned horizontally on the base, the second position B and the mounting position C fall within their corresponding ranges, triggering the second general-purpose input / output interface GPIOY of the PCH, which is electrically connected to the first detection component at the second position B, to go low (first level). Meanwhile, the first general-purpose input / output interface GPIOX of the PCH remains high (second level).
[0065] See Figure 5 When the device is mounted on the base in portrait mode, the first position A and the mounting position C fall into the corresponding range, triggering the first general-purpose input / output interface GPIOX of the PCH, which is electrically connected to the first detection component of the first position A, to go low (first level). Meanwhile, the level of the second general-purpose input / output interface GPIOY of the PCH remains high (second level).
[0066] See Table 1 for a comparison of the relationship between the level states of GPIOX and GPIOY and the screen mode.
[0067] Table 1: Relationship between GPIOX and GPIOY Level States and Screen Mode
[0068] For example, taking a display with a resolution of 1920x1080 as an example, according to the structural design, the three detection components can be installed in preset positions respectively. By rotating the body, the first detection component at the first position A and the second detection component at the second position B generate magnetic field signals or trigger signals with the third detection component at the third position C, thereby triggering the change of the level of the first general-purpose input / output interface GPIOX and the second general-purpose input / output interface GPIOY, as shown in Table 1 above.
[0069] The embodiments of this application can be applied to various scenarios. The following description takes the boot mode scenario as an example. The boot mode of this application embodiment is after entering the operating system.
[0070] In normal boot mode, the BIOS detects the level signals from positions A and B respectively via the first general-purpose input / output interface GPIOX and the second general-purpose input / output interface GPIOY of the PCH. If a level change is detected in either position A or position B, the UEFI BIOS triggers a System Control Interrupt (SCI) and executes the corresponding ACPI code (Advanced Configuration and Power Management Interface Code). In this interrupt event, the GPIO signals corresponding to positions A and B are checked. If the level signal of the first general-purpose input / output interface GPIOX corresponding to position A is high and the level of the second general-purpose input / output interface GPIOY corresponding to position B is low, the ACPI code that switches to landscape mode is executed. The execution content notifies the screen driver under the operating system and generates a linkage to achieve the effect of switching to landscape mode, changing the resolution to 1920x1080.
[0071] In normal boot mode, the BIOS (Basic Input / Output System) detects the level signals from positions A and B respectively through the first general-purpose input / output interface GPIOX and the second general-purpose input / output interface GPIOY of the PCH. If a level change is detected in either position A or position B, the BIOS triggers a System Control Interrupt (SCI) and executes the corresponding ACPI code (Advanced Configuration and Power Management Interface Code). In this interrupt event, the BIOS checks the GPIO signals corresponding to positions A and B. If the level signal of the first general-purpose input / output interface GPIOX corresponding to position A is low and the level of the second general-purpose input / output interface GPIOY corresponding to position B is high, the BIOS executes an ACPI code that switches to portrait mode. The execution content notifies the screen driver under the operating system and generates a linkage to achieve the effect of switching to portrait mode, changing the resolution to 1080x1920.
[0072] Of course, the embodiments of this application can also be applied to scenarios where the machine is already powered on, and the implementation method is similar to that described above, so it will not be repeated here.
[0073] In some embodiments, based on screen information, determining display parameters corresponding to the screen information and displaying the determined display parameters includes: Based on the screen information, determine the display parameters corresponding to the screen information; Based on the determined display parameters, modify the content of the display interface provided by the system; Content is displayed based on the modified display interface.
[0074] Optionally, based on screen information, display parameters corresponding to the screen information are determined, and the determined display parameters are displayed, including: Provide the screen information to the upper-layer screen driver; The upper-layer screen driver notifies the service layer within its corresponding driver package based on the screen information. The service layer within the driver package calls the display orientation interface provided by the system based on the screen information; The interface for display orientation will be modified to landscape or portrait orientation, so that the device displays at the screen resolution corresponding to the screen information.
[0075] Specifically, the underlying interrupt general event sends the current screen information to the upper screen driver. The upper screen driver then notifies the service layer within its corresponding driver package. The service layer in the driver package creates a program to call the display orientation interface provided by Windows based on the screen information, and modifies the display orientation interface to landscape or portrait mode, thereby achieving the switching between landscape and portrait resolutions.
[0076] This application embodiment achieves dynamic reconstruction of display parameters during machine rotation by using three detection components on an all-in-one machine to determine whether the physical posture of the machine has changed, in conjunction with the triggering of a system control interrupt. This eliminates the need for a G-snesor chip, enabling automatic adjustment of display parameters during machine rotation. Specifically, a low-cost posture sensing mechanism based on the general-purpose input / output interface of the motherboard chip within the machine can be used. Low-complexity devices such as Hall effect sensors or mechanical switches are placed at key locations on the machine and its base. When the physical posture of the machine changes (e.g., from landscape to portrait, or vice versa), the physical posture event is converted into a level transition signal on the GPIO input / output interface. After the level transition signal is captured by the BIOS, a system control interrupt (SCI) event is immediately triggered. The firmware layer executes ACPI codes through preset interrupt event actions to manage the current display parameters, thereby achieving a seamless, real-time dynamic adjustment strategy for display parameters, ensuring that the current display output matches the physical posture. The sensing mechanism and logic processing used are completely independent of the Earth's gravity reference frame, maintaining functional integrity even under low gravity or zero gravity conditions, exhibiting high reliability.
[0077] This application also provides a display control method applied to an electronic device. The electronic device includes a body and a base. The body can be mounted on the base in either a landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions.
[0078] Combination Figure 7 As shown, the display control method may include steps S201 to S203.
[0079] S201, based on the first detection component, the second detection component and the third detection component, determine whether the machine body is set on the base in landscape mode or portrait mode; S202, if it is determined that the machine body is set on the base in landscape mode, the screen of the machine body is controlled to display the first display parameter; S203, if it is determined that the machine body is set on the base in portrait mode, the screen of the machine body is controlled to display the second display parameter; The first display parameter and the second display parameter are different.
[0080] The display control method provided in this application embodiment has a first detection component at a first position of the device body, a second detection component at a second position of the device body, and a third detection component at the mounting position of the base. The first, second, and third detection components determine whether the device body is mounted on the base in landscape or portrait mode. If the device body is determined to be mounted in landscape mode, the screen of the device body is controlled to display according to a first display parameter; if the device body is determined to be mounted in portrait mode, the screen of the device body is controlled to display according to a second display parameter. This achieves dynamic adjustment of display parameters when the device body rotates, eliminating the need for high-cost algorithm chips and complex circuit designs, thereby reducing costs. Furthermore, it reduces the complexity of firmware layer sensor adaptation, eliminating the need for developers to adjust corresponding firmware according to specific requirements, thus reducing labor costs. The absence of complex circuit design frees up high-density PCB layout space, which can be reallocated to other key functional modules, improving system design flexibility.
[0081] Optionally, based on the first detection component, the second detection component, and the third detection component, it is determined whether the machine body is set on the base in landscape or portrait mode. Refer to the previous embodiments for details, which will not be repeated here.
[0082] This application also provides a display method applied to an electronic device, the electronic device having a display end and a body with adjustable relative positions; the display method includes: In response to different display commands, the display terminal presents a display state corresponding to the display command; wherein, each different display command corresponds to a different relative position between the display terminal and the main body, and is triggered by a corresponding position detection device.
[0083] Furthermore, the electronic device in this embodiment includes a body and a base. The body can be mounted on the base in either landscape or portrait mode. A first detection component is located at a first position on the body, a second detection component is located at a second position on the body, and a third detection component is located on the base. The first and second positions are different locations. The display method in this embodiment can be implemented as follows: Based on the first detection component, the second detection component and the third detection component, it is determined whether the machine body is set on the base in landscape mode or portrait mode; In response to a first display command, the screen of the machine displays the first display parameters; the first display command is triggered by determining that the machine is set in landscape mode on the base; In response to a second display command, the screen of the machine displays the second display parameters; the second display command is triggered by determining that the machine is set in portrait mode on the base.
[0084] This application provides an electronic device, including a body and a base. The body can be mounted on the base in either a landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions. The device includes at least a memory and a processor. The memory stores a computer program. When the processor executes the computer program in the memory, it implements the steps of the display parameter adjustment method provided in any of the above embodiments, or the steps of the display control method provided in the above embodiments.
[0085] The electronic device provided in this application has the same inventive concept and the same beneficial effects as the previous embodiments. The contents of the electronic device not shown in detail can be referred to the previous embodiments, and will not be repeated here.
[0086] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A method for adjusting display parameters, characterized in that, The method is applied to an electronic device, which includes a body and a base. The body can be mounted on the base in either landscape or portrait mode. A first detection component is located at a first position of the body, a second detection component is located at a second position of the body, and a third detection component is located on the base. The first and second positions are different positions. The level signals are detected from the first position and the second position respectively; wherein the level signals are provided based on the cooperation of the first detection component, the second detection component and the third detection component; Based on the aforementioned level signal, the screen information of the current device is determined; wherein, the screen information includes landscape mode and portrait mode; Based on the screen information, the display parameters corresponding to the screen information are determined, and the determined display parameters are displayed.
2. The method according to claim 1, characterized in that, Detecting the level signals from the first position and the second position respectively includes: Based on the electrical connection between the first general-purpose input / output interface of the motherboard chip of the machine body and the first detection component, the electrical connection between the second general-purpose input / output interface of the motherboard chip of the machine body and the second detection component, and the positions of the first detection component and the second detection component relative to the third detection component, level signals from the first position and the second position are provided, and level signals from the first position and the second position are detected respectively.
3. The method according to claim 2, characterized in that, Both the first detection component and the second detection component include a first Hall effect sensor, and the third detection component includes a second Hall effect sensor. The first Hall effect sensor and the second Hall effect sensor are adapted to each other. Based on the positions of the first detection component and the second detection component relative to the third detection component, level signals corresponding to the first position and the second position are provided, including: Based on the magnetic field signals collected between the first detection component, the second detection component, and the third detection component, level signals corresponding to the first position and the second position are provided; When a magnetic field signal is acquired from between the first detection component and the third detection component, the level signal of the first general-purpose input / output interface is the first level; When a magnetic field signal is acquired between the second detection component and the third detection component, the level signal of the second general-purpose input / output interface is at the first level.
4. The method according to claim 2, characterized in that, Both the first detection component and the second detection component include a first mechanical switch, and the third detection component includes a second mechanical switch, wherein the first mechanical switch is adapted to the second mechanical switch; Based on the positions of the first detection component and the second detection component relative to the third detection component, level signals corresponding to the first position and the second position are provided, including: Based on the trigger signals collected from the first detection component, the second detection component, and the third detection component, level signals corresponding to the first position and the second position are provided; When a trigger signal generated by the cooperation of the first detection component and the third detection component is acquired, the level signal of the first general-purpose input / output interface is the first level; When a trigger signal generated by the cooperation of the second detection component and the third detection component is acquired, the level signal of the second general-purpose input / output interface is the first level.
5. The method according to claim 2, characterized in that, Based on the aforementioned level signal, the screen information of the current device is determined, including: Based on the detected level signals of the first and second general-purpose input / output interfaces of the motherboard chip of the device, the screen information of the current device is determined.
6. The method according to claim 5, characterized in that, Based on the detected level signals of the first and second general-purpose input / output interfaces of the motherboard chip of the device, the screen information of the current device is determined, including: If the level signal of the first general-purpose input / output interface or the level signal of the second general-purpose input / output interface is detected to be at the first level, a system control interrupt is triggered, and the corresponding interrupt general event is executed to determine the screen information of the current machine.
7. The method according to claim 6, characterized in that, Execute the corresponding general interrupt event to determine the current screen information of the device, including: Determine the level signal of the first general-purpose input / output interface and the level signal of the second input / output interface; If it is determined that the level signal of the first general-purpose input / output interface is at the first level and the level signal of the second general-purpose input / output interface is at the second level, then it is determined that the screen information of the current device is in portrait mode. If it is determined that the level signal of the first general-purpose input / output interface is the second level and the level signal of the second general-purpose input / output interface is the first level, then the screen information of the current device is determined to be landscape mode.
8. The method according to claim 1, characterized in that, Based on the screen information, determining the display parameters corresponding to the screen information, and displaying the determined display parameters, including: Based on the screen information, determine the display parameters corresponding to the screen information; Based on the determined display parameters, modify the display interface content provided by the system; Content is displayed based on the modified display interface.
9. A display control method, characterized in that, The method is applied to an electronic device, which includes a body and a base. The body can be mounted on the base in either landscape or portrait mode. A first detection component is located at a first position of the body, a second detection component is located at a second position of the body, and a third detection component is located on the base. The first and second positions are different positions. Based on the first detection component, the second detection component, and the third detection component, it is determined that the machine body is set on the base in either landscape or portrait mode. If it is determined that the machine body is set on the base in landscape mode, the screen of the machine body is controlled to display the first display parameter; If it is determined that the machine body is set on the base in portrait mode, the screen of the machine body is controlled to display the second display parameter; The first display parameter and the second display parameter are different.
10. An electronic device, characterized in that, The device includes a body and a base. The body can be mounted on the base in either landscape or portrait mode. A first detection component is provided at a first position of the body, a second detection component is provided at a second position of the body, and a third detection component is provided on the base. The first and second positions are different positions. The body includes at least a memory and a processor. The memory stores a computer program. When the processor executes the computer program in the memory, it implements the steps of the method for adjusting the display parameters according to any one of claims 1 to 8, or the steps of the display control method according to claim 9.