none
Driver to set screen & camera rotation RRS feed

  • Question

  • We have incoming screen orientation data from an attached MCU which itself is reading a gyroscope.

    How can I connect this screen orientation data to a driver so that Windows 10 will rotate the screen and hopefully rotate the camera?

    Is there a class or something that I need to pass data to for the screen to rotate? Or is there a property I can change?

    I saw 'SimpleDeviceOrientation' example UMDF2 example, but was unable to get it to run, it never calls Sensor Start. I'm also not sure if this example is the right path for screen rotation on Win 10.


    • Edited by huntorotron Monday, September 18, 2017 5:01 PM
    Monday, September 18, 2017 5:00 PM

Answers

  • Hello huntorotron,

    Are you trying to expose a simple device orientation sensor on a desktop/laptop/tablet like device? In other words, is the OS a Windows desktop SKU?

    If this is the case, you will want to expose an accelerometer sensor instead of a simple device orientation sensor. As of the current version of Windows , simple device orientation sensor is not hooked up to screen rotation on Windows desktop SKUs. The simple device orientation sensor is currently only exposed to WinRT and ISensor based applications. There is no ETA yet as to when this behavioral difference will be fixed.

    Please let me know if you have any trouble getting screen orientation to work once the accelerometer sensor is exposed to the system or if you have any additional question on this subject!

    Thank you,


    Jocelyn Berrendonner [MSFT]

    Monday, September 25, 2017 6:29 PM

All replies

  • Update:

    I am able to run 'SimpleOrientationSensor' from the Windows UWP examples. This triggers a breakpoint in the 'SimpleDeviceOrientationSensor' UMDF driver.

    However, I do not understand how to connect this so that Windows reads it automatically and rotates the screen?

    Monday, September 18, 2017 10:43 PM
  • Somehow feed the MCU data to the sensor driver?

    -- pa

    Tuesday, September 19, 2017 1:49 AM
  • Sorry I think I made the question too confusing...

    I know what the current orientation of the display is, and I want to tell Windows so that Windows will rotate itself.

    I'm using Windows 10 so I assumed there was some accelerometer driver, but I can't seem to get it working with SimpleDeviceOrientation example. (I.E it works according to the UWP app, but Windows doesn't actually rotate. I have it in Tablet mode.)

    Thanks.


    • Edited by huntorotron Tuesday, September 19, 2017 2:49 PM
    Tuesday, September 19, 2017 2:30 PM
  • Hello huntorotron,

    Are you trying to expose a simple device orientation sensor on a desktop/laptop/tablet like device? In other words, is the OS a Windows desktop SKU?

    If this is the case, you will want to expose an accelerometer sensor instead of a simple device orientation sensor. As of the current version of Windows , simple device orientation sensor is not hooked up to screen rotation on Windows desktop SKUs. The simple device orientation sensor is currently only exposed to WinRT and ISensor based applications. There is no ETA yet as to when this behavioral difference will be fixed.

    Please let me know if you have any trouble getting screen orientation to work once the accelerometer sensor is exposed to the system or if you have any additional question on this subject!

    Thank you,


    Jocelyn Berrendonner [MSFT]

    Monday, September 25, 2017 6:29 PM