-
Notifications
You must be signed in to change notification settings - Fork 0
/
Constants.h
66 lines (54 loc) · 1.09 KB
/
Constants.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
#ifndef Constants_h
#define Constants_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <inttypes.h>
#define NOTE_A3 220
#define NOTE_B3 247
#define NOTE_C4 262
#define NOTE_D4 294
#define NOTE_E4 330
#define THR_JOYSTICK A3
#define YAW_JOYSTICK A2
#define ROLL_JOYSTICK A1
#define PITCH_JOYSTICK A0
#define POT A4
#define TOGGLE 2
#define SPEAKER_PIN 3
//#define WAKE_PIN 10
#define YAW_MIN 0
#define YAW_OFFSET 385
#define YAW_MAX 814
#define ROLL_MIN 0
#define ROLL_OFFSET 358
#define ROLL_MAX 796
#define PITCH_MIN 0
#define PITCH_OFFSET 355
#define PITCH_MAX 788
#define THR_MIN 0
#define THR_OFFSET 25
#define THR_MAX 754
const int ESC_MIN = 800;
const int ESC_OFFSET = 1500;
const int ESC_MAX = 2000;
const int ESC_OFF = 767;
#define ANGLE_MIN 22
#define ANGLE_MAX 45
#define RATE_MIN 90
#define RATE_MAX 180
#define RATE_MODE true
#define STABILIZE_MODE false
#define THR_1 0
#define THR_2 1
#define YAW_1 2
#define YAW_2 3
#define ROLL_1 4
#define ROLL_2 5
#define PITCH_1 6
#define PITCH_2 7
#define POT_1 8
#define POT_2 9
#endif