Move most parameter defaults to config.h

This commit is contained in:
Oleg Kalachev
2026-08-10 03:45:28 +03:00
parent e6072b0bc4
commit ae8931cb25
6 changed files with 75 additions and 41 deletions
+5 -4
View File
@@ -6,16 +6,17 @@
#include <SPI.h>
#include <Wire.h>
#include <FlixPeriph.h>
#include "config.h"
#include "vector.h"
#include "filter.h"
#include "util.h"
IMU *imu;
int imuModel = -1; // 1 - MPU9250, 2 - ICM20948, 3 - MPU6050, 4 - ICM40609D
int imuBus = 0; // 0 - SPI, 1 - I2C
int imuSckPin = SCK, imuMisoPin = MISO, imuMosiPin = MOSI, imuCsPin = SS, imuIntPin = -1;
int imuModel = IMU_MODEL; // 1 - MPU9250, 2 - ICM20948, 3 - MPU6050, 4 - ICM40609D
int imuBus = IMU_BUS; // 0 - SPI, 1 - I2C
int imuSckPin = SCK, imuMisoPin = MISO, imuMosiPin = MOSI, imuCsPin = SS, imuIntPin = IMU_PIN_INT;
int imuSdaPin = SDA, imuSclPin = SCL;
Vector imuRotation(0, 0, PI / 2); // imu orientation as Euler angles
Vector imuRotation(IMU_ROT_ROLL, IMU_ROT_PITCH, IMU_ROT_YAW); // imu orientation as Euler angles
Vector gyro; // gyroscope output, rad/s
Vector gyroBias;