mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
Make util module header instead of .ino-file
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "quaternion.h"
|
||||
#include "pid.h"
|
||||
#include "lpf.h"
|
||||
#include "util.h"
|
||||
|
||||
#define PITCHRATE_P 0.05
|
||||
#define PITCHRATE_I 0.2
|
||||
|
@@ -6,12 +6,12 @@
|
||||
#include "quaternion.h"
|
||||
#include "vector.h"
|
||||
#include "lpf.h"
|
||||
#include "util.h"
|
||||
|
||||
#define WEIGHT_ACC 0.5f
|
||||
#define RATES_LFP_ALPHA 0.2 // cutoff frequency ~ 40 Hz
|
||||
|
||||
LowPassFilter<Vector> ratesFilter(RATES_LFP_ALPHA);
|
||||
extern const float ONE_G;
|
||||
|
||||
void estimate() {
|
||||
applyGyro();
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "vector.h"
|
||||
#include "quaternion.h"
|
||||
#include "util.h"
|
||||
|
||||
#define SERIAL_BAUDRATE 115200
|
||||
#define WIFI_ENABLED 1
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MPU9250.h>
|
||||
#include "util.h"
|
||||
|
||||
MPU9250 IMU(SPI);
|
||||
|
||||
@@ -12,8 +13,6 @@ Vector accBias;
|
||||
Vector gyroBias;
|
||||
Vector accScale(1, 1, 1);
|
||||
|
||||
extern const float ONE_G;
|
||||
|
||||
void setupIMU() {
|
||||
Serial.println("Setup IMU");
|
||||
bool status = IMU.begin();
|
||||
|
@@ -4,6 +4,8 @@
|
||||
// Motors output control using MOSFETs
|
||||
// In case of using ESCs, change PWM_MIN and PWM_MAX definitions to appropriate values in μs
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#define MOTOR_0_PIN 12 // rear left
|
||||
#define MOTOR_1_PIN 13 // rear right
|
||||
#define MOTOR_2_PIN 14 // front right
|
||||
|
@@ -4,6 +4,7 @@
|
||||
// Work with the RC receiver
|
||||
|
||||
#include <SBUS.h>
|
||||
#include "util.h"
|
||||
|
||||
float channelNeutral[RC_CHANNELS] = {NAN}; // first element NAN means not calibrated
|
||||
float channelMax[RC_CHANNELS];
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
// Utility functions
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
#include <soc/soc.h>
|
||||
#include <soc/rtc_cntl_reg.h>
|
Reference in New Issue
Block a user