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