fixed #25 Orientation with sensors is not working
This commit is contained in:
parent
f8f8e905d9
commit
0050dc1aee
1 changed files with 2 additions and 0 deletions
|
|
@ -279,12 +279,14 @@ class _PanoramaState extends State<Panorama> with SingleTickerProviderStateMixin
|
|||
motionSensors.orientationUpdateInterval = Duration.microsecondsPerSecond ~/ 60;
|
||||
_orientationSubscription = motionSensors.orientation.listen((OrientationEvent event) {
|
||||
orientation.setValues(event.yaw, event.pitch, event.roll);
|
||||
_updateView();
|
||||
});
|
||||
break;
|
||||
case SensorControl.AbsoluteOrientation:
|
||||
motionSensors.absoluteOrientationUpdateInterval = Duration.microsecondsPerSecond ~/ 60;
|
||||
_orientationSubscription = motionSensors.absoluteOrientation.listen((AbsoluteOrientationEvent event) {
|
||||
orientation.setValues(event.yaw, event.pitch, event.roll);
|
||||
_updateView();
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue