question

Feifei-1244 avatar image
0 Votes"
Feifei-1244 asked Feifei-1244 edited

Rotate the screen according to accelerometer

Hello,everyone.

I want to use the accelerometer to rotate the screen, but now there are two identical accelerometers on the computer, one on the screen and the other on the keyboard. Refer to MS's ADXL345 accelerometer driver example and set the DEVPKEY_Sensor_IsPrimary Property on the screen is true, keyboard is false, and screen rotation is normal. However, after the computer restarts, screen rotation is always normal according to the accelerometer on the keyboard,not accelerometer on the screen. After the driver is disabled and enabled again, it is normal according to the accelerometer on the screen. Why?
My driver accesses two devices at the same time,Refer to MS's SensorsComboDriver driver example.
Thanks!

windows-hardwarewindows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers