Embedded equipment and cursor movement control method

文档序号:321558 发布日期:2021-11-30 浏览:12次 中文

阅读说明:本技术 嵌入式设备和光标移动控制方法 (Embedded equipment and cursor movement control method ) 是由 叶志兴 周晶晶 于 2020-05-21 设计创作,主要内容包括:本发明实施例涉及一种嵌入式设备和一种光标移动控制方法。所述嵌入式设备例如包括旋钮和电连接所述旋钮的主处理电路,所述主处理电路安装有操作系统且用于:接收因所述旋钮的旋转操作而产生的旋转信号;根据预设旋转信号与光标移动信号的映射关系将所述旋转信号转换成光标移动信号以及根据所述光标移动信号控制所述操作系统的光标在目标方向上移动。本发明实施例可以提高嵌入式设备的操作系统的控制效率。(The embodiment of the invention relates to an embedded device and a cursor movement control method. The embedded device comprises, for example, a knob and a main processing circuit electrically connected to the knob, the main processing circuit being equipped with an operating system and being configured to: receiving a rotation signal generated by a rotation operation of the knob; and converting the rotation signal into a cursor movement signal according to a mapping relation between a preset rotation signal and the cursor movement signal, and controlling a cursor of the operating system to move in a target direction according to the cursor movement signal. The embodiment of the invention can improve the control efficiency of the operating system of the embedded equipment.)

1. An embedded device comprising a knob and a main processing circuit electrically connected to the knob, the main processing circuit being equipped with an operating system and configured to:

receiving a rotation signal generated by a rotation operation of the knob;

converting the rotation signal into a cursor movement signal according to a mapping relation between a preset rotation signal and the cursor movement signal; and

and controlling the cursor of the operating system to move in the target direction according to the cursor movement signal.

2. The embedded device of claim 1, wherein the main processing circuit is further configured to:

receiving a mapping relation switching signal; and

and switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

3. The embedded device according to claim 2, further comprising a key electrically connected to the main processing circuit and configured to generate the mapping relationship switching signal in response to a user operation.

4. The embedded device of claim 3, wherein the main processing circuit comprises a microcontroller and an embedded processor electrically connected to the microcontroller, and the embedded processor is mounted with the operating system, and the microcontroller is electrically connected to the knob.

5. The embedded device according to claim 4, wherein the microcontroller is further connected to the button, and configured to receive the mapping relationship switching signal from the button and send the mapping relationship switching signal to the embedded processor; and the embedded processor is used for switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

6. The embedded device according to any one of claims 1-5, wherein the mapping relationship between the preset rotation signal and the cursor movement signal is: the left-handed signal of the knob corresponds to the left-handed signal of the cursor and the right-handed signal of the knob corresponds to the right-handed signal of the cursor, and the target direction is one of a left direction and a right direction;

alternatively, the first and second electrodes may be,

the mapping relation between the preset rotation signal and the cursor movement signal is as follows: the left-handed signal of the knob corresponds to the upward movement signal of the cursor and the right-handed signal of the knob corresponds to the downward movement signal of the cursor, and the target direction is one of an upward direction and a downward direction.

7. The embedded device according to any one of claims 4-5, wherein the controlling the cursor of the operating system to move in the target direction according to the cursor movement signal includes:

and calling an application program interface corresponding to the operating system according to the cursor movement signal so as to control the cursor to move in the target direction through the application program interface.

8. A cursor movement control method, comprising:

receiving a rotation signal generated by a rotation operation of a knob;

converting the rotation signal into a cursor movement signal according to a mapping relation between a preset rotation signal and the cursor movement signal;

and controlling the cursor of the operating system to move in the target direction according to the cursor movement signal.

9. The cursor movement control method of claim 8, further comprising:

receiving a mapping relation switching signal; and

and switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

10. The cursor movement control method according to claim 8, wherein the mapping relationship between the preset rotation signal and the cursor movement signal is: the left-handed signal of the knob corresponds to the left-handed signal of the cursor and the right-handed signal of the knob corresponds to the right-handed signal of the cursor, and the target direction is one of a left direction and a right direction; alternatively, the first and second electrodes may be,

