*/
public static BNO055 getInstance(opmode_t mode, vector_type_t vectorType,
I2C.Port port, byte address) {
+
if (instance == null) {
- System.out.println("gyro called");
+
instance = new BNO055(port, address);
}
+
requestedMode = mode;
requestedVectorType = vectorType;
return instance;
// blocking manner. This sequence of events follows the process
// defined in the original adafruit source as closely as possible.
// XXX: It's likely some of these delays can be optimized out.
- System.out.println("State: " + state);
switch (state) {
case 0:
// Wait for the sensor to be present
break;
case 8:
if (currentTime >= nextTime) {
+
nextTime = Timer.getFPGATimestamp() + 1.05;
state++;
}
*/
public double getHeading() {
double reading = (xyz[0] + turns * 360);
+
if (zeroReferenceConst == 0)
return (xyz[0] + turns * 360);