Rev 935 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 935 | Rev 936 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | 13 | ||
14 | #include <avr/eeprom.h> |
14 | #include <avr/eeprom.h> |
15 | #include <string.h> |
15 | #include <string.h> |
16 | #include "eeprom.h" |
16 | #include "eeprom.h" |
- | 17 | #include "printf_P.h" |
|
Line 17... | Line 18... | ||
17 | #include "printf_P.h" |
18 | #include "led.h" |
18 | 19 | ||
Line 35... | Line 36... | ||
35 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
36 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
36 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
37 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
37 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
38 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
38 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
39 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
39 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
40 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
40 | ParamSet.GlobalConfig = CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX;//0x01; |
41 | ParamSet.GlobalConfig = CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX; |
41 | ParamSet.Height_MinGas = 30; |
42 | ParamSet.Height_MinGas = 30; |
42 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
43 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
43 | ParamSet.Height_P = 10; // Wert : 0-32 |
44 | ParamSet.Height_P = 10; // Wert : 0-32 |
44 | ParamSet.Height_D = 30; // Wert : 0-250 |
45 | ParamSet.Height_D = 30; // Wert : 0-250 |
45 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
46 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
Line 56... | Line 57... | ||
56 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
57 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
57 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
58 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
58 | ParamSet.EmergencyGasDuration = 30; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
59 | ParamSet.EmergencyGasDuration = 30; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
59 | ParamSet.UfoArrangement = 0; // X oder + Formation |
60 | ParamSet.UfoArrangement = 0; // X oder + Formation |
60 | ParamSet.I_Factor = 32; |
61 | ParamSet.I_Factor = 32; |
61 | ParamSet.UserParam1 = 253; //zur freien Verwendung |
62 | ParamSet.UserParam1 = 0; //zur freien Verwendung |
62 | ParamSet.UserParam2 = 100; //zur freien Verwendung |
63 | ParamSet.UserParam2 = 0; //zur freien Verwendung |
63 | ParamSet.UserParam3 = 90; //zur freien Verwendung |
64 | ParamSet.UserParam3 = 0; //zur freien Verwendung |
64 | ParamSet.UserParam4 = 90; //zur freien Verwendung |
65 | ParamSet.UserParam4 = 0; //zur freien Verwendung |
65 | ParamSet.UserParam5 = 90; // zur freien Verwendung |
66 | ParamSet.UserParam5 = 0; // zur freien Verwendung |
66 | ParamSet.UserParam6 = 90; // zur freien Verwendung |
67 | ParamSet.UserParam6 = 0; // zur freien Verwendung |
67 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
68 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
68 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
69 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
69 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
70 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
70 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
71 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
71 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
72 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
Line 76... | Line 77... | ||
76 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
77 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
77 | ParamSet.LoopHysteresis = 50; |
78 | ParamSet.LoopHysteresis = 50; |
78 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
79 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
79 | ParamSet.Yaw_PosFeedback = 90; |
80 | ParamSet.Yaw_PosFeedback = 90; |
80 | ParamSet.Yaw_NegFeedback = 5; |
81 | ParamSet.Yaw_NegFeedback = 5; |
81 | ParamSet.AngleTurnOverNick = 100; |
82 | ParamSet.AngleTurnOverNick = 85; |
82 | ParamSet.AngleTurnOverRoll = 100; |
83 | ParamSet.AngleTurnOverRoll = 85; |
83 | ParamSet.GyroAccTrim = 16; // 1/k |
84 | ParamSet.GyroAccTrim = 16; // 1/k |
84 | ParamSet.DriftComp = 4; |
85 | ParamSet.DriftComp = 4; |
85 | ParamSet.DynamicStability = 100; |
86 | ParamSet.DynamicStability = 100; |
- | 87 | ParamSet.J16Bitmask = 95; |
|
- | 88 | ParamSet.J17Bitmask = 243; |
|
- | 89 | ParamSet.J16Timing = 15; |
|
- | 90 | ParamSet.J17Timing = 15; |
|
- | 91 | ParamSet.NaviGpsModeControl = 253; |
|
- | 92 | ParamSet.NaviGpsGain = 100; |
|
- | 93 | ParamSet.NaviGpsP = 90; |
|
- | 94 | ParamSet.NaviGpsI = 90; |
|
- | 95 | ParamSet.NaviGpsD = 90; |
|
- | 96 | ParamSet.NaviGpsACC = 0; |
|
- | 97 | ParamSet.NaviGpsMinSat = 6; |
|
- | 98 | ParamSet.NaviStickThreshold = 8; |
|
86 | memcpy(ParamSet.Name, "Sport\0",6); |
99 | memcpy(ParamSet.Name, "Sport\0",6); |
87 | } |
100 | } |
Line 88... | Line 101... | ||
88 | 101 | ||
Line 98... | Line 111... | ||
98 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
111 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
99 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
112 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
100 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
113 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
101 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
114 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
102 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
115 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
103 | ParamSet.GlobalConfig = CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX;//0x01; |
116 | ParamSet.GlobalConfig = CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX; |
104 | ParamSet.Height_MinGas = 30; |
117 | ParamSet.Height_MinGas = 30; |
105 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
118 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
106 | ParamSet.Height_P = 10; // Wert : 0-32 |
119 | ParamSet.Height_P = 10; // Wert : 0-32 |
107 | ParamSet.Height_D = 30; // Wert : 0-250 |
120 | ParamSet.Height_D = 30; // Wert : 0-250 |
108 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
121 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
Line 119... | Line 132... | ||
119 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
132 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
120 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
133 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
121 | ParamSet.EmergencyGasDuration = 30; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
134 | ParamSet.EmergencyGasDuration = 30; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
122 | ParamSet.UfoArrangement = 0; // X oder + Formation |
135 | ParamSet.UfoArrangement = 0; // X oder + Formation |
123 | ParamSet.I_Factor = 32; |
136 | ParamSet.I_Factor = 32; |
124 | ParamSet.UserParam1 = 253; // zur freien Verwendung |
137 | ParamSet.UserParam1 = 0; // zur freien Verwendung |
125 | ParamSet.UserParam2 = 100; // zur freien Verwendung |
138 | ParamSet.UserParam2 = 0; // zur freien Verwendung |
126 | ParamSet.UserParam3 = 90; // zur freien Verwendung |
139 | ParamSet.UserParam3 = 0; // zur freien Verwendung |
127 | ParamSet.UserParam4 = 90; // zur freien Verwendung |
140 | ParamSet.UserParam4 = 0; // zur freien Verwendung |
128 | ParamSet.UserParam5 = 90; // zur freien Verwendung |
141 | ParamSet.UserParam5 = 0; // zur freien Verwendung |
129 | ParamSet.UserParam6 = 90; // zur freien Verwendung |
142 | ParamSet.UserParam6 = 0; // zur freien Verwendung |
130 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
143 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
131 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
144 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
132 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
145 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
133 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
146 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
134 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
147 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
Line 139... | Line 152... | ||
139 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
152 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
140 | ParamSet.LoopHysteresis = 50; |
153 | ParamSet.LoopHysteresis = 50; |
141 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
154 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
142 | ParamSet.Yaw_PosFeedback = 90; // Faktor, mit dem Yaw die Achsen Roll und Nick verkoppelt |
155 | ParamSet.Yaw_PosFeedback = 90; // Faktor, mit dem Yaw die Achsen Roll und Nick verkoppelt |
143 | ParamSet.Yaw_NegFeedback = 5; |
156 | ParamSet.Yaw_NegFeedback = 5; |
144 | ParamSet.AngleTurnOverNick = 100; |
157 | ParamSet.AngleTurnOverNick = 85; |
145 | ParamSet.AngleTurnOverRoll = 100; |
158 | ParamSet.AngleTurnOverRoll = 85; |
146 | ParamSet.GyroAccTrim = 32; // 1/k |
159 | ParamSet.GyroAccTrim = 32; // 1/k |
147 | ParamSet.DriftComp = 4; |
160 | ParamSet.DriftComp = 4; |
148 | ParamSet.DynamicStability = 75; |
161 | ParamSet.DynamicStability = 75; |
- | 162 | ParamSet.J16Bitmask = 95; |
|
- | 163 | ParamSet.J17Bitmask = 243; |
|
- | 164 | ParamSet.J16Timing = 20; |
|
- | 165 | ParamSet.J17Timing = 20; |
|
- | 166 | ParamSet.NaviGpsModeControl = 253; |
|
- | 167 | ParamSet.NaviGpsGain = 100; |
|
- | 168 | ParamSet.NaviGpsP = 90; |
|
- | 169 | ParamSet.NaviGpsI = 90; |
|
- | 170 | ParamSet.NaviGpsD = 90; |
|
- | 171 | ParamSet.NaviGpsACC = 0; |
|
- | 172 | ParamSet.NaviGpsMinSat = 6; |
|
- | 173 | ParamSet.NaviStickThreshold = 8; |
|
149 | memcpy(ParamSet.Name, "Normal\0", 7); |
174 | memcpy(ParamSet.Name, "Normal\0", 7); |
150 | } |
175 | } |
Line 151... | Line 176... | ||
151 | 176 | ||
Line 161... | Line 186... | ||
161 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
186 | ParamSet.ChannelAssignment[CH_YAW] = 4; |
162 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
187 | ParamSet.ChannelAssignment[CH_POTI1] = 5; |
163 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
188 | ParamSet.ChannelAssignment[CH_POTI2] = 6; |
164 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
189 | ParamSet.ChannelAssignment[CH_POTI3] = 7; |
165 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
190 | ParamSet.ChannelAssignment[CH_POTI4] = 8; |
166 | ParamSet.GlobalConfig = CFG_ROTARY_RATE_LIMITER | CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX;//0x01; |
191 | ParamSet.GlobalConfig = CFG_ROTARY_RATE_LIMITER | CFG_AXIS_COUPLING_ACTIVE | CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE;//CFG_HEIGHT_CONTROL | CFG_HEIGHT_SWITCH | CFG_COMPASS_FIX; |
167 | ParamSet.Height_MinGas = 30; |
192 | ParamSet.Height_MinGas = 30; |
168 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
193 | ParamSet.MaxHeight = 251; // Wert : 0-250 251 -> Poti1 |
169 | ParamSet.Height_P = 10; // Wert : 0-32 |
194 | ParamSet.Height_P = 10; // Wert : 0-32 |
170 | ParamSet.Height_D = 30; // Wert : 0-250 |
195 | ParamSet.Height_D = 30; // Wert : 0-250 |
171 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
196 | ParamSet.Height_ACC_Effect = 30; // Wert : 0-250 |
Line 182... | Line 207... | ||
182 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
207 | ParamSet.LowVoltageWarning = 94; // Wert : 0-250 |
183 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
208 | ParamSet.EmergencyGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
184 | ParamSet.EmergencyGasDuration = 20; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
209 | ParamSet.EmergencyGasDuration = 20; // Wert : 0-250 // Zeit bis auf EmergencyGas geschaltet wird, wg. Rx-Problemen |
185 | ParamSet.UfoArrangement = 0; // X oder + Formation |
210 | ParamSet.UfoArrangement = 0; // X oder + Formation |
186 | ParamSet.I_Factor = 16; |
211 | ParamSet.I_Factor = 16; |
187 | ParamSet.UserParam1 = 253; // zur freien Verwendung |
212 | ParamSet.UserParam1 = 0; // zur freien Verwendung |
188 | ParamSet.UserParam2 = 100; // zur freien Verwendung |
213 | ParamSet.UserParam2 = 0; // zur freien Verwendung |
189 | ParamSet.UserParam3 = 90; // zur freien Verwendung |
214 | ParamSet.UserParam3 = 0; // zur freien Verwendung |
190 | ParamSet.UserParam4 = 90; // zur freien Verwendung |
215 | ParamSet.UserParam4 = 0; // zur freien Verwendung |
191 | ParamSet.UserParam5 = 90; // zur freien Verwendung |
216 | ParamSet.UserParam5 = 0; // zur freien Verwendung |
192 | ParamSet.UserParam6 = 90; // zur freien Verwendung |
217 | ParamSet.UserParam6 = 0; // zur freien Verwendung |
193 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
218 | ParamSet.UserParam7 = 0; // zur freien Verwendung |
194 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
219 | ParamSet.UserParam8 = 0; // zur freien Verwendung |
195 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
220 | ParamSet.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
196 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
221 | ParamSet.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
197 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
222 | ParamSet.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
Line 202... | Line 227... | ||
202 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
227 | ParamSet.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
203 | ParamSet.LoopHysteresis = 50; |
228 | ParamSet.LoopHysteresis = 50; |
204 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
229 | ParamSet.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
205 | ParamSet.Yaw_PosFeedback = 90; // Faktor, mit dem Yaw die Achsen Roll und Nick verkoppelt |
230 | ParamSet.Yaw_PosFeedback = 90; // Faktor, mit dem Yaw die Achsen Roll und Nick verkoppelt |
206 | ParamSet.Yaw_NegFeedback = 5; |
231 | ParamSet.Yaw_NegFeedback = 5; |
207 | ParamSet.AngleTurnOverNick = 100; |
232 | ParamSet.AngleTurnOverNick = 85; |
208 | ParamSet.AngleTurnOverRoll = 100; |
233 | ParamSet.AngleTurnOverRoll = 85; |
209 | ParamSet.GyroAccTrim = 32; // 1/k |
234 | ParamSet.GyroAccTrim = 32; // 1/k |
210 | ParamSet.DriftComp = 4; |
235 | ParamSet.DriftComp = 4; |
211 | ParamSet.DynamicStability = 50; |
236 | ParamSet.DynamicStability = 50; |
- | 237 | ParamSet.J16Bitmask = 95; |
|
- | 238 | ParamSet.J17Bitmask = 243; |
|
- | 239 | ParamSet.J16Timing = 30; |
|
- | 240 | ParamSet.J17Timing = 30; |
|
- | 241 | ParamSet.NaviGpsModeControl = 253; |
|
- | 242 | ParamSet.NaviGpsGain = 100; |
|
- | 243 | ParamSet.NaviGpsP = 90; |
|
- | 244 | ParamSet.NaviGpsI = 90; |
|
- | 245 | ParamSet.NaviGpsD = 90; |
|
- | 246 | ParamSet.NaviGpsACC = 0; |
|
- | 247 | ParamSet.NaviGpsMinSat = 6; |
|
- | 248 | ParamSet.NaviStickThreshold = 8; |
|
212 | memcpy(ParamSet.Name, "Beginner\0", 9); |
249 | memcpy(ParamSet.Name, "Beginner\0", 9); |
213 | } |
250 | } |
Line 214... | Line 251... | ||
214 | 251 | ||
215 | /***************************************************/ |
252 | /***************************************************/ |
Line 251... | Line 288... | ||
251 | // number [0..5] |
288 | // number [0..5] |
252 | void ParamSet_ReadFromEEProm(uint8_t setnumber) |
289 | void ParamSet_ReadFromEEProm(uint8_t setnumber) |
253 | { |
290 | { |
254 | if (setnumber > 5) setnumber = 5; |
291 | if (setnumber > 5) setnumber = 5; |
255 | eeprom_read_block((uint8_t *) &ParamSet.ChannelAssignment[0], &EEPromArray[EEPROM_ADR_PARAMSET_BEGIN + PARAMSET_STRUCT_LEN * setnumber], PARAMSET_STRUCT_LEN); |
292 | eeprom_read_block((uint8_t *) &ParamSet.ChannelAssignment[0], &EEPromArray[EEPROM_ADR_PARAMSET_BEGIN + PARAMSET_STRUCT_LEN * setnumber], PARAMSET_STRUCT_LEN); |
- | 293 | LED_Init(); |
|
256 | } |
294 | } |
Line 257... | Line 295... | ||
257 | 295 | ||
258 | /***************************************************/ |
296 | /***************************************************/ |
259 | /* Write Parameter Set to EEPROM */ |
297 | /* Write Parameter Set to EEPROM */ |
Line 263... | Line 301... | ||
263 | { |
301 | { |
264 | if(setnumber > 5) setnumber = 5; |
302 | if(setnumber > 5) setnumber = 5; |
265 | eeprom_write_block((uint8_t *) &ParamSet.ChannelAssignment[0], &EEPromArray[EEPROM_ADR_PARAMSET_BEGIN + PARAMSET_STRUCT_LEN * setnumber], PARAMSET_STRUCT_LEN); |
303 | eeprom_write_block((uint8_t *) &ParamSet.ChannelAssignment[0], &EEPromArray[EEPROM_ADR_PARAMSET_BEGIN + PARAMSET_STRUCT_LEN * setnumber], PARAMSET_STRUCT_LEN); |
266 | // set this parameter set to active set |
304 | // set this parameter set to active set |
267 | eeprom_write_byte(&EEPromArray[PID_ACTIVE_SET], setnumber); |
305 | eeprom_write_byte(&EEPromArray[PID_ACTIVE_SET], setnumber); |
- | 306 | LED_Init(); |
|
268 | } |
307 | } |
Line 269... | Line 308... | ||
269 | 308 | ||
270 | /***************************************************/ |
309 | /***************************************************/ |
271 | /* Get active parameter set */ |
310 | /* Get active parameter set */ |