-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.h
70 lines (61 loc) · 1.29 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#ifndef CONFIG_H
#define CONFIG_H
// PIN CONFIGS
#define GPS_TX 4
#define GPS_RX 5
#define NRF240_CE_PIN 20
#define NRF240_CSN_PIN 17
int I2C_SDA = 8;
int I2C_SCL = 9;
#define SERVO1 6
#define SERVO2 7
#define MOTOR1 0
#define MOTOR2 1
#define MOTOR3 2
#define MOTOR4 3
#define MIN_PULSE_LENGTH 1000 // Minimum pulse length in µs
#define MAX_PULSE_LENGTH 2400 // Maximum pulse length in µs
// address mpu
#define MPU_ADDRESS 0x68
#define RADIO_TIMEOUT 250000 //in microsec converts to 250 millisec
// driveData units will be velocity(m/s) if data recived from onboard flight computer.
// driveData units will be accleration(m/s^2) if data recieved from ground control.
struct driveData {
short int x;
short int y;
short int z;
short int yr; //for head (r)otation / yaw
bool auxA;
bool auxB;
bool auxC;
bool auxD;
bool auxE;
bool auxF;
};
struct tuning {
short int joystickSensitivity;
short int obstructionWarning;
short int maxCruiseVelocity;
short int maxAcceleration;
};
struct threeAxis {
float x;
float y;
float z;
};
struct imuData {
threeAxis gyro;
threeAxis accel;
threeAxis mag;
};
struct dataTx {
threeAxis imuTx;
float altTx;
float lat;
float lon;
unsigned short sat;
float velocity;
bool valid;
};
#endif