Method for directly adapting gravity sensor without code modification
The invention discloses a method for directly adapting a gravity sensor without code modification. The method comprises the following steps: respectively placing a mobile terminal screen in a manner of being vertical to a preset X axis, Y axis and Z axis of a system, respectively comparing accelerat...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method for directly adapting a gravity sensor without code modification. The method comprises the following steps: respectively placing a mobile terminal screen in a manner of being vertical to a preset X axis, Y axis and Z axis of a system, respectively comparing acceleration values output by the gravity sensor at placement positions with a set range, comparing an acceleration direction with preset X axis, Y axis and Z axis directions of the system, and then storing comparison results into a mobile terminal, wherein the system reads the comparison results, and corrects the acceleration output by the gravity sensor according to the comparison results, so as to enable the gravity sensor to correspond to preset X axis, Y axis and Z axis directions of the system. By virtue of simple mobile terminal placement operation, the direction of the gravity sensor can be calibrated, so that the gravity sensor adapts to the current mobile terminal; furthermore, recalibration is not needed during r |
---|