CN106500751B - The calibration method and mobile terminal of proximity sensor - Google Patents

The calibration method and mobile terminal of proximity sensor Download PDF

Info

Publication number
CN106500751B
CN106500751B CN201610916696.1A CN201610916696A CN106500751B CN 106500751 B CN106500751 B CN 106500751B CN 201610916696 A CN201610916696 A CN 201610916696A CN 106500751 B CN106500751 B CN 106500751B
Authority
CN
China
Prior art keywords
deviation
proximity sensor
mobile terminal
proximity
calibration
Prior art date
Application number
CN201610916696.1A
Other languages
Chinese (zh)
Other versions
CN106500751A (en
Inventor
张强
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN201610916696.1A priority Critical patent/CN106500751B/en
Publication of CN106500751A publication Critical patent/CN106500751A/en
Application granted granted Critical
Publication of CN106500751B publication Critical patent/CN106500751B/en

Links

Abstract

The present invention is suitable for field of communication technology, provides the calibration method and mobile terminal of a kind of proximity sensor, and the calibration method includes: to calibrate the deviation of proximity sensor when mobile terminal starting;After deviation value calibration is complete, if mobile terminal is in far from state, the output valve of proximity sensor is obtained, and the proximity values of the proximity sensor are calculated according to the output valve and the deviation.The present invention solves the problems, such as that larger offset occurs for the proximity values of proximity sensor, even if the deviation in proximity sensor is wiped free of, the still proximity values of available one relatively standard value, effectively improve the accuracy in detection of the proximity state of mobile terminal.

Description

The calibration method and mobile terminal of proximity sensor

Technical field

The invention belongs to field of communication technology more particularly to the calibration methods and mobile terminal of a kind of proximity sensor.

Background technique

The prior art before allowing access to sensor, when needing to be started according to mobile terminal the output valve of proximity sensor come Calculate proximity values, then initialized according to the proximity values proximity sensor close to threshold value and far from threshold value.Wherein, it approaches Value is the output valve of proximity sensor and the difference of preset deviation, to guarantee that the proximity values are floated downward in preset standard value It is dynamic.However, the deviation can be disposed of together, to make when user carries out the such as operation such as brush machine to mobile terminal It obtains the proximity values and biggish offset occurs relative to standard value, reduce the accuracy in detection of the proximity state of mobile terminal, It is easy to cause mobile terminal to be constantly in proximity state, the functions such as anti-error triggering or closing fingerprint can not be effectively realized.

Therefore, it is necessary to propose a kind of new technical solution, to solve the above technical problems.

Summary of the invention

In consideration of it, the embodiment of the invention provides a kind of calibration method of proximity sensor and mobile terminal, it is existing to solve The problem of larger offset, occurs for the proximity values of proximity sensor when having technology large deviations value to be removed, and improves the close of mobile terminal The accuracy in detection of state.

In a first aspect, providing a kind of calibration method of proximity sensor, the calibration method includes:

When mobile terminal starting, the deviation of proximity sensor is calibrated;

After deviation value calibration is complete, if the mobile terminal is in far from state, the output valve of proximity sensor is obtained, And the proximity values of the proximity sensor are calculated according to the output valve and the deviation.

Further, the deviation of the calibration proximity sensor includes:

If the mobile terminal is in far from state, several of proximity sensor are obtained according to the preset time interval Output valve;

The minimum value in the output valve is chosen, the difference between the minimum value and preset standard value is calculated;

By the Difference Storage into specified storage region, to update the deviation of the proximity sensor.

Further, before the deviation of calibration proximity sensor, the calibration method further include:

Read the data in specified storage region;

When read data are 0, judge whether the deviation being stored in the specified storage region has lost;

It is described calibration proximity sensor deviation include:

When the deviation being stored in the specified storage region has been lost, the deviation is calibrated.

Further, described when read data are 0, judge the deviation being stored in the specified storage region Whether value has lost

When read data are 0, proximity values of the proximity sensor under far from state are obtained;

Judge whether the proximity values are greater than preset standard value, if so, confirmation is stored in the specified memory block Deviation in domain has been lost.

Second aspect, provides a kind of mobile terminal, and the mobile terminal includes:

Calibration module, for calibrating the deviation of proximity sensor when mobile terminal starting;

Computing module, for if the mobile terminal is in far from state, obtaining close pass after deviation value calibration is complete The output valve of sensor, and calculate according to the output valve and the deviation proximity values of the proximity sensor.

Further, the calibration module includes:

First acquisition unit obtains according to the preset time interval if be in for the mobile terminal far from state Several output valves of proximity sensor;

Computing unit, for choosing the minimum value in the output valve, calculate the minimum value and preset standard value it Between difference;

Storage unit, for by the Difference Storage into specified storage region, to update the proximity sensor Deviation.

Further, the mobile terminal further include:

Read module, for reading the data in specified storage region;

Judgment module, for judging the deviation being stored in the specified storage region when read data are 0 Whether value has lost;

The calibration module is also used to: when the deviation being stored in the specified storage region has been lost, to institute Deviation is stated to be calibrated.

Further, the judgment module includes:

Second acquisition unit, for it is close under far from state to obtain proximity sensor when read data are 0 Value;

Judging unit, for judging whether the proximity values are greater than preset standard value, if so, confirmation is described specified Deviation in storage region has been lost.

The third aspect, provides a kind of mobile terminal, and the mobile terminal includes processor;

The processor, for calibrating the deviation of proximity sensor when mobile terminal starting;It is complete in deviation value calibration Afterwards, if the mobile terminal is in far from state, obtain the output valve of proximity sensor, and according to the output valve with it is described Deviation calculates the proximity values of the proximity sensor.

Compared with prior art, the embodiment of the present invention increases the deviation to proximity sensor when mobile terminal starts The calibration operation of value;After deviation value calibration is complete, if mobile terminal is in far from state, the output of proximity sensor is obtained Value, and according to the proximity values of the output valve and deviation calculating proximity sensor;So as to avoid proximity sensor The problem of larger offset, occurs for proximity values, even if the deviation in proximity sensor is wiped free of, still available one is compared The proximity values of standard value are closer to, the accuracy in detection of the proximity state of mobile terminal is effectively improved.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other accompanying drawings can also be obtained according to these attached drawings.

Fig. 1 is the implementation flow chart of the calibration method for the proximity sensor that first embodiment of the invention provides;

Fig. 2 is the implementation flow chart of the calibration method for the proximity sensor that second embodiment of the invention provides;

Fig. 3 is the implementation flow chart of the calibration method for the proximity sensor that third embodiment of the invention provides;

Fig. 4 is the schematic block diagram for the mobile terminal that fourth embodiment of the invention provides;

Fig. 5 is the schematic block diagram for the mobile terminal that fifth embodiment of the invention provides;

Fig. 6 is the schematic block diagram for the mobile terminal that sixth embodiment of the invention provides.

Specific embodiment

In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.

The embodiment of the present invention increases the calibration operation to the deviation of proximity sensor when mobile terminal starts;? After deviation value calibration is complete, if mobile terminal is in far from state, the output valve of proximity sensor is obtained, and according to described defeated It is worth the proximity values that proximity sensor is calculated with the deviation out;It is larger partially so as to avoid the proximity values generation of proximity sensor The problem of shifting, even if the deviation in proximity sensor is wiped free of, still available one relatively standard value connect Close values effectively improve the accuracy in detection of the proximity state of mobile terminal.It is moved the embodiment of the invention also provides corresponding Dynamic terminal, which will be described in detail below.

Fig. 1 shows the implementation process of the calibration method of the proximity sensor of first embodiment of the invention offer.

In embodiments of the present invention, the calibration method of the proximity sensor is applied to mobile terminal, the mobile terminal Including but not limited to smart phone, tablet computer, learning machine etc..Proximity sensor is provided on the mobile terminal.

Refering to fig. 1, the calibration method of the proximity sensor includes:

In step s101, when mobile terminal starts, the deviation of proximity sensor is calibrated.

In embodiments of the present invention, the deviation is minimal float of the output valve of proximity sensor relative to standard value Amplitude is calibrated for the output valve to proximity sensor, to obtain the proximity values of relatively preset standard value.At this In, the standard value refers to the optimal proximity values determined according to the performance of proximity sensor.Due to the use in proximity sensor It will receive the influence of the factors such as greasy dirt in the process, after factory, the output valve of proximity sensor can become larger mobile terminal.Therefore Need to correct the output valve of proximity sensor by the deviation.The deviation of existing proximity sensor is fixed. For the output valve become larger, the output valve of proximity sensor can not be returned near standard value by fixed deviation.Mirror In this, the embodiment of the present invention first calibrates the deviation of proximity sensor when mobile terminal starts, so that described The deviation of proximity sensor is corresponding with the float conditions of proximity sensor current output value.

On the other hand, after user carries out brush machine to mobile terminal, the deviation stored on mobile terminal may lose It loses, at this point, also the output valve of proximity sensor can not be returned near standard value.In consideration of it, the embodiment of the present invention is in movement Terminal first calibrates the deviation of proximity sensor when starting, so that the deviation of the proximity sensor and close The float conditions of sensor current output value are corresponding.

In step s 102, it after deviation value calibration is complete, if the mobile terminal is in far from state, obtains close to biography The output valve of sensor, and calculate according to the output valve and the deviation proximity values of the proximity sensor.

After deviation value calibration is complete, then based on the deviation after calibration, calculated according to the output valve of the proximity sensor Proximity values.Wherein, the proximity values are the output valve of proximity sensor and the difference of the deviation.Herein, due in movement Terminal calibrates the calibration value of proximity sensor when starting, and deviation and the proximity sensor of the proximity sensor are worked as The problem of float conditions of preceding output valve are corresponding, and larger offset occurs so as to avoid the proximity values, even if will be close to sensing The deviation of device wipes out, and still the proximity values of available one relatively standard value, effectively improve mobile terminal Proximity state accuracy in detection.

As another preferable example of the invention, can be existed when mobile terminal starts by acquiring proximity sensor The floating changing condition of proximity sensor output valve is obtained far from several output valves under state.Fig. 2 shows the present invention The implementation process of the calibration method for the proximity sensor that second embodiment provides.

Referring to Fig.2, the calibration method of the proximity sensor includes:

In step s 201, when mobile terminal starts, if the mobile terminal is in far from state, according to it is preset when Between interval acquiring proximity sensor several output valves.

In embodiments of the present invention, when mobile terminal starts, if mobile terminal is in far from state, according to preset The output valve of time interval acquisition proximity sensor.Illustratively, the prefixed time interval can be 1 millisecond etc..

In step S202, choose the minimum value in the output valve, calculate the minimum value and preset standard value it Between difference.

In step S203, by the Difference Storage into specified storage region, to update the proximity sensor Deviation.

Herein, the embodiment of the present invention compares the output valve after getting several output valves two-by-two, chooses wherein Minimum value.Illustratively, when the standard value of proximity sensor is 200, if the output valve packet of acquired proximity sensor When including 250,255,275,258,270, minimum value therein, i.e., 255 are chosen, subtracts 200 for 250, to obtain difference 50.Institute Deviation of the difference 50 as the proximity sensor is stated, is stored into specified storage region.Herein, described specified to deposit Storage area domain includes but is not limited to calibration register or calibration parameter region (region NV).

In step S204, after deviation value calibration is complete, if the mobile terminal is in far from state, obtain close to biography The output valve of sensor, and calculate according to the output valve and the deviation proximity values of the proximity sensor.

After deviation value calibration is complete, then based on the deviation after calibration, calculated according to the output valve of the proximity sensor Proximity values.Herein, described close to sensing due to being calibrated when mobile terminal starts to the calibration value of proximity sensor The deviation of device is corresponding with the float conditions of proximity sensor current output value, leads even if carrying out brush machine to mobile terminal in user Deflection difference is wiped free of, and can also retrieve new deviation, can be still returned to the output valve of proximity sensor Near standard value;The problem of larger offset occurs so as to avoid the proximity values effectively improves the close of mobile terminal The accuracy in detection of state.

Further, as another preferable example of the invention, to inclined the case where can be lost only for deviation Difference is calibrated.At this point, first determining whether deviation loses in mobile terminal starting, if losing, then to described inclined Difference is calibrated.Fig. 3 shows the implementation process of the calibration method of the proximity sensor of third embodiment of the invention offer.Ginseng Fig. 3 is read, the calibration method of the proximity sensor includes:

In step S301, in mobile terminal starting, the data in specified storage region are read.

In step s 302, when read data are 0, judge whether the deviation in specified storage region has lost It loses.

Herein, when read data are 0, it may be possible to which deviation sheet is as 0, it is also possible to which deviation loss is led Causing the data in the specified storage region is 0.When data of the embodiment of the present invention in specified storage region are 0, root Determine whether the deviation in the specified storage region loses according to whether acquired proximity values are greater than standard value. The step S302 is specifically included:

Obtain proximity values of the proximity sensor under far from state;

Judge whether the proximity values are greater than preset standard value;

If the proximity values are greater than preset standard value, confirm that the deviation in the specified storage region has been lost It loses.

Wherein, when deviation is 0, without calibration, the output valve of proximity sensor is equal to the output valve of proximity sensor Proximity values, the proximity values should be less than preset standard value.In consideration of it, the embodiment of the present invention is by comparing proximity values and presetting Standard value.If the proximity values are less than or equal to preset standard value, confirmation bias value is 0, directly execution step S307; Otherwise, if the proximity values are greater than preset standard value, it can be confirmed that the deviation in the specified storage region has been lost.

In step S303, when the deviation in the specified storage region has been lost, the deviation is carried out Calibration.

In step s 304, it if the mobile terminal is in far from state, obtains according to the preset time interval close Several output valves of sensor.

In step S305, choose the minimum value in the output valve, calculate the minimum value and preset standard value it Between difference.

In step S306, by the Difference Storage into specified storage region, to update the proximity sensor Deviation.

In step S307, if the mobile terminal is in far from state, the output valve of proximity sensor, and root are obtained The proximity values of the proximity sensor are calculated according to the output valve and the deviation.

In embodiments of the present invention, when deviation is lost, deviation is calibrated, so that the proximity sensor Deviation is corresponding with the float conditions of proximity sensor current output value.After deviation value calibration is complete, based on the deviation after calibration Value, according to the proximity values of the still available relatively standard value of the output valve of the proximity sensor.Even if user is to shifting Dynamic terminal, which carries out brush machine, causes deviation to be wiped free of, and can also retrieve new deviation, still can be by proximity sensor Output valve be returned near standard value;The problem of larger offset occurs so as to avoid the proximity values, effectively improves The accuracy in detection of the proximity state of mobile terminal.

It should be understood that in the above-described embodiments, the size of the serial number of each step is not meant that the order of the execution order, it is each to walk Rapid execution sequence should be determined by its function and internal logic, and the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.

The schematic block diagram that Fig. 4 shows the mobile terminal of fourth embodiment of the invention offer is only shown for ease of description Part related to the embodiment of the present invention is gone out.

In embodiments of the present invention, the mobile terminal connects for realizing described in above-mentioned Fig. 1 to Fig. 3 any embodiment The calibration method of nearly sensor.The mobile terminal includes but is not limited to smart phone, tablet computer etc..Herein, the shifting Proximity sensor is provided in dynamic terminal.

Refering to Fig. 4, the mobile terminal includes:

Deviation calibration module 41, for calibrating the deviation of proximity sensor when mobile terminal starting;

Proximity values obtain module 42, for if the mobile terminal is in far from state, obtaining after deviation value calibration is complete The output valve of proximity sensor is taken, and calculates the proximity values of the proximity sensor according to the output valve and the deviation.

Further, the deviation calibration module 41 includes:

Output valve acquiring unit 411 is used for when the mobile terminal is in far from state, according to the preset time interval Obtain several output valves of proximity sensor;

Computing unit 412 calculates the minimum value and preset standard value for choosing the minimum value in the output valve Between difference;

Storage unit 413, for by the Difference Storage into specified storage region, to update the proximity sensor Deviation.

Further, the mobile terminal further include:

Read module 43, for reading the data in specified storage region;

Judgment module 44, for when read data are 0, judgement to be stored in inclined in the specified storage region Whether difference has lost;

The calibration module 41 is also used to: right when the deviation being stored in the specified storage region has been lost The deviation is calibrated.

Further, the judgment module 44 includes:

Second acquisition unit 441, for obtaining proximity sensor under far from state when read data are 0 Proximity values;

Judging unit 442, for judging whether the proximity values are greater than preset standard value, if so, confirming the finger Deviation in fixed storage region has been lost.

It should be noted that the mobile terminal in the embodiment of the present invention can be used to implement it is complete in above method embodiment The function of portion's technical solution, each functional module can be implemented according to the method in above method embodiment, specific Realization process can refer to the associated description in examples detailed above, and details are not described herein again.

It is the schematic block diagram for the mobile terminal that fifth embodiment of the invention provides referring to Fig. 5.The movement as shown in the figure Terminal may include: one or more processors 501 (one is only shown in figure);One or more input equipments 502 are (in figure only Show one), one or more output equipments 503 (one is only shown in figure), memory 504.Above-mentioned processor 501, input Equipment 502, output equipment 503, memory 504 are connected by bus 506.Memory 504 for storing instruction, processor 501 For executing the instruction of the storage of memory 504.Wherein:

The processor 501, for calibrating the deviation of proximity sensor when mobile terminal starting;In deviation school It is quasi- it is complete after, if the mobile terminal is in far from state, obtain the output valve of proximity sensor, and according to the output valve with The deviation calculates the proximity values of the proximity sensor.

The processor 501, is also used to:

When the mobile terminal is in far from state, several of proximity sensor are obtained according to the preset time interval Output valve;The minimum value in the output valve is chosen, the difference between the minimum value and preset standard value is calculated;It will be described Difference Storage is into specified storage region, to update the deviation of the proximity sensor.

The processor 501, is also used to:

Before the deviation of calibration proximity sensor, the data in specified storage region are read;When read number When according to being 0, judge whether the deviation being stored in the specified storage region has lost;When being stored in described specified deposit When deviation in storage area domain has been lost, the deviation is calibrated.

The processor 501, is also used to:

When read data are 0, proximity values of the proximity sensor under far from state are obtained;Judge the proximity values Whether preset standard value is greater than, if so, the deviation that confirmation is stored in the specified storage region has been lost.

It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU) and/or graphics processor (Graphic Processing Unit, GPU), it can also be in this base Other general processors, digital signal processor (Digital Signal Processor, DSP), dedicated integrated are combined on plinth Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..

