Store current time in float variable

This commit is contained in:
Oleg Kalachev
2023-05-26 16:23:30 +03:00
parent c5323f5723
commit c1aa0d9869
5 changed files with 31 additions and 35 deletions

View File

@@ -15,11 +15,9 @@
#define MOTOR_FRONT_RIGHT 2
#define MOTOR_REAR_RIGHT 1
uint32_t startTime;
uint32_t stepTime;
uint32_t steps;
float stepsPerSecond;
float t;
float dt;
float loopFreq;
float motors[4];
int16_t channels[16]; // raw rc channels WARNING: unsigned on hardware
float controls[RC_CHANNELS];
@@ -27,7 +25,8 @@ Vector acc;
Vector rates;
Quaternion attitude;
// control
// declarations
void computeLoopFreq();
void control();
void interpretRC();
static void controlAttitude();