You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added the first IMU sensor driver to the build system. This driver is a 6dof sensor that is able to sense roll and pitch. This sensor will allow for automatic rotation of a display depending on how the user has it orientated. IMU/MEMS sensors do not provide data that you can read and easily know what the roll and pitch is so I also wrote a fusion math driver as a C extension module. The math involved in reading the IMU data and turning it into roll pitch and yaw is some pretty heavy lifting which is the reason why I wrote it in C code. All of the math involved is floating point math which no increase in performance is given above python code if I used the viper code emitter which is why it is written in C code.
There is also an additional driver that is frozen into the firmware if an IMU driver is added and that is "auto_rotate". This driver handles the reading of the IMU sensor data from a driver that gets passed to it. It does the calculations to figure out which way the display needs to be rotated depending on the orientation that the display is being held in. This driver has 2 modes, a locked rotation mode which will lock rotation angles at 0, 90, 180 and 27o. This mode will use a display hardware rotation if it is available. The other mode would work best on small displays like the ones used on smart watches. The round display also lends to this feature working best as well. The rotation is a free rotation and will adjust as the roll changes so the UI will always be display in the correct position no matter what angle the display is being held at. Not everyone holds their arm perfectly horizontal when looking at a watch. There is one thing I have to get someone to test out and that is when showing the watch to another person which involves the pitch angle. I want the display to roll 180 degrees if the pitch angle is less than zero. I will add that feature and tweak how it works when I get someone to test it with.
0 commit comments