the mapping relation between the preset rotation signal and the cursor movement signal is as follows: the left-handed signal of the knob corresponds to the upward movement signal of the cursor and the right-handed signal of the knob corresponds to the downward movement signal of the cursor, and the target direction is one of an upward direction and a downward direction.

Technical Field

The invention relates to the technical field of display control, in particular to an embedded device and a cursor movement control method.

Background

Currently, a common method in a control method of an embedded operating system, such as an Android system, is to use a touch screen or a remote control key to control up, down, left and right movement of a cursor. However, the cost is high by adopting the touch screen to control the touch screen, and the risk of mistaken touch exists; the scheme of the remote controller key needs to be realized by arranging four direction keys (up, down, left and right), and for the scheme of the remote controller key, a user needs to press the direction keys for many times in a scene that a cursor of an Android system needs to be continuously moved, particularly the cursor needs to be rapidly moved, so that the operation process is complicated, and the control efficiency is low.

Therefore, how to improve the control efficiency of the embedded operating system is a technical problem that needs to be solved urgently at present.

Disclosure of Invention

Therefore, to overcome the defects and shortcomings of the prior art, embodiments of the present invention provide an embedded device and a cursor movement control method.

On one hand, an embedded device provided by an embodiment of the present invention includes a knob and a main processing circuit electrically connected to the knob, where the main processing circuit is installed with an operating system and is configured to: receiving a rotation signal generated by a rotation operation of the knob; converting the rotation signal into a cursor movement signal according to a mapping relation between a preset rotation signal and the cursor movement signal; and controlling the cursor of the operating system to move in the target direction according to the cursor movement signal.

The embedded device of the embodiment determines the cursor movement signal according to the rotation signal generated by the rotation operation of the knob and the mapping relation between the preset rotation signal and the cursor movement signal, and then controls the cursor of the operating system installed on the embedded device to move in the target direction according to the cursor movement signal.

In one embodiment of the invention, the main processing circuit is further configured to: receiving a mapping relation switching signal; and switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

In an embodiment of the present invention, the embedded device further includes a key electrically connected to the main processing circuit and configured to generate the mapping relationship switching signal in response to a user operation.

In one embodiment of the invention, the main processing circuit comprises a microcontroller and an embedded processor electrically connected with the microcontroller, the embedded processor is provided with the operating system, and the microcontroller is electrically connected with the knob.

In an embodiment of the present invention, the microcontroller is further connected to the key and configured to receive the mapping relationship switching signal from the key and send the mapping relationship switching signal to the embedded processor; and the embedded processor is used for switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

In an embodiment of the present invention, the mapping relationship between the preset rotation signal and the cursor movement signal is: the left-handed signal of the knob corresponds to the left-handed signal of the cursor and the right-handed signal of the knob corresponds to the right-handed signal of the cursor, and the target direction is one of a left direction and a right direction; or the mapping relation between the preset rotation signal and the cursor movement signal is as follows: the left-handed signal of the knob corresponds to the upward movement signal of the cursor and the right-handed signal of the knob corresponds to the downward movement signal of the cursor, and the target direction is one of an upward direction and a downward direction.

In an embodiment of the present invention, the controlling the cursor of the operating system to move in the target direction according to the cursor movement signal specifically includes: and calling an application program interface corresponding to the operating system according to the cursor movement signal so as to control the cursor to move in the target direction through the application program interface.

On the other hand, a cursor movement control method provided by the embodiment of the present invention includes: receiving a rotation signal generated by a rotation operation of a knob; converting the rotation signal into a cursor movement signal according to a mapping relation between a preset rotation signal and the cursor movement signal; and controlling the cursor of the operating system to move in the target direction according to the cursor movement signal.

The cursor movement control method of the embodiment determines the cursor movement signal according to the rotation signal generated by the rotation operation of the knob and the mapping relation between the rotation signal and the preset rotation signal and the cursor movement signal, and then controls the cursor of the operating system to move in the target direction according to the cursor movement signal.

In one embodiment of the present invention, the cursor movement control method further includes: receiving a mapping relation switching signal; and switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal.

