diff options
author | Peter de Kok <p.j.s.d.kok@gmail.com> | 2015-06-05 09:23:15 +0200 |
---|---|---|
committer | Peter de Kok <p.j.s.d.kok@gmail.com> | 2015-06-05 09:23:15 +0200 |
commit | 2162548b098552880719d8d7fc174e63f59f2ff4 (patch) | |
tree | c0b95468803e5a18736ef3f10c0bf9b6a17939fd /Venus_Skeleton/Venus_Skeleton.ino | |
parent | 11bfabd85f4a51903fb7c26f8f0208b397fb3d7d (diff) | |
download | code-2162548b098552880719d8d7fc174e63f59f2ff4.tar.gz |
includes fixed
Compile errors fixed
Diffstat (limited to 'Venus_Skeleton/Venus_Skeleton.ino')
-rw-r--r-- | Venus_Skeleton/Venus_Skeleton.ino | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Venus_Skeleton/Venus_Skeleton.ino b/Venus_Skeleton/Venus_Skeleton.ino index 8877af6..60df676 100644 --- a/Venus_Skeleton/Venus_Skeleton.ino +++ b/Venus_Skeleton/Venus_Skeleton.ino @@ -27,7 +27,6 @@ #include <Servo.h> #include <HMC5883L.h> #include <Wire.h> -#include <Serial.h> #include <TrueRandom.h> // ********************** @@ -209,7 +208,7 @@ bool checkIfPiAlive() { } bool checkRPiActive() { - RPiActive = (lastCommunication + MAX_COMMUNICATION_DELAY) > millis()); + RPiActive = ((lastCommunication + MAX_COMMUNICATION_DELAY) > millis()); if(!RPiActive) { RPiActive = checkIfPiAlive(); @@ -605,7 +604,7 @@ int eliminateDirections(int directionArray[]) { // Incremental value for turret directions per robot direction float kinc = ((((float)NUM_TURRET_DIRECTIONS - 1) * 3.0) / (float)NUM_DIRECTIONS); // left most turret direction for this robot direction - int kinit = ((int)((float)(k % NUM_DIRECTIONS) + (float)NUM_DIRECTIONS / 6.0) % NUM_DIRECTIONS) * kinc - kinc; + int kinit = ((int)((float)(i % NUM_DIRECTIONS) + (float)NUM_DIRECTIONS / 6.0) % NUM_DIRECTIONS) * kinc - kinc; // for all turret directions relative to this robot direction, check obstacle sensor data for (int k = kinit; k <= (kinit + 2*kinc); k++) { if (k < 0) k = 0; |