Rev 2011 | Rev 2034 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2011 | Rev 2012 | ||
---|---|---|---|
1 | #ifndef _EEPROM_H |
1 | #ifndef _EEPROM_H |
2 | #define _EEPROM_H |
2 | #define _EEPROM_H |
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
5 | #include "twimaster.h" |
5 | #include "twimaster.h" |
6 | 6 | ||
7 | #define EEPARAM_REVISION 89 // is count up, if paramater stucture has changed (compatibility) |
7 | #define EEPARAM_REVISION 90 // is count up, if paramater stucture has changed (compatibility) |
8 | #define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility) |
8 | #define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility) |
9 | 9 | ||
10 | #define EEPROM_ADR_PARAM_BEGIN 0 |
10 | #define EEPROM_ADR_PARAM_BEGIN 0 |
11 | #define PID_EE_REVISION 1 // byte |
11 | #define PID_EE_REVISION 1 // byte |
12 | #define PID_ACTIVE_SET 2 // byte |
12 | #define PID_ACTIVE_SET 2 // byte |
13 | #define PID_PRESSURE_OFFSET 3 // byte |
13 | #define PID_PRESSURE_OFFSET 3 // byte |
14 | 14 | ||
15 | #define PID_ACC_NICK 4 // word |
15 | #define PID_ACC_NICK 4 // word |
16 | #define PID_ACC_ROLL 6 // word |
16 | #define PID_ACC_ROLL 6 // word |
17 | #define PID_ACC_TOP 8 // word |
17 | #define PID_ACC_TOP 8 // word |
18 | 18 | ||
19 | #define PID_FLIGHT_MINUTES_TOTAL 10 // word |
19 | #define PID_FLIGHT_MINUTES_TOTAL 10 // word |
20 | #define PID_FLIGHT_MINUTES 14 // word |
20 | #define PID_FLIGHT_MINUTES 14 // word |
21 | 21 | ||
22 | #define EEPROM_ADR_CHANNELS 80 // 80 - 93, 12 bytes + 1 byte crc |
22 | #define EEPROM_ADR_CHANNELS 80 // 80 - 93, 12 bytes + 1 byte crc |
23 | #define EEPROM_ADR_PARAMSET 100 // 100 - 650, 5 * 110 bytes |
23 | #define EEPROM_ADR_PARAMSET 100 // 100 - 650, 5 * 110 bytes |
24 | #define EEPROM_ADR_MIXERTABLE 1000 // 1000 - 1078, 78 bytes |
24 | #define EEPROM_ADR_MIXERTABLE 1000 // 1000 - 1078, 78 bytes |
25 | #define EEPROM_ADR_BLCONFIG 1200 // 1200 - 1296, 12 * 8 bytes |
25 | #define EEPROM_ADR_BLCONFIG 1200 // 1200 - 1296, 12 * 8 bytes |
26 | 26 | ||
27 | #define MIX_GAS 0 |
27 | #define MIX_GAS 0 |
28 | #define MIX_NICK 1 |
28 | #define MIX_NICK 1 |
29 | #define MIX_ROLL 2 |
29 | #define MIX_ROLL 2 |
30 | #define MIX_YAW 3 |
30 | #define MIX_YAW 3 |
31 | 31 | ||
32 | typedef struct |
32 | typedef struct |
33 | { |
33 | { |
34 | uint8_t Revision; |
34 | uint8_t Revision; |
35 | int8_t Name[12]; |
35 | int8_t Name[12]; |
36 | int8_t Motor[16][4]; |
36 | int8_t Motor[16][4]; |
37 | uint8_t crc; |
37 | uint8_t crc; |
38 | } __attribute__((packed)) MixerTable_t; |
38 | } __attribute__((packed)) MixerTable_t; |
39 | 39 | ||
40 | extern MixerTable_t Mixer; |
40 | extern MixerTable_t Mixer; |
41 | extern uint8_t RequiredMotors; |
41 | extern uint8_t RequiredMotors; |
42 | 42 | ||
43 | //GlobalConfig3 |
43 | //GlobalConfig3 |
44 | #define CFG3_NO_SDCARD_NO_START 0x01 |
44 | #define CFG3_NO_SDCARD_NO_START 0x01 |
45 | #define CFG3_DPH_MAX_RADIUS 0x02 |
45 | #define CFG3_DPH_MAX_RADIUS 0x02 |
46 | #define CFG3_VARIO_FAILSAFE 0x04 |
46 | #define CFG3_VARIO_FAILSAFE 0x04 |
47 | 47 | ||
48 | //GlobalConfig |
48 | //GlobalConfig |
49 | #define CFG_HOEHENREGELUNG 0x01 |
49 | #define CFG_HOEHENREGELUNG 0x01 |
50 | #define CFG_HOEHEN_SCHALTER 0x02 |
50 | #define CFG_HOEHEN_SCHALTER 0x02 |
51 | #define CFG_HEADING_HOLD 0x04 |
51 | #define CFG_HEADING_HOLD 0x04 |
52 | #define CFG_KOMPASS_AKTIV 0x08 |
52 | #define CFG_KOMPASS_AKTIV 0x08 |
53 | #define CFG_KOMPASS_FIX 0x10 |
53 | #define CFG_KOMPASS_FIX 0x10 |
54 | #define CFG_GPS_AKTIV 0x20 |
54 | #define CFG_GPS_AKTIV 0x20 |
55 | #define CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
55 | #define CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
56 | #define CFG_DREHRATEN_BEGRENZER 0x80 |
56 | #define CFG_DREHRATEN_BEGRENZER 0x80 |
57 | 57 | ||
58 | //BitConfig |
58 | //BitConfig |
59 | #define CFG_LOOP_OBEN 0x01 |
59 | #define CFG_LOOP_OBEN 0x01 |
60 | #define CFG_LOOP_UNTEN 0x02 |
60 | #define CFG_LOOP_UNTEN 0x02 |
61 | #define CFG_LOOP_LINKS 0x04 |
61 | #define CFG_LOOP_LINKS 0x04 |
62 | #define CFG_LOOP_RECHTS 0x08 |
62 | #define CFG_LOOP_RECHTS 0x08 |
63 | #define CFG_MOTOR_BLINK1 0x10 |
63 | #define CFG_MOTOR_BLINK1 0x10 |
64 | #define CFG_MOTOR_OFF_LED1 0x20 |
64 | #define CFG_MOTOR_OFF_LED1 0x20 |
65 | #define CFG_MOTOR_OFF_LED2 0x40 |
65 | #define CFG_MOTOR_OFF_LED2 0x40 |
66 | #define CFG_MOTOR_BLINK2 0x80 |
66 | #define CFG_MOTOR_BLINK2 0x80 |
67 | 67 | ||
68 | // ExtraConfig |
68 | // ExtraConfig |
69 | #define CFG2_HEIGHT_LIMIT 0x01 |
69 | #define CFG2_HEIGHT_LIMIT 0x01 |
70 | #define CFG2_VARIO_BEEP 0x02 |
70 | #define CFG2_VARIO_BEEP 0x02 |
71 | #define CFG_SENSITIVE_RC 0x04 |
71 | #define CFG_SENSITIVE_RC 0x04 |
72 | #define CFG_3_3V_REFERENCE 0x08 |
72 | #define CFG_3_3V_REFERENCE 0x08 |
73 | #define CFG_NO_RCOFF_BEEPING 0x10 |
73 | #define CFG_NO_RCOFF_BEEPING 0x10 |
74 | #define CFG_GPS_AID 0x20 |
74 | #define CFG_GPS_AID 0x20 |
75 | #define CFG_LEARNABLE_CAREFREE 0x40 |
75 | #define CFG_LEARNABLE_CAREFREE 0x40 |
76 | #define CFG_IGNORE_MAG_ERR_AT_STARTUP 0x80 |
76 | #define CFG_IGNORE_MAG_ERR_AT_STARTUP 0x80 |
77 | 77 | ||
78 | // bit mask for ParamSet.Config0 |
78 | // bit mask for ParamSet.Config0 |
79 | #define CFG0_AIRPRESS_SENSOR 0x01 |
79 | #define CFG0_AIRPRESS_SENSOR 0x01 |
80 | #define CFG0_HEIGHT_SWITCH 0x02 |
80 | #define CFG0_HEIGHT_SWITCH 0x02 |
81 | #define CFG0_HEADING_HOLD 0x04 |
81 | #define CFG0_HEADING_HOLD 0x04 |
82 | #define CFG0_COMPASS_ACTIVE 0x08 |
82 | #define CFG0_COMPASS_ACTIVE 0x08 |
83 | #define CFG0_COMPASS_FIX 0x10 |
83 | #define CFG0_COMPASS_FIX 0x10 |
84 | #define CFG0_GPS_ACTIVE 0x20 |
84 | #define CFG0_GPS_ACTIVE 0x20 |
85 | #define CFG0_AXIS_COUPLING_ACTIVE 0x40 |
85 | #define CFG0_AXIS_COUPLING_ACTIVE 0x40 |
86 | #define CFG0_ROTARY_RATE_LIMITER 0x80 |
86 | #define CFG0_ROTARY_RATE_LIMITER 0x80 |
87 | 87 | ||
88 | // defines for the receiver selection |
88 | // defines for the receiver selection |
89 | #define RECEIVER_PPM 0 |
89 | #define RECEIVER_PPM 0 |
90 | #define RECEIVER_SPEKTRUM 1 |
90 | #define RECEIVER_SPEKTRUM 1 |
91 | #define RECEIVER_SPEKTRUM_HI_RES 2 |
91 | #define RECEIVER_SPEKTRUM_HI_RES 2 |
92 | #define RECEIVER_SPEKTRUM_LOW_RES 3 |
92 | #define RECEIVER_SPEKTRUM_LOW_RES 3 |
93 | #define RECEIVER_JETI 4 |
93 | #define RECEIVER_JETI 4 |
94 | #define RECEIVER_ACT_DSL 5 |
94 | #define RECEIVER_ACT_DSL 5 |
95 | #define RECEIVER_HOTT 6 |
95 | #define RECEIVER_HOTT 6 |
96 | #define RECEIVER_SBUS 7 |
96 | #define RECEIVER_SBUS 7 |
97 | 97 | ||
98 | #define RECEIVER_UNKNOWN 0xFF |
98 | #define RECEIVER_UNKNOWN 0xFF |
99 | 99 | ||
100 | // defines for lookup ParamSet.ChannelAssignment |
100 | // defines for lookup ParamSet.ChannelAssignment |
101 | #define K_NICK 0 |
101 | #define K_NICK 0 |
102 | #define K_ROLL 1 |
102 | #define K_ROLL 1 |
103 | #define K_GAS 2 |
103 | #define K_GAS 2 |
104 | #define K_GIER 3 |
104 | #define K_GIER 3 |
105 | #define K_POTI1 4 |
105 | #define K_POTI1 4 |
106 | #define K_POTI2 5 |
106 | #define K_POTI2 5 |
107 | #define K_POTI3 6 |
107 | #define K_POTI3 6 |
108 | #define K_POTI4 7 |
108 | #define K_POTI4 7 |
109 | #define K_POTI5 8 |
109 | #define K_POTI5 8 |
110 | #define K_POTI6 9 |
110 | #define K_POTI6 9 |
111 | #define K_POTI7 10 |
111 | #define K_POTI7 10 |
112 | #define K_POTI8 11 |
112 | #define K_POTI8 11 |
113 | 113 | ||
114 | 114 | ||
115 | // values above 247 representing poti1 to poti8 |
115 | // values above 247 representing poti1 to poti8 |
116 | // poti1 = 255 |
116 | // poti1 = 255 |
117 | // poti2 = 254 |
117 | // poti2 = 254 |
118 | // poti3 = 253 |
118 | // poti3 = 253 |
119 | // poti4 = 252 |
119 | // poti4 = 252 |
120 | // poti5 = 251 |
120 | // poti5 = 251 |
121 | // poti6 = 250 |
121 | // poti6 = 250 |
122 | // poti7 = 249 |
122 | // poti7 = 249 |
123 | // poti8 = 248 |
123 | // poti8 = 248 |
124 | 124 | ||
125 | 125 | ||
126 | typedef struct |
126 | typedef struct |
127 | { |
127 | { |
128 | unsigned char Revision; |
128 | unsigned char Revision; |
129 | unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
129 | unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
130 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
130 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
131 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
131 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
132 | unsigned char Luftdruck_D; // Wert : 0-250 |
132 | unsigned char Luftdruck_D; // Wert : 0-250 |
133 | unsigned char MaxHoehe; // Wert : 0-32 |
133 | unsigned char MaxHoehe; // Wert : 0-32 |
134 | unsigned char Hoehe_P; // Wert : 0-32 |
134 | unsigned char Hoehe_P; // Wert : 0-32 |
135 | unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
135 | unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
136 | unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
136 | unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
137 | unsigned char Hoehe_HoverBand; // Wert : 0-250 |
137 | unsigned char Hoehe_HoverBand; // Wert : 0-250 |
138 | unsigned char Hoehe_GPS_Z; // Wert : 0-250 |
138 | unsigned char Hoehe_GPS_Z; // Wert : 0-250 |
139 | unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250 |
139 | unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250 |
140 | unsigned char Stick_P; // Wert : 1-6 |
140 | unsigned char Stick_P; // Wert : 1-6 |
141 | unsigned char Stick_D; // Wert : 0-64 |
141 | unsigned char Stick_D; // Wert : 0-64 |
142 | unsigned char StickGier_P; // Wert : 1-20 |
142 | unsigned char StickGier_P; // Wert : 1-20 |
143 | unsigned char Gas_Min; // Wert : 0-32 |
143 | unsigned char Gas_Min; // Wert : 0-32 |
144 | unsigned char Gas_Max; // Wert : 33-250 |
144 | unsigned char Gas_Max; // Wert : 33-250 |
145 | unsigned char GyroAccFaktor; // Wert : 1-64 |
145 | unsigned char GyroAccFaktor; // Wert : 1-64 |
146 | unsigned char KompassWirkung; // Wert : 0-32 |
146 | unsigned char KompassWirkung; // Wert : 0-32 |
147 | unsigned char Gyro_P; // Wert : 10-250 |
147 | unsigned char Gyro_P; // Wert : 10-250 |
148 | unsigned char Gyro_I; // Wert : 0-250 |
148 | unsigned char Gyro_I; // Wert : 0-250 |
149 | unsigned char Gyro_D; // Wert : 0-250 |
149 | unsigned char Gyro_D; // Wert : 0-250 |
150 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
150 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
151 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
151 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
152 | unsigned char Gyro_Stability; // Wert : 0-16 |
152 | unsigned char Gyro_Stability; // Wert : 0-16 |
153 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
153 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
154 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
154 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
155 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
155 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
156 | unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D |
156 | unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D |
157 | unsigned char I_Faktor; // Wert : 0-250 |
157 | unsigned char I_Faktor; // Wert : 0-250 |
158 | unsigned char UserParam1; // Wert : 0-250 |
158 | unsigned char UserParam1; // Wert : 0-250 |
159 | unsigned char UserParam2; // Wert : 0-250 |
159 | unsigned char UserParam2; // Wert : 0-250 |
160 | unsigned char UserParam3; // Wert : 0-250 |
160 | unsigned char UserParam3; // Wert : 0-250 |
161 | unsigned char UserParam4; // Wert : 0-250 |
161 | unsigned char UserParam4; // Wert : 0-250 |
162 | unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
162 | unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
163 | unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
163 | unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
164 | unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
164 | unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
165 | unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
165 | unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
166 | //--- Seit V0.75 |
166 | //--- Seit V0.75 |
167 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
167 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
168 | unsigned char ServoRollComp; // Wert : 0-250 |
168 | unsigned char ServoRollComp; // Wert : 0-250 |
169 | unsigned char ServoRollMin; // Wert : 0-250 |
169 | unsigned char ServoRollMin; // Wert : 0-250 |
170 | unsigned char ServoRollMax; // Wert : 0-250 |
170 | unsigned char ServoRollMax; // Wert : 0-250 |
171 | //--- |
171 | //--- |
172 | unsigned char ServoNickRefresh; // Speed of the Servo |
172 | unsigned char ServoNickRefresh; // Speed of the Servo |
173 | unsigned char ServoManualControlSpeed;// |
173 | unsigned char ServoManualControlSpeed;// |
174 | unsigned char CamOrientation; // |
174 | unsigned char CamOrientation; // |
175 | unsigned char Servo3; // Value or mapping of the Servo Output |
175 | unsigned char Servo3; // Value or mapping of the Servo Output |
176 | unsigned char Servo4; // Value or mapping of the Servo Output |
176 | unsigned char Servo4; // Value or mapping of the Servo Output |
177 | unsigned char Servo5; // Value or mapping of the Servo Output |
177 | unsigned char Servo5; // Value or mapping of the Servo Output |
178 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
178 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
179 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
179 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
180 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
180 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
181 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
181 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
182 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
182 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
183 | unsigned char CouplingYawCorrection; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
183 | unsigned char CouplingYawCorrection; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
184 | unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt |
184 | unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt |
185 | unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt |
185 | unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt |
186 | unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung) |
186 | unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung) |
187 | unsigned char Driftkomp; |
187 | unsigned char Driftkomp; |
188 | unsigned char DynamicStability; |
188 | unsigned char DynamicStability; |
189 | unsigned char UserParam5; // Wert : 0-250 |
189 | unsigned char UserParam5; // Wert : 0-250 |
190 | unsigned char UserParam6; // Wert : 0-250 |
190 | unsigned char UserParam6; // Wert : 0-250 |
191 | unsigned char UserParam7; // Wert : 0-250 |
191 | unsigned char UserParam7; // Wert : 0-250 |
192 | unsigned char UserParam8; // Wert : 0-250 |
192 | unsigned char UserParam8; // Wert : 0-250 |
193 | //---Output --------------------------------------------- |
193 | //---Output --------------------------------------------- |
194 | unsigned char J16Bitmask; // for the J16 Output |
194 | unsigned char J16Bitmask; // for the J16 Output |
195 | unsigned char J16Timing; // for the J16 Output |
195 | unsigned char J16Timing; // for the J16 Output |
196 | unsigned char J17Bitmask; // for the J17 Output |
196 | unsigned char J17Bitmask; // for the J17 Output |
197 | unsigned char J17Timing; // for the J17 Output |
197 | unsigned char J17Timing; // for the J17 Output |
198 | // seit version V0.75c |
198 | // seit version V0.75c |
199 | unsigned char WARN_J16_Bitmask; // for the J16 Output |
199 | unsigned char WARN_J16_Bitmask; // for the J16 Output |
200 | unsigned char WARN_J17_Bitmask; // for the J17 Output |
200 | unsigned char WARN_J17_Bitmask; // for the J17 Output |
201 | //---NaviCtrl--------------------------------------------- |
201 | //---NaviCtrl--------------------------------------------- |
202 | unsigned char NaviGpsModeControl; // Parameters for the Naviboard |
202 | unsigned char NaviGpsModeControl; // Parameters for the Naviboard |
203 | unsigned char NaviGpsGain; |
203 | unsigned char NaviGpsGain; |
204 | unsigned char NaviGpsP; |
204 | unsigned char NaviGpsP; |
205 | unsigned char NaviGpsI; |
205 | unsigned char NaviGpsI; |
206 | unsigned char NaviGpsD; |
206 | unsigned char NaviGpsD; |
207 | unsigned char NaviGpsPLimit; |
207 | unsigned char NaviGpsPLimit; |
208 | unsigned char NaviGpsILimit; |
208 | unsigned char NaviGpsILimit; |
209 | unsigned char NaviGpsDLimit; |
209 | unsigned char NaviGpsDLimit; |
210 | unsigned char NaviGpsACC; |
210 | unsigned char NaviGpsACC; |
211 | unsigned char NaviGpsMinSat; |
211 | unsigned char NaviGpsMinSat; |
212 | unsigned char NaviStickThreshold; |
212 | unsigned char NaviStickThreshold; |
213 | unsigned char NaviWindCorrection; |
213 | unsigned char NaviWindCorrection; |
214 | unsigned char NaviAccCompensation; // New since 0.86 -> was: SpeedCompensation |
214 | unsigned char NaviAccCompensation; // New since 0.86 -> was: SpeedCompensation |
215 | unsigned char NaviOperatingRadius; |
215 | unsigned char NaviOperatingRadius; |
216 | unsigned char NaviAngleLimitation; |
216 | unsigned char NaviAngleLimitation; |
217 | unsigned char NaviPH_LoginTime; |
217 | unsigned char NaviPH_LoginTime; |
218 | //---Ext.Ctrl--------------------------------------------- |
218 | //---Ext.Ctrl--------------------------------------------- |
219 | unsigned char ExternalControl; // for serial Control |
219 | unsigned char ExternalControl; // for serial Control |
220 | //---CareFree--------------------------------------------- |
220 | //---CareFree--------------------------------------------- |
221 | unsigned char OrientationAngle; // Where is the front-direction? |
221 | unsigned char OrientationAngle; // Where is the front-direction? |
222 | unsigned char CareFreeModeControl; // switch for CareFree |
222 | unsigned char CareFreeModeControl; // switch for CareFree |
223 | unsigned char MotorSafetySwitch; |
223 | unsigned char MotorSafetySwitch; |
224 | unsigned char MotorSmooth; |
224 | unsigned char MotorSmooth; |
225 | unsigned char ComingHomeAltitude; |
225 | unsigned char ComingHomeAltitude; |
226 | unsigned char FailSafeTime; |
226 | unsigned char FailSafeTime; |
227 | unsigned char MaxAltitude; |
227 | unsigned char MaxAltitude; |
228 | unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost" |
228 | unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost" |
- | 229 | unsigned char ServoFilterNick; |
|
- | 230 | unsigned char ServoFilterRoll; |
|
229 | //------------------------------------------------ |
231 | //------------------------------------------------ |
230 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
232 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
231 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll 0 oder 1 // WICHTIG!!! am Ende lassen |
233 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll 0 oder 1 // WICHTIG!!! am Ende lassen |
232 | unsigned char ExtraConfig; // bitcodiert |
234 | unsigned char ExtraConfig; // bitcodiert |
233 | unsigned char GlobalConfig3; // bitcodiert |
235 | unsigned char GlobalConfig3; // bitcodiert |
234 | char Name[12]; |
236 | char Name[12]; |
235 | unsigned char crc; // must be the last byte! |
237 | unsigned char crc; // must be the last byte! |
236 | } paramset_t; |
238 | } paramset_t; |
237 | 239 | ||
238 | #define PARAMSET_STRUCT_LEN sizeof(paramset_t) |
240 | #define PARAMSET_STRUCT_LEN sizeof(paramset_t) |
239 | 241 | ||
240 | extern paramset_t EE_Parameter; |
242 | extern paramset_t EE_Parameter; |
241 | 243 | ||
242 | extern uint8_t RAM_Checksum(uint8_t* pBuffer, uint16_t len); |
244 | extern uint8_t RAM_Checksum(uint8_t* pBuffer, uint16_t len); |
243 | 245 | ||
244 | extern void ParamSet_Init(void); |
246 | extern void ParamSet_Init(void); |
245 | extern void SetDefaultParameter(uint8_t set, uint8_t restore_channels); |
247 | extern void SetDefaultParameter(uint8_t set, uint8_t restore_channels); |
246 | 248 | ||
247 | extern uint8_t ParamSet_ReadFromEEProm(uint8_t setnumber); |
249 | extern uint8_t ParamSet_ReadFromEEProm(uint8_t setnumber); |
248 | extern uint8_t ParamSet_WriteToEEProm(uint8_t setnumber); |
250 | extern uint8_t ParamSet_WriteToEEProm(uint8_t setnumber); |
249 | 251 | ||
250 | extern uint8_t GetActiveParamSet(void); |
252 | extern uint8_t GetActiveParamSet(void); |
251 | extern void SetActiveParamSet(uint8_t setnumber); |
253 | extern void SetActiveParamSet(uint8_t setnumber); |
252 | 254 | ||
253 | extern uint8_t MixerTable_ReadFromEEProm(void); |
255 | extern uint8_t MixerTable_ReadFromEEProm(void); |
254 | extern uint8_t MixerTable_WriteToEEProm(void); |
256 | extern uint8_t MixerTable_WriteToEEProm(void); |
255 | 257 | ||
256 | extern uint8_t GetParamByte(uint16_t param_id); |
258 | extern uint8_t GetParamByte(uint16_t param_id); |
257 | extern void SetParamByte(uint16_t param_id, uint8_t value); |
259 | extern void SetParamByte(uint16_t param_id, uint8_t value); |
258 | extern uint16_t GetParamWord(uint16_t param_id); |
260 | extern uint16_t GetParamWord(uint16_t param_id); |
259 | extern void SetParamWord(uint16_t param_id, uint16_t value); |
261 | extern void SetParamWord(uint16_t param_id, uint16_t value); |
260 | 262 | ||
261 | 263 | ||
262 | #endif //_EEPROM_H |
264 | #endif //_EEPROM_H |
263 | 265 |