In an embodiment of the present invention, the mapping relationship between the preset rotation signal and the cursor movement signal is: the left-handed signal of the knob corresponds to the left-handed signal of the cursor and the right-handed signal of the knob corresponds to the right-handed signal of the cursor, and the target direction is one of a left direction and a right direction; or the mapping relation between the preset rotation signal and the cursor movement signal is as follows: the left-handed signal of the knob corresponds to the upward movement signal of the cursor and the right-handed signal of the knob corresponds to the downward movement signal of the cursor, and the target direction is one of an upward direction and a downward direction.

As can be seen from the above, the above technical features of the present invention may have one or more of the following advantages: the cursor movement signal is determined according to the rotation signal generated by the rotation operation of the knob and the mapping relation between the rotation signal and the preset rotation signal and the cursor movement signal, and then the cursor of the operating system is controlled to move in the target direction according to the cursor movement signal.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic structural diagram of an embedded device according to an embodiment of the present invention.

Fig. 2 is a flowchart illustrating a cursor movement control method applied to an embedded device according to an embodiment of the present invention.

Fig. 3 is a schematic structural diagram of another embedded device according to an embodiment of the present invention.

Fig. 4 is a schematic structural diagram of another embedded device according to an embodiment of the present invention.

Fig. 5 is a schematic structural diagram of another embedded device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

As shown in fig. 1, an embedded device 100 provided in an embodiment of the present invention includes: a knob 10 and a main processing circuit 20 electrically connected with the knob 10, wherein an operating system such as an andriod system is installed in the main processing circuit 20. It should be noted that, here, the existing knob circuit is adopted for realizing the knob function, and the knob circuit is electrically connected to the main processing circuit, of course, the knob 10 may also be a mechanical component, which is electrically connected to the main processing circuit 20 through a wire, and the knob 10 generates the left-handed signal or the right-handed signal through the mechanical rotation thereof.

As shown in fig. 2, the main processing circuit 20 is configured to perform the following steps:

a step S10 of receiving a rotation signal generated by a rotation operation of the knob 10;

step S12, converting the rotation signal into cursor movement signal according to the mapping relation between the preset rotation signal and the cursor movement signal; and

and step S14, controlling the cursor of the operating system to move in the target direction according to the cursor movement signal.

It should be understood that the main processing circuit 20 may be internally provided with a nonvolatile memory, such as a flash, and the mapping relationship between the preset rotation signal and the cursor movement signal is correspondingly stored in the nonvolatile memory. Of course, the embedded device 100 may also include a nonvolatile memory, such as a flash, which is independent of the main processing circuit 20 and electrically connected to the main processing circuit 20, and the nonvolatile memory is used for storing the mapping relationship between the preset rotation signal and the cursor movement signal.

In view of the above, the rotating operation includes rotating the knob 10 to the left and rotating the knob 10 to the right, and the corresponding rotating signals are a left-handed signal and a right-handed signal, respectively, where the left-handed signal may correspond to a high-level signal and the right-handed signal corresponds to a low-level signal, and vice versa, and the embodiment of the present invention is not limited herein.

In summary, the mapping relationship between the preset rotation signal and the cursor movement signal is as follows: the left-handed signal of the knob 10 corresponds to the left-handed signal of the cursor and the right-handed signal of the knob 10 corresponds to the right-handed signal of the cursor, and correspondingly, the target direction is one of left and right directions; or, the left-handed signal of the knob 10 corresponds to the upward movement signal of the cursor and the right-handed signal of the knob 10 corresponds to the downward movement signal of the cursor, and correspondingly, the target direction is one of the upward direction and the downward direction, although the mapping relationship between the preset rotation signal and the cursor movement signal may also be other mapping relationships, for example, the left-handed signal of the knob 10 corresponds to the right movement signal of the cursor and the right-handed signal corresponds to the left movement signal of the cursor, and embodiments of the present invention are not enumerated herein one by one. For example, the mapping relationship between the preset rotation signal and the cursor movement signal may be represented by binary numbers 0 and 1, for example, binary number 0 is used to represent that the left-handed signal of the knob 10 corresponds to the left-handed signal of the cursor and the right-handed signal of the knob 10 corresponds to the right-handed signal of the cursor, and binary number 1 is used to represent that the left-handed signal of the knob 10 corresponds to the up-handed signal of the cursor and the right-handed signal of the knob 10 corresponds to the down-handed signal of the cursor, or vice versa, and of course, the mapping relationship between the preset rotation signal and the cursor movement signal may be represented by other means such as a character string, and the embodiment of the present invention is not limited in particular here.