Input equipment 502 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user Directional information), microphone, communication module (such as Wi-Fi module, 2G/3G/4G network module), physical button etc..

Output equipment 503 may include display (LCD etc.), loudspeaker etc..Wherein, display can be used for showing by user The information of input or the information etc. for being supplied to user.Display may include display panel, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light-Emitting Diode, ) etc. OLED forms configure display panel.Further, above-mentioned touch screen can cover over the display, when touch screen detects After touch operation on it or nearby, processor 501 is sent to determine the type of touch event, is followed by subsequent processing device 501 Corresponding visual output is provided over the display according to the type of touch event.

In the specific implementation, processor 501 described in the embodiment of the present invention, input equipment 502, output equipment 503, depositing Realization side described in the embodiment of the calibration method of proximity sensor provided in an embodiment of the present invention can be performed in reservoir 504 Formula, details are not described herein.

Fig. 6 is a kind of schematic block diagram for mobile terminal that sixth embodiment of the invention provides, which can use In the calibration method for the proximity sensor for implementing to provide in above-described embodiment.

As shown in fig. 6, mobile terminal 1200 may include RF (Radio Frequency, radio frequency) circuit 110, include The memory 120 of one or more (one is only shown in figure) computer readable storage mediums, input unit 130, display Unit 140, voicefrequency circuit 160, transmission module 170, includes one or more than one and (only shows one in figure sensor 150 It is a) processor 180 of processing core and the equal components of power supply 190.It will be understood by those skilled in the art that shifting shown in Fig. 6 Dynamic 1200 structure of terminal does not constitute the restriction to mobile terminal 1200, may include components more more or fewer than diagram, or Person combines certain components or different component layouts.Wherein:

RF circuit 110 realizes the mutual conversion of electromagnetic wave and electric signal, thus with logical for receiving and transmitting electromagnetic wave News network or other equipment are communicated.RF circuit 110 may include various existing for executing the circuit elements of these functions Part, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card, storage Device etc..RF circuit 110 can carry out communicating or by wireless with various networks such as internet, intranet, wireless network Network is communicated with other equipment.Above-mentioned wireless network may include cellular telephone networks, WLAN or Metropolitan Area Network (MAN). Various communication standards, agreement and technology, including but not limited to global system for mobile communications can be used in above-mentioned wireless network (Global System for Mobile Communication, GSM), enhanced mobile communication technology (Enhanced Data GSM Environment, EDGE), Wideband CDMA Technology (wideband code division multiple Access, W-CDMA), Code Division Multiple Access (Code division access, CDMA), time division multiple access technology (time Division multiple access, TDMA), adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (such as U.S.'s electricity Gas and Electronic Engineering Association standard IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), the networking telephone (Voice over internet protocal, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for Microwave Access, Wi-Max), other be used for mail, Instant Messenger The agreement and any other suitable communications protocol of news and short message, or even may include that those are not developed currently yet Agreement.

Memory 120 can be used for storing software program and module, as the corresponding program instruction of method in above-described embodiment/ Module, the software program and module that processor 180 is stored in memory 120 by operation, is answered thereby executing various functions With and data processing, that is, calibrate the deviation of proximity sensor, proximity sensor calculated according to the deviation after calibration and is connect Close values.Memory 120 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetism Storage device, flash memory or other non-volatile solid state memories.In some instances, memory 120 can further comprise phase The memory remotely located for processor 180, these remote memories can pass through network connection to mobile terminal 1200.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.

Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.

Display unit 140 can be used for showing information input by user or the information and mobile terminal that are supplied to user 1200 various graphical user interface, these graphical user interface can be by figure, text, icon, video and any combination thereof To constitute.Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) come Configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 is detected at it On or near touch operation after, send processor 180 to determine the type of touch event, be followed by subsequent processing device 180 according to touching The type for touching event provides corresponding visual output on display panel 141.Although in Fig. 6, touch sensitive surface 131 and display surface Plate 141 is to realize input and input function as two independent components, but in some embodiments it is possible to by touch-sensitive table Face 131 and display panel 141 integrate and realize and output and input function.

