Rev 371 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 371 | Rev 373 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | Please note: All the other files for the project "Mikrokopter" by H. Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
13 | Please note: All the other files for the project "Mikrokopter" by H. Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
14 | */ |
14 | */ |
Line 15... | Line 15... | ||
15 | 15 | ||
Line 16... | Line 16... | ||
16 | #include "main.h" |
16 | #include "main.h" |
Line 17... | Line 17... | ||
17 | 17 | ||
18 | MM3_working_struct MM3; |
18 | struct MM3_calib_struct ee_calib EEMEM; |
Line 19... | Line 19... | ||
19 | 19 | ||
20 | MM3_calib_struct ee_calib EEMEM; // Reservierung im EEPROM |
20 | struct MM3_working_struct MM3; |
21 | MM3_calib_struct MM3_calib; |
21 | struct MM3_calib_struct MM3_calib; |
Line 35... | Line 35... | ||
35 | 35 | ||
36 | MM3.AXIS = MM3_X; |
36 | MM3.AXIS = MM3_X; |
Line 37... | Line 37... | ||
37 | MM3.STATE = MM3_RESET; |
37 | MM3.STATE = MM3_RESET; |
38 | 38 | ||
39 | // Kalibrierung aus dem EEprom lesen |
39 | // Kalibrierung aus dem EEprom lesen |
Line 40... | Line 40... | ||
40 | eeprom_read_block(&MM3_calib,&ee_calib,sizeof(MM3_calib_struct)); |
40 | eeprom_read_block(&MM3_calib,&ee_calib,sizeof(struct MM3_calib_struct)); |
41 | } |
41 | } |
Line 166... | Line 166... | ||
166 | 166 | ||
167 | if (!beeper) |
167 | if (!beeper) |
168 | { |
168 | { |
169 | ROT_FLASH; |
169 | ROT_FLASH; |
- | 170 | GRN_FLASH; |
|
170 | GRN_FLASH; |
171 | //beeptime = 50; |
171 | beeper = 50; |
172 | beeper = 50; |
172 | } |
173 | } |
Line 173... | Line 174... | ||
173 | beeper--; |
174 | beeper--; |
174 | 175 | ||
175 | // Schleife mit 100 Hz voll ausreichend |
176 | // Schleife mit 100 Hz |
Line 176... | Line 177... | ||
176 | timer = SetDelay(10); |
177 | timer = SetDelay(10); |
177 | while(!CheckDelay(timer)); |
178 | while(!CheckDelay(timer)); |
178 | 179 | ||
Line 179... | Line 180... | ||
179 | // Wenn Gas zurück genommen wird, Kalibrierung mit Verzögerung beenden |
180 | // Wenn Gas zurück genommen wird, Kalibrierung mit 1/2 Sekunde Verzögerung beenden |
180 | if (PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] < 100) measurement--; |
181 | if (PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] < 100) measurement--; |
181 | } |
182 | } |
182 | 183 | ||
Line 183... | Line 184... | ||
183 | // Offset der Achsen berechnen |
184 | // Offset der Achsen berechnen |
184 | MM3_calib.X_off = (x_max + x_min) / 2; |
185 | MM3_calib.X_off = (x_max + x_min) / 2; |
Line 185... | Line 186... | ||
185 | MM3_calib.Y_off = (y_max + y_min) / 2; |
186 | MM3_calib.Y_off = (y_max + y_min) / 2; |
Line 186... | Line 187... | ||
186 | MM3_calib.Z_off = (z_max + z_min) / 2; |
187 | MM3_calib.Z_off = (z_max + z_min) / 2; |