In this embodiment, the main processing circuit 20 of the embedded device 100 determines a cursor movement signal according to a mapping relationship between a rotation signal generated by the rotation operation of the knob 10 and a preset rotation signal and the cursor movement signal, and then controls a cursor of an operating system installed in the embedded device 100 to move in a target direction according to the cursor movement signal, and the cursor can be controlled to move in the target direction by rotating the knob 10 left and right, so that compared with a scheme that a remote controller needs to be provided with at least four directional keys in the prior art, the use of keys is reduced, the space of the embedded device 100 is saved, and in this embodiment, the cursor can be rapidly moved by rotating the knob 10, thereby improving the control efficiency of the operating system.

As mentioned above, the main processing circuit 20 is further configured to receive a mapping relationship switching signal; and switching the mapping relation between the preset rotation signal and the cursor movement signal according to the mapping relation switching signal. For example, in a case that the mapping relationship between the preset rotation signal and the cursor movement signal is that the left-handed signal of the knob 10 corresponds to the left-handed signal of the cursor and the right-handed signal of the knob 10 corresponds to the right-handed signal of the cursor, the mapping relationship between the preset rotation signal and the cursor movement signal after switching is that the left-handed signal of the knob 10 corresponds to the up-handed signal of the cursor and the right-handed signal of the knob 10 corresponds to the down-handed signal of the cursor, or vice versa, of course, specific contents of the specific preset mapping relationship before switching and the specific contents of the specific preset mapping relationship after switching can be customized by the user, and the form thereof can be diversified, and the embodiment of the present invention is not limited specifically herein.

In a specific embodiment, as shown in fig. 3, the embedded device 100 further includes a key 30, the key 30 is electrically connected to the main processing circuit 20, and the key 30 is configured to generate the mapping relationship switching signal in response to a user operation, such as a pressing operation. It should be noted that, the existing key circuit is adopted for realizing the key function, the key circuit is electrically connected to the main processing circuit, of course, the key 30 may also be a mechanical component, which is electrically connected to the main processing circuit 20 through a wire, and the key 30 generates a pulse signal, i.e., a mapping relationship switching signal, in response to a pressing operation of a user.

Of course, the mapping relationship switching signal may also be generated by the user touching the knob 10, for example, the mapping relationship switching signal is generated by the user pressing the knob 10 twice, and certainly, other manners may also be defined to touch the knob 10 so that the knob 10 generates the mapping relationship switching signal, as long as the main processing circuit 20 receives the mapping relationship switching signal and switches the mapping relationship according to the mapping relationship switching signal, the embodiment of the present invention is not specifically limited herein, in this technical solution, the button 10 may generate both the mapping relationship switching signal and the rotation signal, so that it is realized that the up-down and left-right movement of the cursor can be realized only by using one control element, i.e. the knob 10, and compared with the prior art that four direction keys are required to be provided to control the movement of the cursor in four directions, according to the technical scheme, the cursor can be controlled to move in four directions only by arranging one knob, so that the space of the embedded device 100 is saved, the cost is saved, and meanwhile, the control efficiency of an operating system can be improved.

As mentioned above, as shown in fig. 4, the main processing circuit 20 includes a microcontroller 22 and an embedded processor 24 electrically connected to the microcontroller 22, the embedded processor 24 is installed with the operating system, and the microcontroller 22 is electrically connected to the knob 10. The Microcontroller 22 may be, for example, an MCU (micro controller Unit), the embedded processor 24 may be, for example, an arm (advanced RISC machines), the Microcontroller 22 includes, for example, a communication interface such as a serial port, and is electrically connected to the embedded processor 24 through the serial port, which is not limited in the embodiments of the present invention. Of course, the main processing circuit 20 in the embodiment of the present invention may also include only the embedded processor 24 without providing the microcontroller 22 and execute the cursor movement control method (corresponding to fig. 2) by the embedded processor.

As shown in fig. 5, the microcontroller 22 is further connected to the key 30 and configured to receive the mapping relationship switching signal from the key 30 and send the mapping relationship switching signal to the embedded processor 24; the embedded processor 24 is configured to switch the mapping relationship between the preset rotation signal and the cursor movement signal according to the mapping relationship switching signal.