Mobile terminal 1200 may also include at least one sensor 150, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can basis The light and shade of ambient light adjusts the brightness of display panel 141, proximity sensor can when mobile terminal 1200 is moved in one's ear, Close display panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect all directions The size of upper (generally three axis) acceleration, can detect that size and the direction of gravity, can be used for detecting tilt angle when static, And application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), the Vibration identification correlation function of identification mobile phone posture Energy (such as pedometer, percussion) etc.;The gyroscope that can also configure as mobile terminal 1200, barometer, hygrometer, thermometer, The other sensors such as infrared sensor, details are not described herein.

Voicefrequency circuit 160, loudspeaker 161, the audio that microphone 162 can provide between user and mobile terminal 1200 connect Mouthful.Electric signal after the audio data received conversion can be transferred to loudspeaker 161, by loudspeaker 161 by voicefrequency circuit 160 Be converted to voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, by voicefrequency circuit 160 receive after be converted to audio data, then by after the processing of audio data output processor 180, through RF circuit 110 to be sent to ratio Such as another terminal, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that Earphone jack, to provide the communication of peripheral hardware earphone Yu mobile terminal 1200.

Mobile terminal 1200 can help user send and receive e-mail, is clear by transmission module 170 (such as WiFi module) Look at webpage and access streaming video etc., it provides wireless broadband internet for user and accesses.Although Fig. 6 shows transmission mould Block 170, but it is understood that, and it is not belonging to must be configured into for mobile terminal 1200, it is can according to need completely not Change in the range of the essence of invention and omits.

