summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gyronardo.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/gyronardo.cpp b/src/gyronardo.cpp
index 63b4bfc..d8aaf0e 100644
--- a/src/gyronardo.cpp
+++ b/src/gyronardo.cpp
@@ -71,14 +71,10 @@ void setup()
<< "Gyro Z: " << sensor.gyro_cal_z << "\n";
sout << "Starting..." << endl;
-
- sout << "Pitch: " << sensor.getPitch() << " "
- << "Roll: " << sensor.getRoll() << endl;
}
void loop()
{
- /*
delay(SENSOR_THROTTLE_TIME);
if (!sensor.read())
@@ -87,25 +83,14 @@ void loop()
if (status == SensorStatus::THROTTLED)
{
- printSerial("Warning: The sensor was read too frequently and throttled");
- endl();
-
+ sout << "Warning: The sensor was read too frequently and throttled" << endl;
return;
}
- printSerial("Error: Failed to read sensor. Status: %d", static_cast<int>(status));
- endl();
-
+ sout << "Error: Failed to read sensor. Status: " << static_cast<int>(status)
+ << endl;
stop();
}
- char *pitch = floatToStr(sensor.getPitch(), FLOAT_WIDTH, FLOAT_PRECISION);
- char *roll = floatToStr(sensor.getRoll(), FLOAT_WIDTH, FLOAT_PRECISION);
-
- printSerial("\rPitch: %s Roll: %s", pitch, roll);
- Serial.flush();
-
- free(pitch);
- free(roll);
- */
+ sout << "Pitch: " << sensor.getPitch() << " Roll: " << sensor.getRoll() << endl;
}