davinci: parts: Quickly takeback the motor in free fall
Change-Id: Ib31f4cf5b1de4cd9366b3d15945749a53d260690
This commit is contained in:
parent
4f2af261f3
commit
236c8747e3
@ -102,7 +102,12 @@ public class PopupCameraService extends Service implements Handler.Callback {
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (event.values[0] == 2.0f) {
|
||||
updateMotor(Constants.CLOSE_CAMERA_STATE);
|
||||
try {
|
||||
mMotor.takebackMotorShortly();
|
||||
mSensorManager.unregisterListener(mFreeFallListener, mFreeFallSensor);
|
||||
} catch (RemoteException e) {
|
||||
// Do nothing
|
||||
}
|
||||
goBackHome();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user