Processor 180 is the control centre of mobile terminal 1200, utilizes each of various interfaces and connection whole mobile phone A part by running or execute the software program and/or module that are stored in memory 120, and calls and is stored in storage Data in device 120 execute the various functions and processing data of mobile terminal 1200, to carry out integral monitoring to mobile phone.It can Choosing, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.

Mobile terminal 1200 further includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can lead to Cross power-supply management system and processor 180 be logically contiguous, thus by power-supply management system realize management charging, electric discharge and The functions such as power managed.Power supply 190 can also include one or more direct current or AC power source, recharging system, electricity The random components such as source fault detection circuit, power adapter or inverter, power supply status indicator.

Although being not shown, mobile terminal 1200 can also include camera, bluetooth module etc., and details are not described herein.Specifically In the present embodiment, the display unit of mobile terminal is touch-screen display, and mobile terminal further includes having memory and one Perhaps more than one program one of them or more than one program is stored in memory, and be configured to by one or The execution of more than one processor of person states one or more than one program includes the instruction for performing the following operation:

When mobile terminal starting, the deviation of proximity sensor is calibrated;

After deviation value calibration is complete, if the mobile terminal is in far from state, the output valve of proximity sensor is obtained, And the proximity values of the proximity sensor are calculated according to the output valve and the deviation.

Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, in the memory of the mobile terminal, also include instructions for performing the following operations:

It is described calibration proximity sensor deviation include:

When the mobile terminal is in far from state, several of proximity sensor are obtained according to the preset time interval Output valve;

The minimum value in the output valve is chosen, the difference between the minimum value and preset standard value is calculated;

By the Difference Storage into specified storage region, to update the deviation of the proximity sensor.

In the third the possible embodiment provided based on the first or second of possible embodiment, Also include instructions for performing the following operations in the memory of the mobile terminal:

Before the deviation of calibration proximity sensor, the calibration method further include:

Read the data in specified storage region;

When read data are 0, judge whether the deviation being stored in the specified storage region has lost;

It is described calibration proximity sensor deviation include:

When the deviation being stored in the specified storage region has been lost, the deviation is calibrated.

In the 4th kind of possible embodiment provided based on the third possible embodiment, the movement Also include instructions for performing the following operations in the memory of terminal:

It is described when read data are 0, whether judge the deviation that is stored in the specified storage region Loss includes:

When read data are 0, proximity values of the proximity sensor under far from state are obtained;

Judge whether the proximity values are greater than preset standard value, if so, confirmation is stored in the specified memory block Deviation in domain has been lost.

The embodiment of the present invention increases the calibration operation to the deviation of proximity sensor when mobile terminal starts;? After deviation value calibration is complete, if mobile terminal is in far from state, the output valve of proximity sensor is obtained, and according to described defeated It is worth the proximity values that proximity sensor is calculated with the deviation out;It is larger partially so as to avoid the proximity values generation of proximity sensor The problem of shifting, even if the deviation in proximity sensor is wiped free of, still available one relatively standard value connect Close values effectively improve the accuracy in detection of the proximity state of mobile terminal.

Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.

It is apparent to those skilled in the art that for convenience and simplicity of description, the module of foregoing description It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.

In several embodiments provided herein, it should be understood that disclosed method and mobile terminal, Ke Yitong Other modes are crossed to realize.For example, embodiments described above is only schematical, for example, the module, unit are drawn Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for The mutual coupling, direct-coupling or communication connection of opinion can be through some interfaces, the INDIRECT COUPLING of module or unit Or communication connection, it can be electrical property, mechanical or other forms.

The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.

In addition, each functional unit in each embodiment of the present invention, module can integrate in one processing unit, Can be each unit, module physically exists alone, can also be integrated in one unit with two or more units, module In.

It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.

The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. a kind of calibration method of proximity sensor, which is characterized in that the calibration method includes:
When mobile terminal starting, the deviation of proximity sensor is calibrated;
After deviation value calibration is complete, if the mobile terminal is in far from state, the output valve of proximity sensor, and root are obtained The proximity values of the proximity sensor are calculated according to the output valve and the deviation.
2. the calibration method of proximity sensor as described in claim 1, which is characterized in that described to calibrate the inclined of proximity sensor Difference includes:
If the mobile terminal is in far from state, several outputs of proximity sensor are obtained according to the preset time interval Value;
The minimum value in the output valve is chosen, the difference between the minimum value and preset standard value is calculated;
By the Difference Storage into specified storage region, to update the deviation of the proximity sensor.
3. the calibration method of proximity sensor as claimed in claim 2, which is characterized in that in the deviation of calibration proximity sensor Before value, the calibration method further include:
Read the data in specified storage region;
When read data are 0, judge whether the deviation being stored in the specified storage region has lost;
It is described calibration proximity sensor deviation include:
When the deviation being stored in the specified storage region has been lost, the deviation is calibrated.
4. the calibration method of proximity sensor as claimed in claim 3, which is characterized in that described when read data are 0 When, judging whether the deviation being stored in the specified storage region has lost includes:
When read data are 0, proximity values of the proximity sensor under far from state are obtained;
Judge whether the proximity values are greater than preset standard value, if so, confirmation is stored in the specified storage region Deviation lost.
5. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Calibration module, for calibrating the deviation of proximity sensor when mobile terminal starting;
Computing module, for if the mobile terminal is in far from state, obtaining proximity sensor after deviation value calibration is complete Output valve, and calculate according to the output valve and the deviation proximity values of the proximity sensor.
6. mobile terminal as claimed in claim 5, which is characterized in that the calibration module includes:
First acquisition unit obtains close according to the preset time interval if be in for the mobile terminal far from state Several output valves of sensor;
Computing unit calculates between the minimum value and preset standard value for choosing the minimum value in the output valve Difference;
Storage unit, for by the Difference Storage into specified storage region, to update the deviation of the proximity sensor Value.
7. mobile terminal as claimed in claim 6, which is characterized in that the mobile terminal further include:
Read module, for reading the data in specified storage region;
Judgment module, for when read data are 0, judging that the deviation being stored in the specified storage region is It is no to have lost;
The calibration module is also used to: when the deviation being stored in the specified storage region has been lost, to described inclined Difference is calibrated.
8. mobile terminal as claimed in claim 7, which is characterized in that the judgment module includes:
Second acquisition unit, for obtaining proximity values of the proximity sensor under far from state when read data are 0;
Judging unit, for judging whether the proximity values are greater than preset standard value, if so, the confirmation specified storage Deviation in region has been lost.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes processor;
The processor, for calibrating the deviation of proximity sensor when mobile terminal starting;After deviation value calibration is complete, If the mobile terminal is in far from state, obtain the output valve of proximity sensor, and according to the output valve and it is described partially Difference calculates the proximity values of the proximity sensor.
10. mobile terminal as claimed in claim 9, which is characterized in that the processor is also used to:
If the mobile terminal is in far from state, several outputs of proximity sensor are obtained according to the preset time interval Value;The minimum value in the output valve is chosen, the difference between the minimum value and preset standard value is calculated;By the difference It stores into specified storage region, to update the deviation of the proximity sensor.
11. mobile terminal as claimed in claim 10, which is characterized in that the processor is also used to:
Before the deviation of calibration proximity sensor, the data in specified storage region are read;When read data are 0 When, judge whether the deviation being stored in the specified storage region has lost;When being stored in the specified memory block When deviation in domain has been lost, the deviation is calibrated.
12. mobile terminal as claimed in claim 11, which is characterized in that the processor is also used to:
When read data are 0, proximity values of the proximity sensor under far from state are obtained;Whether judge the proximity values Greater than preset standard value, if so, the deviation that confirmation is stored in the specified storage region has been lost.
CN201610916696.1A 2016-10-20 2016-10-20 The calibration method and mobile terminal of proximity sensor CN106500751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610916696.1A CN106500751B (en) 2016-10-20 2016-10-20 The calibration method and mobile terminal of proximity sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610916696.1A CN106500751B (en) 2016-10-20 2016-10-20 The calibration method and mobile terminal of proximity sensor

