mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = mPowerManager.newWakeLock(
PowerManager.SCREEN_BRIGHT_WAKE_LOCK
- | PowerManager.ACQUIRE_CAUSES_WAKEUP
- | PowerManager.ON_AFTER_RELEASE,
+ | PowerManager.ACQUIRE_CAUSES_WAKEUP,
getClass().getName());
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
public static final int VMAX = 16000;
public static final double r = 0.15;
- public final float alpha = 0.8f;
+ public final float alpha = 0.75f;
private short[] speed = new short[2];
private boolean isCancelled = true;
}
omega *= 2;
- speed[0] = (short)(-(v + (v>0 ? -r*omega : r*omega))*VMAX);
- speed[1] = (short)(-(v - (v>0 ? -r*omega : r*omega))*VMAX);
+ speed[0] = (short)(-((v + r*omega))*VMAX);
+ speed[1] = (short)(-(v - r*omega)*VMAX);
}
public void start() {