diff --git a/flix/cli.ino b/flix/cli.ino index c2ca1f7..089f671 100644 --- a/flix/cli.ino +++ b/flix/cli.ino @@ -6,9 +6,8 @@ #include "pid.h" #include "vector.h" -extern PID rollRatePID, pitchRatePID, yawRatePID, rollPID, pitchPID; -extern LowPassFilter ratesFilter; extern const int MOTOR_REAR_LEFT, MOTOR_REAR_RIGHT, MOTOR_FRONT_RIGHT, MOTOR_FRONT_LEFT; +extern float loopRate; const char* motd = "\nWelcome to\n" diff --git a/flix/flix.ino b/flix/flix.ino index c13812b..632b846 100644 --- a/flix/flix.ino +++ b/flix/flix.ino @@ -20,7 +20,6 @@ float t = NAN; // current step time, s float dt; // time delta from previous step, s -float loopRate; // loop rate, Hz int16_t channels[RC_CHANNELS]; // raw rc channels float controls[RC_CHANNELS]; // normalized controls in range [-1..1] ([0..1] for throttle) float controlsTime; // time of the last controls update diff --git a/flix/time.ino b/flix/time.ino index da9f1c8..b57b5bc 100644 --- a/flix/time.ino +++ b/flix/time.ino @@ -3,6 +3,8 @@ // Time related functions +float loopRate; // Hz + void step() { float now = micros() / 1000000.0; dt = now - t; diff --git a/gazebo/flix.h b/gazebo/flix.h index 0a6e624..ba76abe 100644 --- a/gazebo/flix.h +++ b/gazebo/flix.h @@ -15,7 +15,6 @@ float t = NAN; float dt; -float loopRate; float motors[4]; int16_t channels[16]; // raw rc channels float controls[RC_CHANNELS];