mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Cleanup, use printf
This commit is contained in:
parent
17edd0ee00
commit
1125335b16
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user