Skip to content

Commit

Permalink
fixed zesage#25 Orientation with sensors is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerst committed Jun 19, 2022
1 parent f8f8e90 commit 0050dc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/panorama.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0050dc1

Please sign in to comment.