magnav: fix calibration check

master
Erik Andresen 2023-02-27 21:30:40 +01:00
parent 864ef1b2bc
commit d92dee6246
1 changed files with 1 additions and 1 deletions

View File

@ -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;