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