+ // Take acceleration from more affecting axel
+ if(calZ < calY)
+ {
+ z = z*(1+calZ/2);
+ currentAcceleration = z;
+ }
+ else
+ {
+ y = y*(1+calY/2);
+ currentAcceleration = -y;
+ }
+
+ //screen up: y = 0, z = -1
+ //screen front: y = -1, z = 0
+
+ //QString str = QString("acc x: " + QString::number(x) + "\n" +
+ // "acc y: " + QString::number(y) + "\n" +
+ // "acc z: " + QString::number(z) + "\n");
+
+ //currentAcceleration = z;//sqrt(x*x + y*y + z*z);
+ //qDebug("y: %f, calibZ: %f, calibY: %f\n",y,accelerometer->getCalibrationZ(),accelerometer->getCalibrationY());