10-03-2020 14:26 - edited 10-03-2020 14:33
10-03-2020 14:26 - edited 10-03-2020 14:33
hello, I recently got the notification for the new sdk version but I am developing an app for the older versa devices, and the new sdk version broke all of the sensor readings and can't find a solution can someone help me? this all worked just fine before the new sdk release.
10-03-2020 15:06
10-03-2020 15:06
I was able to fix it but now the gyroscope and barometer isnt working when they worked before.
10-03-2020 15:07
10-03-2020 15:07
accel code: if (Accelerometer) {
const accel = new Accelerometer({ frequency: 1 });
accel.addEventListener("reading", () => {
accelData.text = JSON.stringify({
x: accel.x ? accel.x.toFixed(1) : 0,
y: accel.y ? accel.y.toFixed(1) : 0,
z: accel.z ? accel.z.toFixed(1) : 0
});
});
sensors.push(accel);
accel.start();
} else {
accelLabel.style.display = "none";
accelData.style.display = "none";
console.log("ERROR 404: failed to load Accelerometer info on fitbit because the sensor was not detected.");
}
gyro code:
if (Gyroscope) {
console.log("This device has a Gyroscope!");
const gyroscope = new Gyroscope({ frequency: 1 });
gyroscope.addEventListener("reading", () => {
console.log(
`Gyroscope Reading: \
timestamp=${gyroscope.timestamp}, \
[${gyroscope.x}, \
${gyroscope.y}, \
${gyroscope.z}]`
);
});
gyroscope.start();
} else {
console.log("This device does NOT have a Gyroscope, or is not loading correctly! divice cannot display gyroscope data!");
console.log("ERROR 404: failed to load gyroscope info on fitbit because the sensor was not detected.");
}
10-04-2020 16:57
10-04-2020 16:57
Is this on simulator or physical watch?