package com.bran.android;

import android.util.Log;

import com.thalmic.myo.Myo;
import com.thalmic.myo.Vector3;

public class BicepCurl extends Exercise {

	private boolean down = true;
	private double minAngle = 1.2217; //70 degrees
	private double downAngle = 0.1745; //10 degrees

	public BicepCurl() {
		super("Bicep Curl",ExerciseType.BICEP_CURL);

	}

	@Override
	public void processData(Myo myo, long timestamp, Vector3 vector, DataType type) {

		// Process Data
		if(type.equals(DataType.GYROSCOPE)) {

			Log.i("BicepCurl Gyroscope","z: "+vector.z());
			if(started) {
				if(down && vector.z() > minAngle) {
					down = false;
					reps++;
				} else if (!down && vector.z() < downAngle)
					down = true;
				}
		  }
		}

	}

}

if(down && myo.getYaw() > minAngle) {
	down = false;
	reps++;
}
if(down = false && myo.getYaw() < downAngle) {
	down = true;
}

@@ -734,136 +734,7 @@
 %0A%0A%09%7D
-%0A%0A%7D%0A%0Aif(down && myo.getYaw() %3E minAngle) %7B%0A%09down = false;%0A%09reps++;%0A%7D%0Aif(down = false && myo.getYaw() %3C downAngle) %7B%0A%09down = true;
 %0A%7D%0A

remove something