|
| 1 | +/* CONSTANT | VALUE | UNIT | DESCRIPTION */ |
| 2 | +/*=========================================================*/ |
1 | 3 | // 1. Flapping waveform |
2 | | -#define FREQ 2.8 // Wingbeat frequency [hz]. Use lowest frequency that achieves flight |
3 | | -#define GAIN_WAVE 12.0 // Triangle wave to square wave gain (truncation). A larger gain makes the waveform become more square-like with more throttle |
4 | | - |
| 4 | +#define FREQ 2.8 // hz // Wingbeat frequency [hz]. Use lowest frequency that achieves flight |
| 5 | +#define GAIN_WAVE 12.0 /* Triangle wave to square wave gain (truncation). |
| 6 | + A larger gain makes the waveform become more square-like with more throttle */ |
5 | 7 | // 2. Control inputs [negate to reverse direction] |
6 | 8 | // I. Base inputs: |
7 | | -#define GAIN_PITCH 1.0 // Tail elevator |
8 | | -#define GAIN_ROLL 1.0 // Tail aileron |
9 | | -#define GAIN_THRT 0.8 // Flapping amplitude. Increases with more throttle |
10 | | -#define GAIN_YAW 0.4 // Differential amplitude. Controlled by rudder |
| 9 | +#define GAIN_PITCH 1.0 // Tail elevator |
| 10 | +#define GAIN_ROLL 1.0 // Tail aileron |
| 11 | +#define GAIN_THRT 0.8 // Flapping amplitude. Increases with more throttle |
| 12 | +#define GAIN_YAW 0.4 // Differential amplitude. Controlled by rudder |
11 | 13 | // II. Differential dihedral: |
12 | | -#define GAIN_PITCH_DH 0.0 // Pitch: symmetric dihedral |
13 | | -#define GAIN_ROLL_DH 0.0 // Roll: asymmetric dihedral |
| 14 | +#define GAIN_PITCH_DH 0.0 // Pitch: symmetric dihedral |
| 15 | +#define GAIN_ROLL_DH 0.0 // Roll: asymmetric dihedral |
14 | 16 | // III. Frequency modulation: |
15 | | -#define GAIN_PITCH_FM 0.0 // Pitch: wings fall at the same speed |
16 | | -#define GAIN_ROLL_FM 0.0 // Roll: One wing falls faster than the other |
| 17 | +#define GAIN_PITCH_FM 0.0 // Pitch: wings fall at the same speed |
| 18 | +#define GAIN_ROLL_FM 0.0 // Roll: One wing falls faster than the other |
17 | 19 |
|
18 | | -// 3. Servo trims [ms] |
19 | | -#define TRIM_LEFT 0 // left wing |
20 | | -#define TRIM_RIGHT -60 // right wing |
21 | | -#define TRIM_TLEFT 0 // left tail |
22 | | -#define TRIM_TRIGHT 50 // right tail |
| 20 | +// 3. Servo trims |
| 21 | +#define TRIM_LEFT 0 // us // left wing |
| 22 | +#define TRIM_RIGHT -60 // us // right wing |
| 23 | +#define TRIM_TLEFT 0 // us // left tail |
| 24 | +#define TRIM_TRIGHT 50 // us // right tail |
23 | 25 |
|
24 | | -// 4. Pitching moment correction [ms] |
25 | | -#define PITCH_TRIM_X 200 // Throttle PWM when trim reaches maximum value |
26 | | -#define PITCH_TRIM_Y -350 // Maximum pitch trim. Negate to reverse deflection |
| 26 | +// 4. Pitching moment correction |
| 27 | +#define PITCH_TRIM_X 200 // us // Throttle PWM when trim reaches maximum value |
| 28 | +#define PITCH_TRIM_Y -350 // us // Maximum pitch trim. Negate to reverse deflection |
27 | 29 |
|
28 | 30 | // 5. Low voltage cutoff [voltage divider] |
29 | | -#define RESISTOR_1 67000 // Resistor from ground -> middle [ohms] |
30 | | -#define RESISTOR_2 118000 // Resistor from middle -> voltage [ohms] |
31 | | -#define VOLT_CUT 6.0 // cutoff voltage |
32 | | -#define VOLT_MAX 8.4 // fully charged voltage |
| 31 | +#define RESISTOR_1 67000 // ohm // Resistor from ground -> middle |
| 32 | +#define RESISTOR_2 118000 // ohm // Resistor from middle -> voltage |
| 33 | +#define VOLT_CUT 6.0 // volt // cutoff voltage |
| 34 | +#define VOLT_MAX 8.4 // volt // fully charged voltage |
33 | 35 |
|
34 | 36 | // 6. Output PWM signal [all servos] |
35 | | -#define PWM_MID 1500 // Center/middle servo position |
36 | | -#define PWM_MIN 1100 // Minimum servo position |
37 | | -#define PWM_MAX 1900 // Maximum servo position |
| 37 | +#define PWM_MID 1500 // us // Center/middle servo position |
| 38 | +#define PWM_MIN 1100 // us // Minimum servo position |
| 39 | +#define PWM_MAX 1900 // us // Maximum servo position |
38 | 40 |
|
39 | 41 | // 7. Other |
40 | | -#define USE_TAIL_SERVOS // Comment line to dissable tail servo output (only control wings) |
| 42 | +#define USE_TAIL_SERVOS // Comment line to dissable tail servo output (only control wings) |
0 commit comments