diff --git a/flix/imu.ino b/flix/imu.ino index 763fe8e..8bddc6b 100644 --- a/flix/imu.ino +++ b/flix/imu.ino @@ -17,7 +17,7 @@ void setupIMU() auto status = IMU.begin(); if (status < 0) { while (true) { - Serial.print("IMU begin error: "); Serial.println(status); + Serial.printf("IMU begin error: %d\n", status); delay(1000); } } diff --git a/flix/time.ino b/flix/time.ino index 5830ea1..b15a8fd 100644 --- a/flix/time.ino +++ b/flix/time.ino @@ -26,21 +26,3 @@ void step() { stepsPerSecondCurrentLast = time; } } - -void _step() { - steps++; - auto currentStepTime = micros(); - if (stepTime == 0) { - stepTime = currentStepTime; - } - dt = (currentStepTime - stepTime) / 1000000.0; - stepTime = currentStepTime; - - // compute steps per second, TODO: move to func - stepsPerSecondCurrent++; - if (stepTime - stepsPerSecondCurrentLast >= 1000000) { - stepsPerSecond = stepsPerSecondCurrent; - stepsPerSecondCurrent = 0; - stepsPerSecondCurrentLast = stepTime; - } -} diff --git a/gazebo/flix.h b/gazebo/flix.h index 6f90636..7f4c4dd 100644 --- a/gazebo/flix.h +++ b/gazebo/flix.h @@ -30,7 +30,6 @@ Quaternion attitude; void control(); void interpretRC(); static void controlAttitude(); -static void controlAttitudeAlter(); static void controlManual(); static void controlRate(); void desaturate(float& a, float& b, float& c, float& d);