mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
Make dt=0 on first step, simplify code
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include "vector.h"
|
||||
#include "quaternion.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
#define RC_CHANNELS 6
|
||||
|
||||
@@ -15,7 +16,7 @@
|
||||
#define MOTOR_FRONT_RIGHT 2
|
||||
#define MOTOR_REAR_RIGHT 1
|
||||
|
||||
float t;
|
||||
float t = NAN;
|
||||
float dt;
|
||||
float loopFreq;
|
||||
float motors[4];
|
||||
@@ -27,6 +28,9 @@ Quaternion attitude;
|
||||
|
||||
// declarations
|
||||
void computeLoopFreq();
|
||||
void applyGyro();
|
||||
void applyAcc();
|
||||
void signalizeHorizontality();
|
||||
void control();
|
||||
void interpretRC();
|
||||
static void controlAttitude();
|
||||
|
Reference in New Issue
Block a user