In addition, the main processing circuit 20 may be further configured to receive a knob down signal, and execute an operation of clicking an object to which the cursor is currently pointing according to the knob down signal, where the knob down signal is a signal generated in response to a user pressing the knob 10.

Furthermore, the main processing circuit 20 may be further configured to receive a return signal, and perform a return operation according to the return signal to return the cursor from the current position to a previous position, where the return signal may be generated when the user touches the knob 10, and of course, the return signal may also be generated in response to the operation of the user through a key connected to the main processing circuit 20 and disposed on the embedded device 100, which is not limited in this embodiment of the present invention.

In view of the above, in an embodiment of the present invention, the controlling the cursor of the operating system to move in the target direction according to the cursor movement signal includes: and calling an application program interface corresponding to the operating system according to the cursor movement signal so as to control the cursor to move in the target direction through the application program interface.

First, it should be noted that the mapping relationship between the initial default rotation signal and the cursor movement signal of the embedded device 100 is that the left-turn and right-turn signals of the knob are respectively mapped to the left-shift and right-shift signals of the cursor of the Android system.

1) When the main processing circuit 20 (specifically, the Android system) receives the left-handed signal of the knob 10, the main processing circuit 20 moves the cursor of the Android system from the current operation object to the left to move the cursor to the next operation object, and correspondingly, moves the cursor from the current operation object to the right to move the cursor to the next operation object when the right-handed signal is received;

2) if the main processing circuit 20 receives a mapping relationship switching signal (here, the mapping relationship switching signal may be generated by the knob 10 or the key 30), the main processing circuit 20 maps the left-handed and right-handed signals of the knob 10 to up-handed and down-handed signals of the cursor of the Android system, and then, when the main processing circuit 20 receives the left-handed signals of the knob 10, the cursor of the Android system is moved up from the current operation object to move the cursor to the next operation object, and correspondingly, when the right-handed signals are received, the cursor of the Android system is moved down from the current operation object to move the cursor to the next operation object;

3) when the main processing circuit 20 receives the knob pressing signal, the operation of clicking the current pointing object of the cursor is executed;

4) when the main processing circuit 20 receives the return signal, a return operation is performed to return the cursor from the current position to the previous position.

It should be noted that, under the condition that the main processing circuit 20 includes the microcontroller 22 and the embedded processor 24, when the microcontroller receives a rotation signal (a left-rotation signal and a right-rotation signal (for example, when the knob 10 rotates one grid to the left or to the right, the microcontroller 22 correspondingly receives one left-rotation signal or one right-rotation signal), a mapping relationship switching signal, a knob pressing signal or a return signal), the microcontroller 22 generates a corresponding serial port data packet including the above signals according to a communication protocol constrained in advance, and sends the serial port data packet (for example, through a serial port) to the embedded processor 24 (specifically, a serial port communication app of the Android system), and the embedded processor parses a corresponding command (for example, a left-rotation or right-rotation command, a mapping relationship switching command, a left-rotation command, a right-rotation command, a mapping relationship switching command) from the serial port data packet after receiving the serial port data packet, Knob pressing command or returning command), and calling a corresponding API (application program interface) of the Android system to execute corresponding operation according to the command.

The API may be, for example: instrumentation sendkeydownupsync (int KeyCode).

The KeyCode corresponding to the cursor LEFT-shift signal is keyevent. The KeyCode corresponding to the cursor RIGHT shift signal is keyevent.

The KeyCode corresponding to the cursor UP signal is KeyCode keyevent. The KeyCode corresponding to the cursor DOWN signal is keyevent.

In summary, in the present embodiment, the cursor movement signal is determined according to the rotation signal generated by the rotation operation of the knob and the mapping relationship between the preset rotation signal and the cursor movement signal, and then the cursor of the operating system installed on the embedded device is controlled to move in the target direction according to the cursor movement signal, compared with the scheme of using the remote control button in the prior art, the use of the button is reduced, the space of the embedded device is saved, and the cursor can be rapidly moved by rotating the knob, thereby improving the control efficiency of the operating system.

In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and/or method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units/modules is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units/modules described as separate parts may or may not be physically separate, and parts displayed as units/modules may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units/modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.

The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:触控显示面板

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类