Is there a way to reset the orientation sensor in B4A?
I am converting my (B4PPC) GPSLog to B4A and have a compass driven by the orientation sensor. It works well, and gives the same results as other installed Android programs. Earlier, I noticed that the compass was 180 degrees off. I checked my other installed programs which have compass and they all were 180 degress off - hence it was a sensor problem, not a software problem. One of my installed programs has a "reset magnetometer" option which involves waiving the device in a figure 8 pattern. I invoked this option and shortly, the orientation sensor was giving correct readings again. I'd like to be able to do this within my own program.
I am converting my (B4PPC) GPSLog to B4A and have a compass driven by the orientation sensor. It works well, and gives the same results as other installed Android programs. Earlier, I noticed that the compass was 180 degrees off. I checked my other installed programs which have compass and they all were 180 degress off - hence it was a sensor problem, not a software problem. One of my installed programs has a "reset magnetometer" option which involves waiving the device in a figure 8 pattern. I invoked this option and shortly, the orientation sensor was giving correct readings again. I'd like to be able to do this within my own program.