mirror of https://github.com/espruino/BangleApps
parent
d92dee6246
commit
096b8721fa
|
@ -24,7 +24,7 @@ exports.calibrate = () => {
|
|||
|
||||
exports.tiltfix = (m,g,O,S) => {
|
||||
"ram"
|
||||
if (O && S) {
|
||||
if (O & S) {
|
||||
m.dx =(m.x-O.x)*S.x; m.dy=(m.y-O.y)*S.y; m.dz=(m.z-O.z)*S.z;
|
||||
}
|
||||
let d = Math.atan2(-m.dx,m.dy)*180/Math.PI;
|
||||
|
|
Loading…
Reference in New Issue