Movatterモバイル変換


[0]ホーム

URL:


CN105891706A - Method and device for calibrating joystick on remote control apparatus - Google Patents

Method and device for calibrating joystick on remote control apparatus
Download PDF

Info

Publication number
CN105891706A
CN105891706ACN201610194872.5ACN201610194872ACN105891706ACN 105891706 ACN105891706 ACN 105891706ACN 201610194872 ACN201610194872 ACN 201610194872ACN 105891706 ACN105891706 ACN 105891706A
Authority
CN
China
Prior art keywords
voltage
magnitude
voltage value
button
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610194872.5A
Other languages
Chinese (zh)
Other versions
CN105891706B (en
Inventor
王兴民
王爱军
许超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co LtdfiledCriticalBeijing Xiaomi Mobile Software Co Ltd
Priority to CN201610194872.5ApriorityCriticalpatent/CN105891706B/en
Publication of CN105891706ApublicationCriticalpatent/CN105891706A/en
Application grantedgrantedCritical
Publication of CN105891706BpublicationCriticalpatent/CN105891706B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开是关于一种遥控设备上遥杆的校准方法及装置,属于终端技术领域。所述方法包括:在操作模式下,接收遥控设备发送的按键数据包,按键数据包中至少携带按键电压值及按键方向标识;根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值;根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值。本公开在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。

The disclosure relates to a method and device for calibrating a joystick on a remote control device, and belongs to the technical field of terminals. The method includes: in the operation mode, receiving a key data packet sent by a remote control device, the key data packet at least carrying a key voltage value and a key direction identification; according to the key direction identification, obtaining the key direction from a pre-stored standard voltage database Identify the corresponding target standard voltage value; according to the relationship between the key voltage value and the target standard voltage value, adopt a calculation method corresponding to the relationship to calculate the key value corresponding to the key voltage value. In this disclosure, when calibrating the remote rod on the remote control device, it does not directly calculate according to the proportional relationship, but uses different calculations according to the relationship between the key voltage value of the remote control device and the standard voltage stored in the standard voltage database. The method calculates the key value corresponding to the key voltage value. Since the key value obtained by this method is more accurate, the control precision is improved.

Description

Translated fromChinese
遥控设备上遥杆的校准方法及装置Calibration method and device for joystick on remote control equipment

技术领域technical field

本公开涉及终端技术领域,尤其涉及一种遥控设备上遥杆的校准方法及装置。The present disclosure relates to the technical field of terminals, and in particular to a method and device for calibrating a joystick on a remote control device.

背景技术Background technique

游戏手柄是一种常见的电子游戏机配件,用户通过对游戏手柄上的遥杆进行操控,可对游戏中的目标物进行控制。随着科技的发展,用户对游戏手柄的控制精度有了更高的要求,这就需要对游戏手柄上遥杆进行校准。通常在对游戏手柄上遥杆进行校准时会得到一个键值,该键值即为对游戏手柄上遥杆的校准结果,基于该键值终端可对游戏中的目标物进行控制。A gamepad is a common electronic game console accessory, and a user can control an object in a game by manipulating a joystick on the gamepad. With the development of technology, users have higher requirements for the control accuracy of the gamepad, which requires calibration of the joystick on the gamepad. Usually, a key value is obtained when calibrating the joystick on the gamepad, and the key value is the calibration result of the joystick on the gamepad. Based on this key value, the terminal can control the target in the game.

目前,市场上所销售的游戏手柄通过遥杆可在水平方向和竖直方向上进行控制,这样在对游戏手柄上遥杆进行校准时,也应在水平方向和竖直方向上对遥杆进行校准。具体校准时,对于水平方向,设定遥杆处于最左端时,采集到的电压值对应的键值为0,遥杆处于最右端时,采集到的电压值对应的键值为255,当遥杆处于最左端与最右端之间时,根据采集到的电压值,直接按照比例关系确定其键值;对于竖直方向,设定遥杆处于最上端时,采集到的电压值对应的键值为255,遥杆处于最下端时,采集到的电压值对应的键值为0,当遥杆处于最上端与最下端之间时,根据采集到的电压值,直接按照比例关系确定其键值。At present, the gamepads sold on the market can be controlled in the horizontal and vertical directions through the joystick, so when calibrating the joystick on the gamepad, the joystick should also be calibrated in the horizontal and vertical directions. calibration. In the specific calibration, for the horizontal direction, when the remote stick is at the leftmost end, the key value corresponding to the collected voltage value is 0; when the remote stick is at the rightmost end, the key value corresponding to the collected voltage value is 255. When the lever is between the leftmost and rightmost ends, according to the collected voltage value, determine its key value directly according to the proportional relationship; for the vertical direction, set the key value corresponding to the collected voltage value when the joystick is at the uppermost end is 255, when the joystick is at the bottom end, the key value corresponding to the collected voltage value is 0, when the joystick is between the top end and the bottom end, the key value is directly determined according to the proportional relationship according to the collected voltage value .

发明内容Contents of the invention

本公开提供一种遥控设备上遥杆的校准方法及装置。The disclosure provides a method and device for calibrating a joystick on a remote control device.

根据本公开实施例的第一方面,提供一种遥控设备上遥杆的校准方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a method for calibrating a joystick on a remote control device is provided, the method comprising:

在操作模式下,接收遥控设备发送的按键数据包,所述按键数据包中至少携带按键电压值及按键方向标识;In the operation mode, receiving a button data packet sent by the remote control device, the button data packet carries at least a button voltage value and a button direction identifier;

根据所述按键方向标识,从预先存储的标准电压数据库中,获取所述按键方向标识对应的目标标准电压值,所述标准电压数据库中存储有方向标识与标准电压值之间的对应关系;According to the key direction identification, from the pre-stored standard voltage database, the target standard voltage value corresponding to the key direction identification is obtained, and the corresponding relationship between the direction identification and the standard voltage value is stored in the standard voltage database;

根据所述按键电压值与所述目标标准电压值之间的关系,采取与所述关系相应的计算方式,计算所述按键电压值对应的键值。According to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value.

在本公开的另一个实施例中,所述根据所述按键方向标识,从预先存储的标准电压数据库中,获取所述按键方向标识对应的目标标准电压值之前,还包括:In another embodiment of the present disclosure, before obtaining the target standard voltage value corresponding to the button direction identifier from the pre-stored standard voltage database according to the button direction identifier, further includes:

在校准模式下,接收所述遥控设备发送的第一标准电压值,所述第一标准电压值为所述遥控设备上遥杆分别处于水平最左端、水平最右端、竖直最上端及竖直最下端时采集到的电压值,所述第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值;In the calibration mode, the first standard voltage value sent by the remote control device is received, and the first standard voltage value is that the joystick on the remote control device is at the horizontal leftmost end, the horizontal rightmost end, the vertical uppermost end and the vertical The voltage value collected at the lowest end, the first standard voltage value includes the extreme left voltage value, the extreme right voltage value, the extreme upper voltage value and the extreme lower voltage value;

接收所述遥控设备发送第二标准电压值,所述第二标准电压值为所述遥控设备上遥杆分别从水平最左端、水平最右端、竖直最上端及竖直最下端移动到中间位置时采集到的电压值,所述第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值;Receive the second standard voltage value sent by the remote control device, and the second standard voltage value is to move the remote control rod from the horizontal leftmost end, the horizontal rightmost end, the vertical uppermost end and the vertical lowermost end to the middle position respectively The voltage value collected at the time, the second standard voltage value includes the left middle voltage value, the right middle voltage value, the upper middle voltage value and the lower middle voltage value;

根据电压值的采集方向,将所述第一标准电压值、所述第二标准电压值与方向标识之间的对应关系存储在标准电压数据库中。According to the collection direction of the voltage value, the corresponding relationship between the first standard voltage value, the second standard voltage value and the direction identifier is stored in a standard voltage database.

在本公开的另一个实施例中,所述方向标识包括水平方向标识和竖直方向标识;In another embodiment of the present disclosure, the direction indicator includes a horizontal direction indicator and a vertical direction indicator;

所述根据所述按键方向标识,从预先存储的标准电压数据库中,获取所述按键方向标识对应的目标标准电压值,包括:The step of obtaining the target standard voltage value corresponding to the button direction identifier from a pre-stored standard voltage database according to the button direction identifier includes:

如果所述按键方向标识为水平方向标识,从所述预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,作为目标标准电压值;If the button direction mark is a horizontal direction mark, from the pre-stored standard voltage database, obtain the extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value corresponding to the horizontal mark as the target standard Voltage value;

如果所述按键方向标识为竖直方向标识,从所述预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,作为目标标准电压值。If the button direction mark is a vertical direction mark, from the pre-stored standard voltage database, obtain the upper pole voltage value, the extreme lower voltage value, the upper middle voltage value, and the lower middle voltage value corresponding to the vertical voltage mark, as the target standard voltage value.

在本公开的另一个实施例中,所述根据所述按键电压值与所述目标标准电压值之间的关系,采取与所述关系相应的计算方式,计算所述按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value ,include:

当所述按键方向标识为水平方向标识时,判断所述按键电压值与所述左中电压值和所述右中电压值之间的关系;When the key direction mark is a horizontal direction mark, judge the relationship between the key voltage value and the left middle voltage value and the right middle voltage value;

如果所述按键电压值小于所述左中电压值,应用以下公式,计算所述按键电压值对应的键值:If the key voltage value is less than the left middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ccbb--aa==sthe s--zz22zz--00;;

如果所述按键电压值大于所述右中电压值,应用以下公式,计算所述按键电压值对应的键值:If the key voltage value is greater than the right middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ddbb--aa==sthe s--zz22zz--zz22;;

如果所述按键电压值大于所述左中电压值小于所述右中电压值,确定所述按键电压值对应的键值为If the key voltage value is greater than the left middle voltage value and smaller than the right middle voltage value, determine the key value corresponding to the key voltage value

其中,x为所述按键电压值,a为所述极左电压值,b为所述极右电压值,c为所述左中电压值,d为所述右中电压值,s为所述按键电压值对应的键值,z为预设键值。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, d is the voltage value of the middle right, and s is the voltage value of the extreme right. The key value corresponding to the key voltage value, z is the preset key value.

在本公开的另一个实施例中,所述根据所述按键电压值与所述目标标准电压值之间的关系,采取与所述关系相应的计算方式,计算所述按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value ,include:

当所述按键方向标识为竖直方向标识时,判断所述按键电压值与所述下中电压值和所述上中电压值之间的关系;When the key direction mark is a vertical direction mark, judge the relationship between the key voltage value and the lower middle voltage value and the upper middle voltage value;

如果所述按键电压值小于所述下中电压值,应用以下公式,计算所述按键电压值对应的键值:If the key voltage value is less than the lower middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--ggff--ee==tt--zz22zz--00;;

如果所述按键电压值大于所述上中电压值,应用以下公式,计算所述按键电压值对应的键值:If the key voltage value is greater than the upper middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--hhff--ee==tt--zz22zz--zz22;;

如果所述按键电压值大于所述下中电压值小于所述上中电压值,确定所述按键电压值对应的键值为If the key voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, determine the key value corresponding to the key voltage value

其中,y为所述按键电压值,e为所述极下电压值,f为所述极上电压值,g为所述下中电压值,h为所述上中电压值,t为所述按键电压值对应的键值,z为预设键值。Wherein, y is the voltage value of the button, e is the voltage value of the extremely lower pole, f is the voltage value of the upper pole, g is the lower middle voltage value, h is the upper middle voltage value, and t is the upper middle voltage value. The key value corresponding to the key voltage value, z is the preset key value.

根据本公开实施例的第二方面,提供一种遥控设备上遥杆的校准装置,所述装置包括:According to a second aspect of an embodiment of the present disclosure, a device for calibrating a joystick on a remote control device is provided, the device comprising:

第一接收模块,用于在操作模式下,接收遥控设备发送的按键数据包,所述按键数据包中至少携带按键电压值及按键方向标识;The first receiving module is configured to receive a button data packet sent by the remote control device in the operation mode, and the button data packet at least carries a button voltage value and a button direction identifier;

获取模块,用于根据所述按键方向标识,从预先存储的标准电压数据库中,获取所述按键方向标识对应的目标标准电压值,所述标准电压数据库中存储有方向标识与标准电压值之间的对应关系;An acquisition module, configured to acquire a target standard voltage value corresponding to the button direction identifier from a pre-stored standard voltage database according to the button direction identifier, and the standard voltage database stores the distance between the direction identifier and the standard voltage value corresponding relationship;

计算模块,用于根据所述按键电压值与所述目标标准电压值之间的关系,采取与所述关系相应的计算方式,计算所述按键电压值对应的键值。The calculation module is used to calculate the key value corresponding to the key voltage value by adopting a calculation method corresponding to the relationship according to the relationship between the key voltage value and the target standard voltage value.

在本公开的另一个实施例中,所述装置还包括:In another embodiment of the present disclosure, the device further includes:

第二接收模块,用于在校准模式下,接收所述遥控设备发送的第一标准电压值,所述第一标准电压值为所述遥控设备上遥杆分别处于水平最左端、水平最右端、竖直最上端及竖直最下端时采集到的电压值,所述第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值;The second receiving module is configured to receive the first standard voltage value sent by the remote control device in the calibration mode, and the first standard voltage value is that the joystick on the remote control device is at the leftmost horizontal end, the rightmost horizontal end, and the remote control device respectively. The voltage values collected at the vertical uppermost end and the vertical lowermost end, the first standard voltage value includes extreme left voltage value, extreme right voltage value, extreme upper voltage value and extreme lower voltage value;

第三接收模块,用于接收所述遥控设备发送第二标准电压值,所述第二标准电压值为所述遥控设备上遥杆分别从水平最左端、水平最右端、竖直最上端及竖直最下端移动到中间位置时采集到的电压值,所述第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值;The third receiving module is used to receive the second standard voltage value sent by the remote control device. The second standard voltage value is the remote control device on the remote control device. The voltage value collected when the lowermost end moves to the middle position, the second standard voltage value includes the left middle voltage value, the right middle voltage value, the upper middle voltage value and the lower middle voltage value;

存储模块,用于根据电压值的采集方向,将所述第一标准电压值、所述第二标准电压值与方向标识之间的对应关系存储在标准电压数据库中。The storage module is configured to store the correspondence between the first standard voltage value, the second standard voltage value and the direction identifier in a standard voltage database according to the collection direction of the voltage value.

在本公开的另一个实施例中,所述方向标识包括水平方向标识和竖直方向标识;In another embodiment of the present disclosure, the direction indicator includes a horizontal direction indicator and a vertical direction indicator;

所述获取模块,用于当所述按键方向标识为水平方向标识,从所述预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,作为目标标准电压值;当所述按键方向标识为竖直方向标识,从所述预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,作为目标标准电压值。The obtaining module is configured to obtain, from the pre-stored standard voltage database, the extreme left voltage value, the extreme right voltage value, the left middle voltage value, the right The medium voltage value is used as the target standard voltage value; when the button direction mark is a vertical direction mark, from the pre-stored standard voltage database, obtain the upper pole voltage value, the lower pole voltage value, and the corresponding vertical voltage mark. The upper middle voltage value and the lower middle voltage value are used as the target standard voltage value.

在本公开的另一个实施例中,所述计算模块,用于当所述按键方向标识为水平方向标识时,判断所述按键电压值与所述左中电压值和所述右中电压值之间的关系;当所述按键电压值小于所述左中电压值,应用以下公式,计算所述按键电压值对应的键值:In another embodiment of the present disclosure, the calculation module is configured to determine the difference between the key voltage value and the left-middle voltage value and the right-middle voltage value when the key direction mark is a horizontal direction mark. The relationship between them; when the key voltage value is less than the left middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ccbb--aa==sthe s--zz22zz--00;;

当所述按键电压值大于所述右中电压值,应用以下公式,计算所述按键电压值对应的键值:When the key voltage value is greater than the right middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ddbb--aa==sthe s--zz22zz--zz22;;

当所述按键电压值大于所述左中电压值小于所述右中电压值,确定所述按键电压值对应的键值为When the key voltage value is greater than the left middle voltage value and smaller than the right middle voltage value, determine the key value corresponding to the key voltage value

其中,x为所述按键电压值,a为所述极左电压值,b为所述极右电压值,c为所述左中电压值,d为所述右中电压值,s为所述按键电压值对应的键值,z为预设键值。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, d is the voltage value of the middle right, and s is the voltage value of the extreme right. The key value corresponding to the key voltage value, z is the preset key value.

在本公开的另一个实施例中,所述计算模块,用于当所述按键方向标识为竖直方向标识时,判断所述按键电压值与所述下中电压值和所述上中电压值之间的关系;当所述按键电压值小于所述下中电压值,应用以下公式,计算所述按键电压值对应的键值:In another embodiment of the present disclosure, the calculation module is configured to determine the button voltage value and the lower middle voltage value and the upper middle voltage value when the button direction mark is a vertical direction mark The relationship between; when the key voltage value is less than the lower middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--ggff--ee==tt--zz22zz--00;;

当所述按键电压值大于所述上中电压值,应用以下公式,计算所述按键电压值对应的键值:When the key voltage value is greater than the upper middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--hhff--ee==tt--zz22zz--zz22;;

当所述按键电压值大于所述下中电压值小于所述上中电压值,确定所述按键电压值对应的键值为When the key voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, determine the key value corresponding to the key voltage value

其中,y为所述按键电压值,e为所述极下电压值,f为所述极上电压值,g为所述下中电压值,h为所述上中电压值,t为所述按键电压值对应的键值,z为预设键值。Wherein, y is the voltage value of the button, e is the voltage value of the extremely lower pole, f is the voltage value of the upper pole, g is the lower middle voltage value, h is the upper middle voltage value, and t is the upper middle voltage value. The key value corresponding to the key voltage value, z is the preset key value.

根据本公开实施例的第三方面,提供了一种遥控设备上遥杆的校准装置,处理器;According to a third aspect of an embodiment of the present disclosure, a device for calibrating a joystick on a remote control device and a processor are provided;

用于存储处理器可执行的指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

在操作模式下,接收遥控设备发送的按键数据包,所述按键数据包中至少携带按键电压值及按键方向标识;In the operation mode, receiving a button data packet sent by the remote control device, the button data packet carries at least a button voltage value and a button direction identifier;

根据所述按键方向标识,从预先存储的标准电压数据库中,获取所述按键方向标识对应的目标标准电压值,所述标准电压数据库中存储有方向标识与标准电压值之间的对应关系;According to the key direction identification, from the pre-stored standard voltage database, the target standard voltage value corresponding to the key direction identification is obtained, and the corresponding relationship between the direction identification and the standard voltage value is stored in the standard voltage database;

根据所述按键电压值与所述目标标准电压值之间的关系,采取与所述关系相应的计算方式,计算所述按键电压值对应的键值。According to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。When calibrating the joystick on the remote control device, it is not directly calculated according to the proportional relationship, but according to the relationship between the key voltage value of the remote control device and the standard voltage stored in the standard voltage database, using different calculation methods. The key value corresponding to the key voltage value is more accurate because the key value obtained in this way improves the control precision.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例示出的一种遥控设备上遥杆的校准方法的流程图。Fig. 1 is a flowchart showing a method for calibrating a joystick on a remote control device according to an exemplary embodiment.

图2是根据一示例性实施例示出的一种遥控设备上遥杆的校准方法的流程图。Fig. 2 is a flowchart showing a method for calibrating a joystick on a remote control device according to an exemplary embodiment.

图3是根据一示例性实施例示出的一种遥控设备上遥杆的校准装置示意图。Fig. 3 is a schematic diagram of a calibration device for a joystick on a remote control device according to an exemplary embodiment.

图4是根据一示例性实施例示出的一种用于遥控设备上遥杆的校准的装置的框图。Fig. 4 is a block diagram showing an apparatus for calibrating a joystick on a remote control device according to an exemplary embodiment.

具体实施方式detailed description

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

图1是根据一示例性实施例示出的一种遥控设备上遥杆的校准方法的流程图,如图1所示,遥控设备上遥杆的校准方法用于终端中,包括以下步骤。Fig. 1 is a flowchart showing a method for calibrating a joystick on a remote control device according to an exemplary embodiment. As shown in Fig. 1 , the method for calibrating a joystick on a remote control device is used in a terminal and includes the following steps.

在步骤S101中,在操作模式下,接收遥控设备发送的按键数据包,该按键数据包中至少携带按键电压值及按键方向标识。In step S101, in the operation mode, a key data packet sent by the remote control device is received, and the key data packet carries at least a key voltage value and a key direction identifier.

在步骤S102中,根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值,该标准电压数据库中存储有方向标识与标准电压值之间的对应关系。In step S102, according to the button direction identifier, a target standard voltage value corresponding to the button direction identifier is obtained from a pre-stored standard voltage database, and the standard voltage database stores the correspondence between the direction identifier and the standard voltage value.

在步骤S103中,根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值。In step S103, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value.

本公开实施例提供的方法,在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。In the method provided by the embodiments of the present disclosure, when calibrating the joystick on the remote control device, the calculation is not directly based on the proportional relationship, but based on the relationship between the key voltage value of the remote control device and the standard voltage stored in the standard voltage database. The key value corresponding to the key voltage value is calculated by using different calculation methods. Since the key value obtained by this method is more accurate, the control accuracy is improved.

在本公开的另一个实施例中,根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值之前,还包括:In another embodiment of the present disclosure, before obtaining the target standard voltage value corresponding to the button direction identifier from the pre-stored standard voltage database according to the button direction identifier, further includes:

在校准模式下,接收遥控设备发送的第一标准电压值,第一标准电压值为遥控设备上遥杆分别处于水平最左端、水平最右端、竖直最上端及竖直最下端时采集到的电压值,第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值;In the calibration mode, receive the first standard voltage value sent by the remote control device. The first standard voltage value is collected when the joystick on the remote control device is at the horizontal leftmost, horizontal rightmost, vertical top and vertical bottom respectively. Voltage value, the first standard voltage value includes extreme left voltage value, extreme right voltage value, extreme upper voltage value and extreme lower voltage value;

接收遥控设备发送第二标准电压值,第二标准电压值为遥控设备上遥杆分别从水平最左端、水平最右端、竖直最上端及竖直最下端移动到中间位置时采集到的电压值,第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值;Receive the second standard voltage value sent by the remote control device, and the second standard voltage value is the voltage value collected when the joystick on the remote control device moves from the horizontal leftmost end, the horizontal rightmost end, the vertical uppermost end and the vertical lowermost end to the middle position respectively , the second standard voltage value includes left middle voltage value, right middle voltage value, upper middle voltage value and lower middle voltage value;

根据电压值的采集方向,将第一标准电压值、第二标准电压值与方向标识之间的对应关系存储在标准电压数据库中。According to the collection direction of the voltage value, the corresponding relationship between the first standard voltage value, the second standard voltage value and the direction identifier is stored in the standard voltage database.

在本公开的另一个实施例中,方向标识包括水平方向标识和竖直方向标识;In another embodiment of the present disclosure, the direction indicator includes a horizontal direction indicator and a vertical direction indicator;

根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值,包括:According to the key direction identification, the target standard voltage value corresponding to the key direction identification is obtained from the pre-stored standard voltage database, including:

如果按键方向标识为水平方向标识,从预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,作为目标标准电压值;If the button direction mark is a horizontal direction mark, from the pre-stored standard voltage database, obtain the extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value corresponding to the horizontal mark as the target standard voltage value;

如果按键方向标识为竖直方向标识,从预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,作为目标标准电压值。If the button direction mark is a vertical direction mark, from the pre-stored standard voltage database, obtain the upper pole voltage value, the lower pole voltage value, the upper middle voltage value, and the lower middle voltage value corresponding to the vertical voltage mark as the target standard voltage value.

在本公开的另一个实施例中,根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value, including:

当按键方向标识为水平方向标识时,判断按键电压值与左中电压值和右中电压值之间的关系;When the button direction mark is a horizontal direction mark, judge the relationship between the button voltage value and the left middle voltage value and the right middle voltage value;

如果按键电压值小于左中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is less than the left middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ccbb--aa==sthe s--zz22zz--00;;

如果按键电压值大于右中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is greater than the right middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ddbb--aa==sthe s--zz22zz--zz22;;

如果按键电压值大于左中电压值小于右中电压值,确定按键电压值对应的键值为If the key voltage value is greater than the left middle voltage value and less than the right middle voltage value, determine the key value corresponding to the key voltage value

其中,x为按键电压值,a为极左电压值,b为极右电压值,c为左中电压值,d为右中电压值,s为按键电压值对应的键值,z为预设键值。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, d is the voltage value of the middle right, s is the key value corresponding to the voltage value of the button, z is the preset key value.

在本公开的另一个实施例中,根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value, including:

当按键方向标识为竖直方向标识时,判断按键电压值与下中电压值和上中电压值之间的关系;When the key direction mark is a vertical direction mark, judge the relationship between the key voltage value, the lower middle voltage value and the upper middle voltage value;

如果按键电压值小于下中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is less than the lower middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--ggff--ee==tt--zz22zz--00;;

如果按键电压值大于上中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is greater than the upper middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--hhff--ee==tt--zz22zz--zz22;;

如果按键电压值大于下中电压值小于上中电压值,确定按键电压值对应的键值为If the button voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, determine the key value corresponding to the button voltage value

其中,y为按键电压值,e为极下电压值,f为极上电压值,g为下中电压值,h为上中电压值,t为按键电压值对应的键值,z为预设键值。Among them, y is the key voltage value, e is the extreme lower voltage value, f is the upper extreme voltage value, g is the lower middle voltage value, h is the upper middle voltage value, t is the key value corresponding to the button voltage value, and z is the preset key value.

上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All the above optional technical solutions may be combined in any way to form optional embodiments of the present disclosure, which will not be repeated here.

图2是根据一示例性实施例示出的一种遥控设备上遥杆的校准方法的流程图,如图2所示,遥控设备上遥杆的校准方法用于终端中,包括以下步骤。Fig. 2 is a flow chart showing a method for calibrating a joystick on a remote control device according to an exemplary embodiment. As shown in Fig. 2 , the method for calibrating a joystick on a remote control device is used in a terminal and includes the following steps.

在步骤S201中,终端预先存储标准电压数据库。In step S201, the terminal stores a standard voltage database in advance.

其中,终端可以为游戏机、台式电脑、笔记本电脑等,本实施例不对终端的类型作具体的限定。为了满足用户的使用需求,终端中安装有多个应用,例如,音频应用、视频应用、导航应用、游戏应用等,本实施例主要针对终端中所安装的游戏应用进行说明。遥控设备作为一种常用的游戏配件,通过与终端相连,可实现对游戏应用中虚拟人物、虚拟物品等目标物进行控制。Wherein, the terminal may be a game machine, a desktop computer, a notebook computer, etc., and this embodiment does not specifically limit the type of the terminal. In order to meet user requirements, multiple applications are installed in the terminal, for example, audio applications, video applications, navigation applications, game applications, etc. This embodiment mainly describes the game applications installed in the terminal. As a commonly used game accessory, the remote control device can control objects such as virtual characters and virtual items in game applications by connecting with a terminal.

通常遥控设备上遥杆能够实现在水平方向和竖直方向上对游戏中的目标物进行控制,这样在对遥控设备上遥杆进行校准时,也应在水平方向和竖直方向上进行校准。目前市场上所销售的遥控设备在遥杆处于不同位置时,采集到的电信号不能直接被与其相连的终端识别,需要将采集到电信号转化为数字信号,也即是本实施中所述的键值。为了便于后续对遥控设备上遥杆进行校准,本实施例提供的方法,预先设定遥杆处于水平最左端时电信号的电压值对应的键值为0,处于水平最右端时电信号的电压值对应的键值为z,处于竖直最上端时电信号的电压值对应的键值为z,处于竖直最下端时电信号的电压值对应的键值为0。一般情况下,键值越大对应的电信号的电压值越大。其中,z为一个预设键值,可以为200、255、260等等,本实施例以z为255为例进行说明。Generally, the joystick on the remote control device can control the target in the game in the horizontal and vertical directions, so when calibrating the joystick on the remote control device, it should also be calibrated in the horizontal and vertical directions. When the remote control devices currently on the market are in different positions, the collected electrical signals cannot be directly recognized by the terminals connected to them. It is necessary to convert the collected electrical signals into digital signals, which is the method described in this implementation. key value. In order to facilitate the subsequent calibration of the joystick on the remote control device, the method provided in this embodiment pre-sets the key value corresponding to the voltage value of the electrical signal when the joystick is at the far left end of the level, and the voltage value of the electrical signal when it is at the far right end of the level The key value corresponding to the value is z, the key value corresponding to the voltage value of the electrical signal when it is at the uppermost vertical end, and the key value corresponding to the voltage value of the electrical signal when it is at the lowermost vertical end. Generally, a larger key value corresponds to a larger voltage value of the electrical signal. Wherein, z is a preset key value, which can be 200, 255, 260 and so on. In this embodiment, z is 255 as an example for illustration.

在本实施例中,遥控设备具有多种模式,例如,校准模式、操作模式等等。当遥控设备处于校准模式时,与其相连的终端也将处于校准模式,当遥控设备处于操作模式时,与其相连的终端也将处于操作模式。在校准模式下,遥控设备会采集遥杆处于不同位置时电信号的电压值,并将采集到的电压值发送至终端,由终端建立标准电压数据库;在操作模式下,遥控设备基于用户的触控操作采集电信号,并将采集到的电信号的电压值等发送至与其相连的终端,通过终端对遥控设备上遥杆进行校准,以实现对游戏中目标物的精确控制。In this embodiment, the remote control device has various modes, such as a calibration mode, an operation mode, and the like. When the remote control device is in the calibration mode, the terminal connected to it will also be in the calibration mode, and when the remote control device is in the operation mode, the terminal connected to it will also be in the operation mode. In the calibration mode, the remote control device will collect the voltage value of the electrical signal when the joystick is in different positions, and send the collected voltage value to the terminal, and the terminal will establish a standard voltage database; in the operation mode, the remote control device will The remote control operation collects electrical signals, and sends the voltage value of the collected electrical signals to the terminal connected to it, and calibrates the joystick on the remote control device through the terminal to achieve precise control of the target in the game.

在校准模式下,遥控设备采集遥杆处于水平方向和竖直方向上临界位置上的第一标准电压值,并将采集到的第一标准电压值发送至终端。其中,当遥控设备上遥杆处于水平最左端时,遥控设备采集到的电压值称为极左电压值,记为left_min;当遥控设备上遥杆处于水平最右端时,遥控设备采集到的电压值称为极右电压值,记为right_max;当遥控设备上遥杆处于竖直最上端时,遥控设备采集到的电压值称为极上电压值,记为up_max;当遥控设备上遥杆处于竖直最下端时,遥控设备采集到的电压值称为极下电压值,记为down_min,因此,第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值。In the calibration mode, the remote control device collects the first standard voltage value when the joystick is at critical positions in the horizontal direction and the vertical direction, and sends the collected first standard voltage value to the terminal. Among them, when the joystick on the remote control device is at the leftmost end of the level, the voltage value collected by the remote control device is called the extreme left voltage value, which is recorded as left_min; when the remote control device is at the far right end of the level, the voltage collected by the remote control device is The value is called the extreme right voltage value, denoted as right_max; when the joystick on the remote control device is at the vertical uppermost end, the voltage value collected by the remote control device is called the extreme upper voltage value, denoted as up_max; when the joystick on the remote control device is at When the vertical bottom end is reached, the voltage value collected by the remote control device is called the extremely low voltage value, which is recorded as down_min. Therefore, the first standard voltage value includes the extreme left voltage value, the extreme right voltage value, the extreme upper voltage value and the extreme lower voltage value.

由于遥控设备上ADC电性问题,遥控设备上遥杆从水平最左端移动到中间位置时采集到的电压值,与遥控设备上遥杆从水平最右端移动到中间位置时采集到的电压值是不同的,且遥控设备上遥杆从竖直最上端移动到中间位置时采集到的电压值,与遥控设备上遥杆从竖直最下端移动到中间位置时采集到的电压值也是不同的,因此,在校准模式下,需要分别记录遥控设备上遥杆从不同位置移动到中间位置上的第二标准电压值。其中,当遥控设备上遥杆从水平最左端移动到中间位置时采集到的电压值称为左中电压值,记为left_mid;当遥控设备上遥杆从水平最右端移动到中间位置时采集到的电压值称为右中电压值,记为right_mid;当遥控设备上遥杆从竖直最上端移动到中间位置时采集到的电压值称为上中电压值,记为up_mid;当遥控设备上遥杆从竖直最下端移动到中间位置时采集到的电压值称为下中电压值,记为down_mid,因此,第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值。当采集到第二标准电压值,遥控设备将第二标准电压值发送至终端。Due to the electrical problem of the ADC on the remote control device, the voltage value collected when the remote stick on the remote control device moves from the horizontal leftmost end to the middle position is the same as the voltage value collected when the remote control device moves the remote stick from the horizontal rightmost end to the middle position. Different, and the voltage value collected when the joystick on the remote control device moves from the vertical uppermost end to the middle position is also different from the voltage value collected when the remote stick on the remote control device moves from the vertical bottom end to the middle position, Therefore, in the calibration mode, it is necessary to record the second standard voltage value when the joystick on the remote control device moves from different positions to the middle position. Among them, the voltage value collected when the joystick on the remote control device moves from the horizontal leftmost end to the middle position is called the left middle voltage value, which is recorded as left_mid; when the remote control device moves the joystick from the horizontal rightmost end to the middle position The voltage value is called the right middle voltage value, which is recorded as right_mid; the voltage value collected when the joystick on the remote control device moves from the vertical uppermost end to the middle position is called the upper middle voltage value, which is recorded as up_mid; when the remote control device is on The voltage value collected when the joystick moves from the vertical bottom end to the middle position is called the lower middle voltage value, which is recorded as down_mid. Therefore, the second standard voltage value includes the left middle voltage value, the right middle voltage value, and the upper middle voltage value And the lower and middle voltage values. When the second standard voltage value is collected, the remote control device sends the second standard voltage value to the terminal.

基于接收到的第一标准电压值和第二标准电压值,终端根据电压值的采集方向,建立第一标准电压值、第二标准电压值与方向标识之间的对应关系的标准电压数据库,并将标准电压数据库存储在终端闪存或其他器件中。在本实施例中,方向标识包括水平标识和竖直标识,因此,标准电压数据库中存储有水平标识与极左电压值、极右电压值、左中电压值、右中电压值之间的对应关系,竖直标识与极上电压值、极下电压值、上中电压值、下中电压值之间的对应关系。Based on the received first standard voltage value and second standard voltage value, the terminal establishes a standard voltage database corresponding to the first standard voltage value, the second standard voltage value, and the direction identifier according to the collection direction of the voltage value, and Store the standard voltage database in terminal flash memory or other device. In this embodiment, the direction mark includes a horizontal mark and a vertical mark. Therefore, the standard voltage database stores the correspondence between the horizontal mark and the extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value. Relationship, the correspondence between the vertical mark and the upper voltage value, the lower voltage value, the upper middle voltage value, and the lower middle voltage value.

在步骤S202中,在操作模式下,终端接收遥控设备发送的按键数据包,该按键数据包中至少携带按键电压值及按键方向标识。In step S202, in the operation mode, the terminal receives a key data packet sent by the remote control device, and the key data packet carries at least a key voltage value and a key direction identifier.

在操作模式下,当遥控设备检测到用户对遥杆的按键操作时,遥控设备获取按键操作的按键电压值及按键方向标识,并将获取到的按键电压值及按键方向标识打包,得到按键数据包,并将按键数据包通过数据线发送至与其相连的终端。In the operation mode, when the remote control device detects the user’s key operation on the joystick, the remote control device obtains the key voltage value and key direction identification of the key operation, and packs the obtained key voltage value and key direction identification to obtain the key data packet, and send the keystroke data packet to the terminal connected to it through the data line.

在步骤S203中,终端根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值。In step S203, the terminal acquires the target standard voltage value corresponding to the key direction identification from the pre-stored standard voltage database according to the key direction identification.

当接收到按键数据包,终端从按键数据包中获取到按键方向标识,并根据该按键方向标识,从预先存储的标准电压数据库中,获取到按键方向标识对应的目标标准电压值。如果按键方向标识为水平方向标识,终端可从预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,并将获取到的极左电压值、极右电压值、左中电压值、右中电压值作为目标标准电压值;如果按键方向标识为竖直方向标识,终端可从预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,并将获取到的极上电压值、极下电压值、上中电压值、下中电压值作为目标标准电压值。When receiving the key data packet, the terminal obtains the key direction identification from the key data packet, and according to the key direction identification, obtains the target standard voltage value corresponding to the key direction identification from the pre-stored standard voltage database. If the direction of the button is marked as the horizontal direction mark, the terminal can obtain the extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value corresponding to the horizontal mark from the pre-stored standard voltage database, and the obtained The extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value are used as the target standard voltage values; if the button direction is marked as the vertical direction mark, the terminal can obtain the vertical voltage from the pre-stored standard voltage database Identify the corresponding upper-pole voltage value, lower-pole voltage value, upper-middle voltage value, and lower-middle voltage value, and use the obtained upper-pole voltage value, lower-pole voltage value, upper-middle voltage value, and lower-middle voltage value as the target standard Voltage value.

在步骤S204中,终端根据按键电压值与目标标准电压值之间的关系,采取与该关系相应的计算方式,计算按键电压值对应的键值。In step S204, according to the relationship between the key voltage value and the target standard voltage value, the terminal adopts a calculation method corresponding to the relationship to calculate the key value corresponding to the key voltage value.

第一种情况、当接收到的按键数据包中携带的按键方向标识为水平方向标识时,说明用户希望通过遥控设备上遥杆在水平方向上进行控制,此时终端在计算按键电压值对应的键值时,可采用如下步骤(1)~(4):In the first case, when the button direction identifier carried in the received button data packet is a horizontal direction identifier, it means that the user wants to control the button in the horizontal direction through the joystick on the remote control device. At this time, the terminal is calculating the corresponding button voltage value. For key values, the following steps (1) to (4) can be used:

(1)、终端判断按键电压值与左中电压值和右中电压值之间的关系。(1) The terminal judges the relationship between the voltage value of the button and the left middle voltage value and the right middle voltage value.

随着遥控设备的使用,遥控设备遥杆中间位置上的电压值对应的键值不再是255/2,且遥杆从最左端移动到中间位置上的电压值与从最右端移动到中间位置上的电压值并不相等,当获取到按键电压值后,终端根据按键电压值与左中电压值和右中电压值之间的关系,可确定用户希望控制游戏中的目标物向左或向右移动。在实际判断时,可将获取到的按键电压值分别与左中电压值和右中电压值分别进行比较。With the use of the remote control device, the key value corresponding to the voltage value at the middle position of the remote control device’s joystick is no longer 255/2, and the voltage value of the joystick moving from the leftmost end to the middle position is the same as that from the rightmost end to the middle position The voltage values above are not equal. After obtaining the button voltage value, the terminal can determine that the user wants to control the target object in the game to move left or Move right. In actual judgment, the obtained key voltage value can be compared with the left middle voltage value and the right middle voltage value respectively.

(2)、如果按键电压值小于左中电压值,终端应用以下公式一,计算按键电压值对应的键值。(2) If the key voltage value is less than the left middle voltage value, the terminal applies the following formula 1 to calculate the key value corresponding to the key voltage value.

当判断出按键电压值小于左中电压值,说明用户希望控制游戏中的目标物向左移动,为了能够根据该按键电压值对游戏中的目标物进行精确控制,终端需要根据公式一,计算出该按键电压值对应的键值。When it is judged that the button voltage value is less than the left middle voltage value, it means that the user wants to control the object in the game to move to the left. In order to accurately control the object in the game according to the button voltage value, the terminal needs to calculate the The key value corresponding to the key voltage value.

其中,x为按键电压值,a为极左电压值,b为极右电压值,c为左中电压值,s为按键电压值对应的键值,z为预设键值。在本实施例中,z为255。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, s is the key value corresponding to the voltage value of the key, and z is the preset key value. In this example, z is 255.

例如,标准电压数据库中存储的极左电压值为10mv(毫伏),极右电压值为50mv,左中电压值为25mv,右中电压值为35mv,如果按键电压值为15mv,由于按键电压值15mv小于左中电压值为25mv,终端可根据公式一计算按键电压值对应的键值,具体计算时,终端将极左电压值为10mv,极右电压值为50mv,左中电压值为25mv,右中电压值为35mv,按键电压值为15mv代入到公式一中,得到即按键电压值对应的键值为63.75。For example, the extreme left voltage value stored in the standard voltage database is 10mv (millivolts), the extreme right voltage value is 50mv, the left middle voltage value is 25mv, and the right middle voltage value is 35mv. If the button voltage value is 15mv, due to the button voltage The value of 15mv is less than the left middle voltage value of 25mv. The terminal can calculate the key value corresponding to the button voltage value according to formula 1. In the specific calculation, the terminal will use the extreme left voltage value as 10mv, the extreme right voltage value as 50mv, and the left middle voltage value as 25mv , the right middle voltage value is 35mv, and the button voltage value is 15mv, which is substituted into the formula 1 to get That is, the key value corresponding to the key voltage value is 63.75.

(3)、如果按键电压值大于右中电压值,终端应用以下公式二,计算按键电压值对应的键值。(3) If the key voltage value is greater than the right middle voltage value, the terminal applies the following formula 2 to calculate the key value corresponding to the key voltage value.

当判断出按键电压值大于右中电压值,说明希望控制游戏中的目标物向右移动,为了能够根据该按键电压值对游戏中的目标物进行精确控制,终端需要根据公式二,计算出该按键电压值对应的键值。When it is judged that the voltage value of the key is greater than the voltage value in the middle right, it means that it wants to control the object in the game to move to the right. In order to accurately control the object in the game according to the voltage value of the key, the terminal needs to calculate the The key value corresponding to the key voltage value.

其中,x为按键电压值,a为极左电压值,b为极右电压值,d为右中电压值,s为按键电压值对应的键值,z为预设键值。在本实施例中,z为255。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, d is the voltage value of the middle right, s is the key value corresponding to the voltage value of the key, and z is the preset key value. In this example, z is 255.

例如,标准电压数据库中存储的极左电压值为10mv,极右电压值为50mv,左中电压值为25mv,右中电压值为35mv,如果按键电压值为40mv,由于按键电压值40mv大于右中电压值为35mv,终端可根据公式二计算按键电压值对应的键值,具体计算时,终端将极左电压值为10mv,极右电压值为50mv,左中电压值为25mv,右中电压值为35mv,按键电压值为40mv代入到公式二中,得到即按键电压值对应的键值为191.25。For example, the extreme left voltage value stored in the standard voltage database is 10mv, the extreme right voltage value is 50mv, the left middle voltage value is 25mv, and the right middle voltage value is 35mv. The middle voltage value is 35mv, and the terminal can calculate the key value corresponding to the button voltage value according to formula 2. When calculating specifically, the terminal will use the extreme left voltage value as 10mv, the extreme right voltage value as 50mv, the left middle voltage value as 25mv, and the right middle voltage value The value is 35mv, and the button voltage value is 40mv, which is substituted into the formula 2 to get That is, the key value corresponding to the key voltage value is 191.25.

(4)、如果按键电压值大于左中电压值小于右中电压值,终端确定按键电压值对应的键值为也即是(4) If the key voltage value is greater than the left middle voltage value and less than the right middle voltage value, the terminal determines the key value corresponding to the key voltage value that is

当判断出按键电压值介于左中电压值与右中电压值之间,说明用户希望控制游戏中的目标物维持当前的运动状态,此时可直接确定按键电压值对应的键值为When it is judged that the key voltage value is between the left middle voltage value and the right middle voltage value, it means that the user wants to control the target object in the game to maintain the current motion state. At this time, the key value corresponding to the key voltage value can be directly determined.

例如,标准电压数据库中存储的极左电压值为10mv,极右电压值为50mv,左中电压值为25mv,右中电压值为35mv,如果按键电压值为32mv,由于按键电压值32mv大于左中电压值为25mv小于右中电压值35mv,因此,终端可直接确定按键电压值对应的键值为For example, the extreme left voltage value stored in the standard voltage database is 10mv, the extreme right voltage value is 50mv, the left middle voltage value is 25mv, and the right middle voltage value is 35mv. The middle voltage value of 25mv is less than the right middle voltage value of 35mv, therefore, the terminal can directly determine the key value corresponding to the key voltage value

第二种情况、当接收到的按键数据包中携带的按键方向标识为竖直方向标识时,说明用户希望通过遥控设备上遥杆在竖直方向上进行控制,此时终端在计算按键电压值对应的键值时,可采用如下步骤(a)~(d):In the second case, when the key direction identification carried in the received key data packet is a vertical direction identification, it means that the user wants to control in the vertical direction through the joystick on the remote control device. At this time, the terminal is calculating the key voltage value For the corresponding key value, the following steps (a) to (d) can be used:

(a)、终端判断按键电压值与下中电压值和上中电压值之间的关系。(a) The terminal judges the relationship between the key voltage value and the lower middle voltage value and the upper middle voltage value.

随着遥控设备的使用,遥控设备遥杆中间位置上的电压值对应的键值不再是255/2,且遥杆从最上端移动到中间位置上的电压值与从最下端移动到中间位置上的电压值并不相等,当获取到按键电压值后,终端根据按键电压值与上中电压值和下中电压值之间的关系,可确定用户希望控制游戏中的目标物向上或向下移动。在实际判断时,可将获取到的按键电压值分别与上中电压值和下中电压值分别进行比较。With the use of the remote control device, the key value corresponding to the voltage value at the middle position of the remote control device’s joystick is no longer 255/2, and the voltage value of the joystick moving from the uppermost end to the middle position is the same as the voltage value when the joystick moves from the bottom end to the middle position The upper and lower voltage values are not equal. After obtaining the button voltage value, the terminal can determine whether the user wants to control the target object in the game to go up or down according to the relationship between the button voltage value, the upper middle voltage value and the lower middle voltage value. move. In actual judgment, the obtained key voltage value can be compared with the upper middle voltage value and the lower middle voltage value respectively.

(b)、如果按键电压值小于下中电压值,终端应用以下公式三,计算按键电压值对应的键值。(b) If the key voltage value is less than the lower middle voltage value, the terminal applies the following formula 3 to calculate the key value corresponding to the key voltage value.

当判断出按键电压值小于下中电压值,说明用户希望控制游戏中的目标物向下移动,为了能够根据该按键电压值对游戏中的目标物进行精确控制,终端需要根据公式三,计算出该按键电压值对应的键值。When it is judged that the key voltage value is less than the lower middle voltage value, it means that the user wants to control the target object in the game to move downward. In order to accurately control the target object in the game according to the key voltage value, the terminal needs to calculate the The key value corresponding to the key voltage value.

其中,y为按键电压值,e为极下电压值,f为极上电压值,g为下中电压值,t为按键电压值对应的键值,z为预设键值。在本实施例中,z为255。Among them, y is the key voltage value, e is the extreme lower voltage value, f is the upper extreme voltage value, g is the lower middle voltage value, t is the key value corresponding to the key voltage value, and z is the preset key value. In this example, z is 255.

例如,标准电压数据库中存储的极上电压值为60mv,极下电压值为20mv,下中电压值为35mv,上中电压值为45mv,如果按键电压值为20mv,由于按键电压值20mv小于下中电压值为35mv,终端可根据公式三计算按键电压值对应的键值,具体计算时,终端极上电压值为60mv,极下电压值为20mv,下中电压值为35mv,上中电压值为45mv,按键电压值为20mv代入到公式三中,得到即按键电压值对应的键值为31.875。For example, the upper pole voltage value stored in the standard voltage database is 60mv, the lower pole voltage value is 20mv, the lower middle voltage value is 35mv, and the upper middle voltage value is 45mv. The middle voltage value is 35mv, and the terminal can calculate the key value corresponding to the button voltage value according to formula 3. In the specific calculation, the upper voltage value of the terminal is 60mv, the lower voltage value is 20mv, the lower middle voltage value is 35mv, and the upper middle voltage value is 35mv. is 45mv, and the button voltage value is 20mv, which is substituted into the formula 3 to get That is, the key value corresponding to the key voltage value is 31.875.

(c)、如果按键电压值大于上中电压值,终端应用以下公式四,计算按键电压值对应的键值。(c) If the key voltage value is greater than the upper middle voltage value, the terminal applies the following formula 4 to calculate the key value corresponding to the key voltage value.

当判断出按键电压值大于上中电压值,说明希望控制游戏中的目标物向上移动,为了能够根据该按键电压值对游戏中的目标物进行精确控制,终端需要根据公式四,计算出该按键电压值对应的键值。When it is judged that the button voltage value is greater than the upper middle voltage value, it means that the target object in the game is expected to move upward. In order to accurately control the object object in the game according to the button voltage value, the terminal needs to calculate the button according to formula 4. The key value corresponding to the voltage value.

其中,y为按键电压值,e为极下电压值,f为极上电压值,h为上中电压值,t为按键电压值对应的键值,z为预设键值。在本实施例中,z为255。Among them, y is the key voltage value, e is the extreme lower voltage value, f is the upper extreme voltage value, h is the upper middle voltage value, t is the key value corresponding to the key voltage value, and z is the preset key value. In this example, z is 255.

例如,标准电压数据库中存储的极上电压值为60mv,极下电压值为20mv,下中电压值为35mv,上中电压值为45mv,如果按键电压值为50mv,由于按键电压值20mv小于下中电压值为35mv,终端可根据公式三计算按键电压值对应的键值,具体计算时,终端极上电压值为60mv,极下电压值为20mv,下中电压值为35mv,上中电压值为45mv,按键电压值为50mv代入到公式四中,得到即按键电压值对应的键值为143.44。For example, the upper pole voltage value stored in the standard voltage database is 60mv, the lower pole voltage value is 20mv, the lower middle voltage value is 35mv, and the upper middle voltage value is 45mv. The middle voltage value is 35mv, and the terminal can calculate the key value corresponding to the button voltage value according to formula 3. In the specific calculation, the upper voltage value of the terminal is 60mv, the lower voltage value is 20mv, the lower middle voltage value is 35mv, and the upper middle voltage value is 35mv. is 45mv, and the button voltage value is 50mv substituted into the formula 4 to get That is, the key value corresponding to the key voltage value is 143.44.

(d)、如果按键电压值大于下中电压值小于上中电压值,终端确定按键电压值对应的键值为也即是(d) If the button voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, the terminal determines the key value corresponding to the button voltage value that is

当判断出按键电压值介于上中电压值与下中电压值之间,说明用户希望控制游戏中的目标物维持当前的运动状态,此时可直接确定按键电压值对应的键值为When it is judged that the button voltage value is between the upper-middle voltage value and the lower-middle voltage value, it means that the user wants to control the target in the game to maintain the current motion state. At this time, the key value corresponding to the button voltage value can be directly determined.

例如,标准电压数据库中存储的极上电压值为60mv,极下电压值为20mv,下中电压值为35mv,上中电压值为45mv,如果按键电压值为40mv,由于按键电压值40mv大于下中电压值为35mv小于上中电压值为45mv,因此,终端可直接确定按键电压值对应的键值为For example, the upper pole voltage value stored in the standard voltage database is 60mv, the lower pole voltage value is 20mv, the lower middle voltage value is 35mv, and the upper middle voltage value is 45mv. The middle voltage value is 35mv less than the upper middle voltage value of 45mv, therefore, the terminal can directly determine the key value corresponding to the button voltage value

当采用上述方法对遥控设备上遥杆进行较准之后,终端将根据得到的校准结果也即是键值,对游戏中的目标物进行控制。After the joystick on the remote control device is calibrated by the above method, the terminal will control the target object in the game according to the obtained calibration result, that is, the key value.

本公开实施例提供的方法,在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。In the method provided by the embodiments of the present disclosure, when calibrating the joystick on the remote control device, the calculation is not directly based on the proportional relationship, but based on the relationship between the key voltage value of the remote control device and the standard voltage stored in the standard voltage database. The key value corresponding to the key voltage value is calculated by using different calculation methods. Since the key value obtained by this method is more accurate, the control accuracy is improved.

图3是根据一示例性实施例示出的一种遥控设备上遥杆的校准装置示意图。参照图3,该装置包括:第一接收模块301、获取模块302及计算模块303。Fig. 3 is a schematic diagram of a calibration device for a joystick on a remote control device according to an exemplary embodiment. Referring to FIG. 3 , the device includes: a first receiving module 301 , an acquiring module 302 and a computing module 303 .

该第一接收模块301被配置为在操作模式下,接收遥控设备发送的按键数据包,按键数据包中至少携带按键电压值及按键方向标识;The first receiving module 301 is configured to receive a key data packet sent by the remote control device in the operation mode, and the key data packet carries at least a key voltage value and a key direction identification;

该获取模块302被配置为根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值,标准电压数据库中存储有方向标识与标准电压值之间的对应关系;The acquisition module 302 is configured to acquire the target standard voltage value corresponding to the direction identification of the key from the pre-stored standard voltage database according to the direction identification of the key, and the corresponding relationship between the direction identification and the standard voltage value is stored in the standard voltage database;

该计算模块303被配置为根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值。The calculation module 303 is configured to calculate the key value corresponding to the key voltage value by adopting a calculation method corresponding to the relationship according to the relationship between the key voltage value and the target standard voltage value.

在本公开的另一个实施例中,该装置还包括:第二接收模块、第三接收模块和存储模块。In another embodiment of the present disclosure, the device further includes: a second receiving module, a third receiving module and a storage module.

该第二接收模块被配置为在校准模式下,接收遥控设备发送的第一标准电压值,第一标准电压值为遥控设备上遥杆分别处于水平最左端、水平最右端、竖直最上端及竖直最下端时采集到的电压值,第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值;The second receiving module is configured to receive the first standard voltage value sent by the remote control device in the calibration mode. The first standard voltage value is that the joy stick on the remote control device is at the leftmost end horizontally, the rightmost horizontal end, the uppermost vertical end and The voltage value collected when the vertical bottom end is reached, the first standard voltage value includes the extreme left voltage value, the extreme right voltage value, the extreme upper voltage value and the extreme lower voltage value;

该第三接收模块被配置为接收遥控设备发送第二标准电压值,第二标准电压值为遥控设备上遥杆分别从水平最左端、水平最右端、竖直最上端及竖直最下端移动到中间位置时采集到的电压值,第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值;The third receiving module is configured to receive the second standard voltage value sent by the remote control device. The second standard voltage value is the remote control device. The voltage value collected at the middle position, the second standard voltage value includes left middle voltage value, right middle voltage value, upper middle voltage value and lower middle voltage value;

该存储模块被配置为根据电压值的采集方向,将第一标准电压值、第二标准电压值与方向标识之间的对应关系存储在标准电压数据库中。The storage module is configured to store the corresponding relationship between the first standard voltage value, the second standard voltage value and the direction identifier in the standard voltage database according to the collection direction of the voltage value.

在本公开的另一个实施例中,方向标识包括水平方向标识和竖直方向标识;In another embodiment of the present disclosure, the direction indicator includes a horizontal direction indicator and a vertical direction indicator;

该获取模块302被配置为当按键方向标识为水平方向标识,从预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,作为目标标准电压值;当按键方向标识为竖直方向标识,从预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,作为目标标准电压值。The obtaining module 302 is configured to obtain the extreme left voltage value, the extreme right voltage value, the middle left voltage value, and the middle right voltage value corresponding to the horizontal mark from the pre-stored standard voltage database when the key direction mark is a horizontal direction mark, As the target standard voltage value; when the button direction mark is a vertical direction mark, from the pre-stored standard voltage database, obtain the upper pole voltage value, the lower pole voltage value, the upper middle voltage value, and the lower middle voltage corresponding to the vertical voltage mark value, as the target standard voltage value.

在本公开的另一个实施例中,该计算模块303被配置为当按键方向标识为水平方向标识时,判断按键电压值与左中电压值和右中电压值之间的关系;当按键电压值小于左中电压值,应用以下公式,计算按键电压值对应的键值:In another embodiment of the present disclosure, the calculation module 303 is configured to determine the relationship between the key voltage value and the left middle voltage value and the right middle voltage value when the key direction is marked as the horizontal direction; If it is less than the left middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ccbb--aa==sthe s--zz22zz--00;;

当按键电压值大于右中电压值,应用以下公式,计算按键电压值对应的键值:When the key voltage value is greater than the right middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ddbb--aa==sthe s--zz22zz--zz22;;

当按键电压值大于左中电压值小于右中电压值,确定按键电压值对应的键值为When the key voltage value is greater than the left middle voltage value and less than the right middle voltage value, determine the key value corresponding to the key voltage value

其中,x为按键电压值,a为极左电压值,b为极右电压值,c为左中电压值,d为右中电压值,s为按键电压值对应的键值,z为预设键值。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, d is the voltage value of the middle right, s is the key value corresponding to the voltage value of the button, z is the preset key value.

在本公开的另一个实施例中,该计算模块303被配置为当按键方向标识为竖直方向标识时,判断按键电压值与下中电压值和上中电压值之间的关系;当按键电压值小于下中电压值,应用以下公式,计算按键电压值对应的键值:In another embodiment of the present disclosure, the calculation module 303 is configured to judge the relationship between the key voltage value, the lower middle voltage value and the upper middle voltage value when the button direction mark is a vertical direction mark; value is less than the lower middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--ggff--ee==tt--zz22zz--00;;

当按键电压值大于上中电压值,应用以下公式,计算按键电压值对应的键值:When the key voltage value is greater than the upper middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--hhff--ee==tt--zz22zz--zz22;;

当按键电压值大于下中电压值小于上中电压值,确定按键电压值对应的键值为When the button voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, determine the key value corresponding to the button voltage value

其中,y为按键电压值,e为极下电压值,f为极上电压值,g为下中电压值,h为上中电压值,t为按键电压值对应的键值,z为预设键值。Among them, y is the key voltage value, e is the extreme lower voltage value, f is the upper extreme voltage value, g is the lower middle voltage value, h is the upper middle voltage value, t is the key value corresponding to the button voltage value, and z is the preset key value.

本公开的实施例提供的装置,在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。The device provided by the embodiments of the present disclosure, when calibrating the joystick on the remote control device, does not directly calculate according to the proportional relationship, but according to the difference between the key voltage value of the remote control device and the standard voltage stored in the standard voltage database. Different calculation methods are used to calculate the key value corresponding to the key voltage value. Since the key value obtained by this method is more accurate, the control accuracy is improved.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图4是根据一示例性实施例示出的一种用于遥控设备上遥杆的校准的装置400的框图。例如,装置400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 4 is a block diagram of an apparatus 400 for calibrating a joystick on a remote control device according to an exemplary embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图4,装置400可以包括以下一个或多个组件:处理组件402,存储器404,电源组件406,多媒体组件408,音频组件410,输入/输出(I/O)接口412,传感器组件414,以及通信组件416。4, apparatus 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input/output (I/O) interface 412, sensor component 414, and communication component 416 .

处理组件402通常控制装置400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件402可以包括一个或多个处理器420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件402可以包括一个或多个模块,便于处理组件402和其他组件之间的交互。例如,处理组件402可以包括多媒体模块,以方便多媒体组件408和处理组件402之间的交互。The processing component 402 generally controls the overall operations of the device 400, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 402 may include one or more modules that facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402 .

存储器404被配置为存储各种类型的数据以支持在装置400的操作。这些数据的示例包括用于在装置400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 404 is configured to store various types of data to support operations at the device 400 . Examples of such data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件406为装置400的各种组件提供电力。电源组件406可以包括电源管理系统,一个或多个电源,及其他与为装置400生成、管理和分配电力相关联的组件。The power supply component 406 provides power to various components of the device 400 . Power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 400 .

多媒体组件408包括在所述装置400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件408包括一个前置摄像头和/或后置摄像头。当装置400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. When the device 400 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件410被配置为输出和/或输入音频信号。例如,音频组件410包括一个麦克风(MIC),当装置400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件416发送。在一些实施例中,音频组件410还包括一个扬声器,用于输出音频信号。The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a microphone (MIC), which is configured to receive external audio signals when the device 400 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 404 or sent via communication component 416 . In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

I/O接口412为处理组件402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 412 provides an interface between the processing component 402 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件414包括一个或多个传感器,用于为装置400提供各个方面的状态评估。例如,传感器组件414可以检测到装置400的打开/关闭状态,组件的相对定位,例如所述组件为装置400的显示器和小键盘,传感器组件414还可以检测装置400或装置400一个组件的位置改变,用户与装置400接触的存在或不存在,装置400方位或加速/减速和装置400的温度变化。传感器组件414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 414 includes one or more sensors for providing status assessments of various aspects of device 400 . For example, the sensor component 414 can detect the open/closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, and the sensor component 414 can also detect a change in the position of the device 400 or a component of the device 400 , the presence or absence of user contact with the device 400 , the device 400 orientation or acceleration/deceleration and the temperature change of the device 400 . The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件416被配置为便于装置400和其他设备之间有线或无线方式的通信。装置400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件416还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The device 400 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 400 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器404,上述指令可由装置400的处理器420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 404 including instructions, which can be executed by the processor 420 of the device 400 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种遥控设备上遥杆的校准方法,所述方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can execute a method for calibrating a joystick on a remote control device, the method comprising:

在操作模式下,接收遥控设备发送的按键数据包,按键数据包中至少携带按键电压值及按键方向标识;In the operation mode, the key data packet sent by the remote control device is received, and the key data packet carries at least the key voltage value and the key direction identification;

根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值,标准电压数据库中存储有方向标识与标准电压值之间的对应关系;According to the direction identification of the key, the target standard voltage value corresponding to the direction identification of the key is obtained from the pre-stored standard voltage database, and the corresponding relationship between the direction identification and the standard voltage value is stored in the standard voltage database;

根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值。According to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value.

在本公开的另一个实施例中,根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值之前,还包括:In another embodiment of the present disclosure, before obtaining the target standard voltage value corresponding to the button direction identifier from the pre-stored standard voltage database according to the button direction identifier, further includes:

在校准模式下,接收遥控设备发送的第一标准电压值,第一标准电压值为遥控设备上遥杆分别处于水平最左端、水平最右端、竖直最上端及竖直最下端时采集到的电压值,第一标准电压值包括极左电压值、极右电压值、极上电压值及极下电压值;In the calibration mode, receive the first standard voltage value sent by the remote control device. The first standard voltage value is collected when the joystick on the remote control device is at the horizontal leftmost, horizontal rightmost, vertical top and vertical bottom respectively. Voltage value, the first standard voltage value includes extreme left voltage value, extreme right voltage value, extreme upper voltage value and extreme lower voltage value;

接收遥控设备发送第二标准电压值,第二标准电压值为遥控设备上遥杆分别从水平最左端、水平最右端、竖直最上端及竖直最下端移动到中间位置时采集到的电压值,第二标准电压值包括左中电压值、右中电压值、上中电压值及下中电压值;Receive the second standard voltage value sent by the remote control device, and the second standard voltage value is the voltage value collected when the joystick on the remote control device moves from the horizontal leftmost end, the horizontal rightmost end, the vertical uppermost end and the vertical lowermost end to the middle position respectively , the second standard voltage value includes left middle voltage value, right middle voltage value, upper middle voltage value and lower middle voltage value;

根据电压值的采集方向,将第一标准电压值、第二标准电压值与方向标识之间的对应关系存储在标准电压数据库中。According to the collection direction of the voltage value, the corresponding relationship between the first standard voltage value, the second standard voltage value and the direction identifier is stored in the standard voltage database.

在本公开的另一个实施例中,方向标识包括水平方向标识和竖直方向标识;In another embodiment of the present disclosure, the direction indicator includes a horizontal direction indicator and a vertical direction indicator;

根据按键方向标识,从预先存储的标准电压数据库中,获取按键方向标识对应的目标标准电压值,包括:According to the key direction identification, the target standard voltage value corresponding to the key direction identification is obtained from the pre-stored standard voltage database, including:

如果按键方向标识为水平方向标识,从预先存储的标准电压数据库中,获取水平标识对应的极左电压值、极右电压值、左中电压值、右中电压值,作为目标标准电压值;If the button direction mark is a horizontal direction mark, from the pre-stored standard voltage database, obtain the extreme left voltage value, the extreme right voltage value, the left middle voltage value, and the right middle voltage value corresponding to the horizontal mark as the target standard voltage value;

如果按键方向标识为竖直方向标识,从预先存储的标准电压数据库中,获取竖直电压标识对应的极上电压值、极下电压值、上中电压值、下中电压值,作为目标标准电压值。If the button direction mark is a vertical direction mark, from the pre-stored standard voltage database, obtain the upper pole voltage value, the lower pole voltage value, the upper middle voltage value, and the lower middle voltage value corresponding to the vertical voltage mark as the target standard voltage value.

在本公开的另一个实施例中,根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value, including:

当按键方向标识为水平方向标识时,判断按键电压值与左中电压值和右中电压值之间的关系;When the button direction mark is a horizontal direction mark, judge the relationship between the button voltage value and the left middle voltage value and the right middle voltage value;

如果按键电压值小于左中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is less than the left middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ccbb--aa==sthe s--zz22zz--00;;

如果按键电压值大于右中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is greater than the right middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

xx--ddbb--aa==sthe s--zz22zz--zz22;;

如果按键电压值大于左中电压值小于右中电压值,确定按键电压值对应的键值为If the key voltage value is greater than the left middle voltage value and less than the right middle voltage value, determine the key value corresponding to the key voltage value

其中,x为按键电压值,a为极左电压值,b为极右电压值,c为左中电压值,d为右中电压值,s为按键电压值对应的键值,z为预设键值。Among them, x is the voltage value of the button, a is the voltage value of the extreme left, b is the voltage value of the extreme right, c is the voltage value of the middle left, d is the voltage value of the middle right, s is the key value corresponding to the voltage value of the button, z is the preset key value.

在本公开的另一个实施例中,根据按键电压值与目标标准电压值之间的关系,采取与关系相应的计算方式,计算按键电压值对应的键值,包括:In another embodiment of the present disclosure, according to the relationship between the key voltage value and the target standard voltage value, a calculation method corresponding to the relationship is adopted to calculate the key value corresponding to the key voltage value, including:

当按键方向标识为竖直方向标识时,判断按键电压值与下中电压值和上中电压值之间的关系;When the key direction mark is a vertical direction mark, judge the relationship between the key voltage value, the lower middle voltage value and the upper middle voltage value;

如果按键电压值小于下中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is less than the lower middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--ggff--ee==tt--zz22zz--00;;

如果按键电压值大于上中电压值,应用以下公式,计算按键电压值对应的键值:If the key voltage value is greater than the upper middle voltage value, apply the following formula to calculate the key value corresponding to the key voltage value:

ythe y--hhff--ee==tt--zz22zz--zz22;;

如果按键电压值大于下中电压值小于上中电压值,确定按键电压值对应的键值为If the button voltage value is greater than the lower middle voltage value and smaller than the upper middle voltage value, determine the key value corresponding to the button voltage value

其中,y为按键电压值,e为极下电压值,f为极上电压值,g为下中电压值,h为上中电压值,t为按键电压值对应的键值,z为预设键值。Among them, y is the key voltage value, e is the extreme lower voltage value, f is the upper extreme voltage value, g is the lower middle voltage value, h is the upper middle voltage value, t is the key value corresponding to the button voltage value, and z is the preset key value.

本公开实施例提供的非临时性计算机可读存储介质,在对遥控设备上遥杆进行校准时,并不直接根据比例关系的进行计算,而是根据遥控设备的按键电压值与标准电压数据库中存储的标准电压之间的关系,采用不同的计算方式计算按键电压值对应的键值,由于采用该种方式得到的键值更加准确,因而提高了控制精度。The non-transitory computer-readable storage medium provided by the embodiments of the present disclosure does not directly calculate according to the proportional relationship when calibrating the joystick on the remote control device, but according to the button voltage value of the remote control device and the standard voltage database For the relationship between the stored standard voltages, different calculation methods are used to calculate the key value corresponding to the key voltage value. Since the key value obtained by this method is more accurate, the control accuracy is improved.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

CN201610194872.5A2016-03-302016-03-30The calibration method and device of distant bar on remote control equipmentActiveCN105891706B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610194872.5ACN105891706B (en)2016-03-302016-03-30The calibration method and device of distant bar on remote control equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610194872.5ACN105891706B (en)2016-03-302016-03-30The calibration method and device of distant bar on remote control equipment

Publications (2)

Publication NumberPublication Date
CN105891706Atrue CN105891706A (en)2016-08-24
CN105891706B CN105891706B (en)2018-12-25

Family

ID=57014394

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610194872.5AActiveCN105891706B (en)2016-03-302016-03-30The calibration method and device of distant bar on remote control equipment

Country Status (1)

CountryLink
CN (1)CN105891706B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109470499A (en)*2018-10-112019-03-15歌尔股份有限公司Rocking bar calibration test tooling, system and method
CN115300898A (en)*2021-05-052022-11-08宝德科技股份有限公司 Joystick assembly and game handle

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5874944A (en)*1996-11-131999-02-23Vlsi Technology, Inc.Variable voltage detector power-up and power-down circuit for a joystick interface
US20010008848A1 (en)*1997-10-012001-07-19Armstrong Brad A.Controller with convexed surface analog pressure sensor
JP2003287468A (en)*2002-03-282003-10-10Nitta Ind CorpCapacitance type sensor
CN2620888Y (en)*2003-03-042004-06-16普格科技股份有限公司 Control rocker for computer indicators
CN1794156A (en)*2004-12-232006-06-28安捷伦科技有限公司Slide pad system and method
JP3857549B2 (en)*2001-07-162006-12-13アルプス電気株式会社 Joystick origin correction and effective operating range setting method
CN201270559Y (en)*2008-09-262009-07-08任宝刚Remote control apparatus
CN103442277A (en)*2013-05-292013-12-11深圳市九洲电器有限公司Remote control method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5874944A (en)*1996-11-131999-02-23Vlsi Technology, Inc.Variable voltage detector power-up and power-down circuit for a joystick interface
US20010008848A1 (en)*1997-10-012001-07-19Armstrong Brad A.Controller with convexed surface analog pressure sensor
JP3857549B2 (en)*2001-07-162006-12-13アルプス電気株式会社 Joystick origin correction and effective operating range setting method
JP2003287468A (en)*2002-03-282003-10-10Nitta Ind CorpCapacitance type sensor
CN2620888Y (en)*2003-03-042004-06-16普格科技股份有限公司 Control rocker for computer indicators
CN1794156A (en)*2004-12-232006-06-28安捷伦科技有限公司Slide pad system and method
CN201270559Y (en)*2008-09-262009-07-08任宝刚Remote control apparatus
CN103442277A (en)*2013-05-292013-12-11深圳市九洲电器有限公司Remote control method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHAOKANG CHEN: "A Two-stage model for inference of target identity during 2D cursor control from natural gaze trajectories", 《ENGINEERING IN MEDICINE AND BIOLOGY SOCIETY》*
乱马: "最酷的游戏手柄", 《个人电脑》*

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109470499A (en)*2018-10-112019-03-15歌尔股份有限公司Rocking bar calibration test tooling, system and method
CN115300898A (en)*2021-05-052022-11-08宝德科技股份有限公司 Joystick assembly and game handle

Also Published As

Publication numberPublication date
CN105891706B (en)2018-12-25

Similar Documents

PublicationPublication DateTitle
US10739854B2 (en)Terminal and touch response method and device
CN112713322B (en)Battery temperature determination method, battery temperature determination device, and storage medium
CN107426428A (en)Electronic equipment and display lightness regulating method
EP3032821A1 (en)Method and device for shooting a picture
EP3145164A1 (en)Method and device for displaying answer extension function
CN107202574B (en)Motion trail information correction method and device
EP3136699A1 (en)Method and device for connecting external equipment
CN106028375A (en) Prompt method, device and terminal equipment for network switching
US10612918B2 (en)Mobile computing device and method for calculating a bending angle
EP2961148A1 (en)Method and device for obtaining voice service
US10013151B2 (en)Method and terminal device for adjusting widget
US20180004394A1 (en)Method and apparatus for displaying wifi signal icon, and mobile terminal
CN106201310A (en)The display packing of notification message, device and terminal
CN106155703B (en) Emotional state display method and device
CN106557201A (en)Pressure detection method and device
CN108462833A (en)Image pickup method, device and computer readable storage medium
CN105071500B (en)Charging method, device and the terminal of terminal
CN106226797B (en)Athletic ground information-pushing method and device
CN106775240B (en) Application program triggering method, device and terminal
CN104850855B (en)The method and apparatus for calculating confidence level
CN104850592B (en)The method and apparatus for generating model file
CN107368280A (en)Method for controlling volume, device and the interactive voice equipment of interactive voice
CN105891706A (en)Method and device for calibrating joystick on remote control apparatus
CN103984476A (en)Menu displaying method and device
CN106162831A (en)Method for connecting network and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp