Patent ID: 11877047
Assignee: HONOR DEVICE CO., LTD.
Field: Audio-visual technology (Electrical engineering)
Classification: CPC H  G | IPC G  H

Claim 16:
17. A position detection method, the method comprising:
controlling, by an electronic device, a driving assembly to drive a bracket to move in a preset direction in response to a trigger operation being received, wherein:
the electronic device comprises a housing, a circuit board, the bracket, and a camera device,
the circuit board, the bracket, and the camera device are arranged in the housing,
the housing is provided with an opening and is formed with an accommodating cavity in communication with the opening to accommodate the camera device,
the camera device comprises a camera and the driving assembly,
the camera is arranged on the bracket,
the driving assembly is connected to the bracket,
the circuit board is provided with a Hall sensor, and
the bracket is provided with a first magnet;

obtaining, by the electronic device, a first induction signal and a second induction signal generated by the Hall sensor, wherein the first induction signal is an induction signal generated by sensing a magnetic field of the first magnet by a first working surface of the Hall sensor, and the second induction signal is an induction signal generated by sensing the magnetic field of the first magnet by a second working surface of the Hall sensor;
determining, by the electronic device, a position state of the camera based on the first induction signal and the second induction signal, wherein the position state of the camera comprises a stretching-out position and a retracting position;
in response to the camera being in the stretching-out position, obtaining, by the electronic device, a first induction signal and a second induction signal generated by the Hall sensor;
determining, by the electronic device, whether the first induction signal and the second induction signal change;
in response to the first induction signal and the second induction signal changing, determining, by the electronic device, whether an amount of the change of the first induction signal and the second induction signal is greater than a third preset threshold; and
in response to the amount of the change of the first induction signal and the second induction signal being greater than the third preset threshold, controlling, by the electronic device, the driving assembly to drive the bracket to move in the second direction, so that the camera is in the retracting position.