mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Make ONE_G definition const and move to utils.ino
This commit is contained in:
parent
404ceed851
commit
c8109af04f
@ -11,6 +11,7 @@
|
||||
#define RATES_LFP_ALPHA 0.2 // cutoff frequency ~ 40 Hz
|
||||
|
||||
LowPassFilter<Vector> ratesFilter(RATES_LFP_ALPHA);
|
||||
extern const float ONE_G;
|
||||
|
||||
void estimate() {
|
||||
applyGyro();
|
||||
|
@ -18,8 +18,6 @@
|
||||
#define RC_CHANNEL_ARMED 4
|
||||
#define RC_CHANNEL_MODE 5
|
||||
|
||||
#define ONE_G 9.80665
|
||||
|
||||
float t = NAN; // current step time, s
|
||||
float dt; // time delta from previous step, s
|
||||
float loopRate; // loop rate, Hz
|
||||
|
@ -12,6 +12,8 @@ Vector accBias;
|
||||
Vector gyroBias;
|
||||
Vector accScale(1, 1, 1);
|
||||
|
||||
extern const float ONE_G;
|
||||
|
||||
void setupIMU() {
|
||||
Serial.println("Setup IMU");
|
||||
bool status = IMU.begin();
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <soc/soc.h>
|
||||
#include <soc/rtc_cntl_reg.h>
|
||||
|
||||
const float ONE_G = 9.80665;
|
||||
|
||||
float mapf(long x, long in_min, long in_max, float out_min, float out_max) {
|
||||
return (float)(x - in_min) * (out_max - out_min) / (float)(in_max - in_min) + out_min;
|
||||
}
|
||||
|
@ -11,11 +11,8 @@
|
||||
#include "wifi.h"
|
||||
|
||||
#define RC_CHANNELS 16
|
||||
|
||||
#define WIFI_ENABLED 1
|
||||
|
||||
#define ONE_G 9.80665
|
||||
|
||||
float t = NAN;
|
||||
float dt;
|
||||
float loopRate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user