Publications (2)

Publication Number Publication Date
CN106500751A CN106500751A (en) 2017-03-15
CN106500751B true CN106500751B (en) 2019-01-15

Family

ID=58318121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610916696.1A CN106500751B (en) 2016-10-20 2016-10-20 The calibration method and mobile terminal of proximity sensor

Country Status (1)

Country Link
CN (1) CN106500751B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102022530A (en) * 2009-09-09 2011-04-20 通用汽车环球科技运作公司 Hydraulic control systems for dual clutch transmissions
CN102440063A (en) * 2008-12-29 2012-05-02 摩托罗拉移动公司 Portable electronic device having self-calibrating proximity sensors
CN102932527A (en) * 2012-09-24 2013-02-13 惠州Tcl移动通信有限公司 Mobile terminal and calibration method of distance sensor thereof
CN105628079A (en) * 2015-12-30 2016-06-01 上海闻泰电子科技有限公司 Dynamic calibration method of distance sensor
CN105959492A (en) * 2016-07-06 2016-09-21 广东欧珀移动通信有限公司 Control method and device for infrared proximity sensor and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11241926A (en) * 1998-02-25 1999-09-07 Honda Motor Co Ltd Traveling distance correcting device for vehicle
US7623230B2 (en) * 2007-10-23 2009-11-24 Nokia Corporation Optical sensor calibration
US9146304B2 (en) * 2012-09-10 2015-09-29 Apple Inc. Optical proximity sensor with ambient light and temperature compensation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102440063A (en) * 2008-12-29 2012-05-02 摩托罗拉移动公司 Portable electronic device having self-calibrating proximity sensors
CN102022530A (en) * 2009-09-09 2011-04-20 通用汽车环球科技运作公司 Hydraulic control systems for dual clutch transmissions
CN102932527A (en) * 2012-09-24 2013-02-13 惠州Tcl移动通信有限公司 Mobile terminal and calibration method of distance sensor thereof
CN105628079A (en) * 2015-12-30 2016-06-01 上海闻泰电子科技有限公司 Dynamic calibration method of distance sensor
CN105959492A (en) * 2016-07-06 2016-09-21 广东欧珀移动通信有限公司 Control method and device for infrared proximity sensor and mobile terminal

Also Published As

Publication number Publication date
CN106500751A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
US8380225B2 (en) Content transfer involving a gesture
EP2988199A1 (en) Clicking control method and terminal
EP2741189A1 (en) Electronic device and method for controlling zooming of display object
EP2708983A2 (en) Method for auto-switching user interface of handheld terminal device and handheld terminal device thereof
EP2720135B1 (en) Data transmission method, data transmission device and terminal provided with touch screen
WO2016107505A1 (en) Method for displaying graphical user interface, and mobile terminal
JP6130926B2 (en) Gesture conversation processing method, apparatus, terminal device, program, and recording medium
CN103593155B (en) Display frame generating method and terminal device
CN104243671B (en) Volume adjusting method, device and electronic equipment
EP2561722B1 (en) Use of mobile computing device sensors to initiate a telephone call or modify telephone operation
CN103558749B (en) smart watch
CN103455256A (en) Method and terminal for rotating display picture of screen
CN103365419B (en) A kind of method and apparatus triggering alarm clock control command
CN105306682B (en) The method and device of network connection switch is automatically closed
EP2882234B1 (en) Method, apparatus, equipment and system for controlling turn-on and turn-off of wireless network
WO2014206143A1 (en) Method, apparatus and device for displaying number of unread messages
KR101652373B1 (en) Method, device, terminal, program and storage medium for displaying virtual keyboard
CN103543913A (en) Terminal device operation method and device, and terminal device
US20170185052A1 (en) Method and device for sending communication message
CN103458124A (en) Shutdown processing method, device and terminal equipment for terminal
CN104348956A (en) Antitheft method and apparatus for mobile terminal
CN103473092B (en) A kind of download the processing method of application, device and terminal unit
CN103389863B (en) A kind of display control method and device
CN104601207B (en) A kind of data transmission method, user terminal and system
CN104915091B (en) A kind of method and apparatus for the prompt information that Shows Status Bar

Legal Events

Date Code Title Description
C06 Publication
SE01
CB02
GR01