Update Overview authored by Reid Schneyer's avatar Reid Schneyer
...@@ -95,13 +95,15 @@ void loop() { ...@@ -95,13 +95,15 @@ void loop() {
double relativeDegrees = TEN_BIT_SCALAR * (double) homePosition; double relativeDegrees = TEN_BIT_SCALAR * (double) homePosition;
double displayPosition = absoluteDegrees - relativeDegrees; double displayPosition = absoluteDegrees - relativeDegrees;
displayPosition += (displayPosition < 0) ? (360) : (0); displayPosition += (displayPosition < 0) ? (360) : (0);
if (NO_HANDSHAKE) { // if (NO_HANDSHAKE) {
// Serial.println(displayPosition);
// }
// else if (Serial.available() > 0 && Serial.read() == SEND_CODE) {
// Serial.println("DEBUG");
// Serial.println(displayPosition);
// }
Serial.println(displayPosition); Serial.println(displayPosition);
} delay(100);
else if (Serial.available() > 0 && Serial.read() == SEND_CODE) {
Serial.println("DEBUG");
Serial.println(displayPosition);
}
} }
else { // We're in rate mode else { // We're in rate mode
...@@ -116,7 +118,4 @@ void loop() { ...@@ -116,7 +118,4 @@ void loop() {
lastTime = currTime; lastTime = currTime;
lastReading = currReading; lastReading = currReading;
} }
``` ```
\ No newline at end of file