summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter de Kok <p.j.s.d.kok@gmail.com>2015-06-17 10:32:08 +0200
committerPeter de Kok <p.j.s.d.kok@gmail.com>2015-06-17 10:32:08 +0200
commita849ba82c23427c51bc6f5121fb8ef5f3ff20fb8 (patch)
treeb9025707549a8615cc3a7080d156516095bed372
parent5ce7ca34daddf57b58ea247e1996449924fc0efb (diff)
downloadcode-a849ba82c23427c51bc6f5121fb8ef5f3ff20fb8.tar.gz
added some debug printspeter
-rw-r--r--Venus_Skeleton/Venus_Skeleton.ino10
1 files changed, 9 insertions, 1 deletions
diff --git a/Venus_Skeleton/Venus_Skeleton.ino b/Venus_Skeleton/Venus_Skeleton.ino
index 044becb..f28c942 100644
--- a/Venus_Skeleton/Venus_Skeleton.ino
+++ b/Venus_Skeleton/Venus_Skeleton.ino
@@ -794,26 +794,34 @@ void confirmSample(int turretVal) {
currValDirectionDegree += (x == 0 ? 0 : 10);
currValDirectionDegree *= sign;
+ DEBUG_PRINT("\n currvaldeg = ");
+ DEBUG_PRINT(currValDirectionDegree);
+
counterSampleConfirm++;
} else {
+ DEBUG_PRINT("\n currvaldeg = ");
+ DEBUG_PRINT(currValDirectionDegree);
// Check if a sample was seen by the gripperSampleDetector and the movement to drive the grippers over it are done
if (!counterMovement && counterSampleConfirm == 2) {
// Pick it up
+ DEBUG_PRINT("\n---GRAB SAMPLE");
opMode(OPMODE_GRABSAMPLE);
}
// Check if a sample is seen by the gripperSampleDetector
if (data.sample_gripper_detected && (counterSampleConfirm == 1 || counterSampleConfirm == 3)) {
stopMovement();
- DEBUG_PRINT("sample detected");
+ DEBUG_PRINT("\nsample detected");
currValDirectionDegree = 0;
counterSampleConfirm = 2;
}
// Check if movement has stopped (turn and forward), without seeing a sample (second turn). -> False positive
if (!counterMovement && counterSampleConfirm == 3) {
+ DEBUG_PRINT("\n---FALSE POSITIVE")
opMode(OPMODE_WAIT);
}
// Check if movement has stopped (turn and forward), without seeing a sample (first turn). -> Turn other way
if (!counterMovement && counterSampleConfirm == 1) {
+ DEBUG_PRINT("\ncheck other side");
int sign = currValDirectionDegree < 0 ? 1 : -1;
currValDirectionDegree = 60 * sign;
counterSampleConfirm = 3;