Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1754 - 1
   1               		.file	"main.c"
2
   2               		.arch atmega644p
3
   3               	__SREG__ = 0x3f
4
   4               	__SP_H__ = 0x3e
5
   5               	__SP_L__ = 0x3d
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.global __do_copy_data
9
   9               		.global __do_clear_bss
10
  10               	.global	FoundMotors
11
  11               	.global	FoundMotors
12
  12               		.section .bss
13
  15               	FoundMotors:
14
  16 0000 00        		.skip 1,0
15
  17               	.global	FlugSekunden
16
  18               	.global	FlugSekunden
17
  21               	FlugSekunden:
18
  22 0001 0000      		.skip 2,0
19
  23               	.global	FlugMinutenGesamt
20
  24               	.global	FlugMinutenGesamt
21
  27               	FlugMinutenGesamt:
22
  28 0003 0000      		.skip 2,0
23
  29               	.global	FlugMinuten
24
  30               	.global	FlugMinuten
25
  33               	FlugMinuten:
26
  34 0005 0000      		.skip 2,0
27
  35               	.global	BattLowVoltageWarning
28
  36               		.data
29
  39               	BattLowVoltageWarning:
30
  40 0000 5E        		.byte	94
31
  41               	.global	SendVersionToNavi
32
  44               	SendVersionToNavi:
33
  45 0001 01        		.byte	1
34
  46               	.global	PlatinenVersion
35
  49               	PlatinenVersion:
36
  50 0002 0A        		.byte	10
37
  53               	stick.15:
38
  54 0003 01        		.byte	1
39
  55               		.text
40
  56               	.global	CalMk3Mag
41
  58               	CalMk3Mag:
42
  59               	/* prologue: frame size=0 */
43
  60               	/* prologue end (size=0) */
44
  61 0000 8091 0000 		lds r24,EE_Parameter+1
45
  62 0004 E82F      		mov r30,r24
46
  63 0006 FF27      		clr r31
47
  64 0008 EE0F      		add r30,r30
48
  65 000a FF1F      		adc r31,r31
49
  66 000c E050      		subi r30,lo8(-(PPM_in))
50
  67 000e F040      		sbci r31,hi8(-(PPM_in))
51
  68 0010 8081      		ld r24,Z
52
  69 0012 9181      		ldd r25,Z+1
53
  70 0014 8D5E      		subi r24,lo8(-19)
54
  71 0016 9F4F      		sbci r25,hi8(-19)
55
  72 0018 14F0      		brlt .L2
56
  73 001a 1092 0000 		sts stick.15,__zero_reg__
57
  74               	.L2:
58
  75 001e 8081      		ld r24,Z
59
  76 0020 9181      		ldd r25,Z+1
60
  77 0022 8A5B      		subi r24,lo8(-70)
61
  78 0024 9F4F      		sbci r25,hi8(-70)
62
  79 0026 CCF4      		brge .L3
63
  80 0028 8091 0000 		lds r24,stick.15
64
  81 002c 8823      		tst r24
65
  82 002e A9F4      		brne .L3
66
  83 0030 81E0      		ldi r24,lo8(1)
67
  84 0032 8093 0000 		sts stick.15,r24
68
  85 0036 8091 0000 		lds r24,WinkelOut+6
69
  86 003a 8F5F      		subi r24,lo8(-(1))
70
  87 003c 8093 0000 		sts WinkelOut+6,r24
71
  88 0040 8530      		cpi r24,lo8(5)
72
  89 0042 38F0      		brlo .L4
73
  90 0044 88EE      		ldi r24,lo8(1000)
74
  91 0046 93E0      		ldi r25,hi8(1000)
75
  92 0048 9093 0000 		sts (beeptime)+1,r25
76
  93 004c 8093 0000 		sts beeptime,r24
77
  94 0050 04C0      		rjmp .L3
78
  95               	.L4:
79
  96 0052 66E9      		ldi r22,lo8(150)
80
  97 0054 70E0      		ldi r23,hi8(150)
81
  98 0056 0E94 0000 		call Piep
82
  99               	.L3:
83
 100 005a 8091 0000 		lds r24,WinkelOut+6
84
 101 005e 9927      		clr r25
85
 102 0060 9093 0000 		sts (DebugOut+40)+1,r25
86
 103 0064 8093 0000 		sts DebugOut+40,r24
87
 104               	/* epilogue: frame size=0 */
88
 105 0068 0895      		ret
89
 106               	/* epilogue end (size=1) */
90
 107               	/* function CalMk3Mag size 55 (54) */
91
 109               		.section	.progmem.data,"a",@progbits
92
 112               	__c.12:
93
 113 0000 0A0D 4261 		.string	"\n\rBatt:"
94
 113      7474 3A00
95
 116               	__c.13:
96
 117 0008 2025 6420 		.string	" %d Cells "
97
 117      4365 6C6C
98
 117      7320 00
99
 120               	__c.14:
100
 121 0013 204C 6F77 		.string	" Low warning level: %d.%d"
101
 121      2077 6172
102
 121      6E69 6E67
103
 121      206C 6576
104
 121      656C 3A20
105
 122               		.text
106
 123               	.global	LipoDetection
107
 125               	LipoDetection:
108
 126               	/* prologue: frame size=0 */
109
 127 006a 1F93      		push r17
110
 128 006c CF93      		push r28
111
 129 006e DF93      		push r29
112
 130               	/* prologue end (size=3) */
113
 131 0070 182F      		mov r17,r24
114
 132 0072 8823      		tst r24
115
 133 0074 89F0      		breq .L7
116
 134 0076 80E0      		ldi r24,lo8(__c.12)
117
 135 0078 90E0      		ldi r25,hi8(__c.12)
118
 136 007a 9F93      		push r25
119
 137 007c 8F93      		push r24
120
 138 007e 80E0      		ldi r24,lo8(pm(uart_putchar))
121
 139 0080 90E0      		ldi r25,hi8(pm(uart_putchar))
122
 140 0082 9F93      		push r25
123
 141 0084 8F93      		push r24
124
 142 0086 E091 0000 		lds r30,_printf_P
125
 143 008a F091 0000 		lds r31,(_printf_P)+1
126
 144 008e 0995      		icall
127
 145 0090 0F90      		pop __tmp_reg__
128
 146 0092 0F90      		pop __tmp_reg__
129
 147 0094 0F90      		pop __tmp_reg__
130
 148 0096 0F90      		pop __tmp_reg__
131
 149               	.L7:
132
 150 0098 8091 0000 		lds r24,EE_Parameter+36
133
 151 009c 8233      		cpi r24,lo8(50)
134
 152 009e 08F0      		brlo .+2
135
 153 00a0 44C0      		rjmp .L8
136
 154 00a2 84EF      		ldi r24,lo8(500)
137
 155 00a4 91E0      		ldi r25,hi8(500)
138
 156 00a6 0E94 0000 		call SetDelay
139
 157 00aa EC01      		movw r28,r24
140
 158 00ac 1123      		tst r17
141
 159 00ae 29F0      		breq .L9
142
 160               	.L10:
143
 161 00b0 CE01      		movw r24,r28
144
 162 00b2 0E94 0000 		call CheckDelay
145
 163 00b6 8823      		tst r24
146
 164 00b8 D9F3      		breq .L10
147
 165               	.L9:
148
 166 00ba C2E0      		ldi r28,lo8(2)
149
 167 00bc D0E0      		ldi r29,hi8(2)
150
 168 00be 26E5      		ldi r18,lo8(86)
151
 169 00c0 30E0      		ldi r19,hi8(86)
152
 170               	.L17:
153
 171 00c2 8091 0000 		lds r24,UBat
154
 172 00c6 9091 0000 		lds r25,(UBat)+1
155
 173 00ca 8217      		cp r24,r18
156
 174 00cc 9307      		cpc r25,r19
157
 175 00ce 30F0      		brlo .L14
158
 176 00d0 2196      		adiw r28,1
159
 177 00d2 255D      		subi r18,lo8(-(43))
160
 178 00d4 3F4F      		sbci r19,hi8(-(43))
161
 179 00d6 C730      		cpi r28,7
162
 180 00d8 D105      		cpc r29,__zero_reg__
163
 181 00da 98F3      		brlo .L17
164
 182               	.L14:
165
 183 00dc 8091 0000 		lds r24,EE_Parameter+36
166
 184 00e0 9927      		clr r25
167
 185 00e2 C89F      		mul r28,r24
168
 186 00e4 9001      		movw r18,r0
169
 187 00e6 C99F      		mul r28,r25
170
 188 00e8 300D      		add r19,r0
171
 189 00ea D89F      		mul r29,r24
172
 190 00ec 300D      		add r19,r0
173
 191 00ee 1124      		clr r1
174
 192 00f0 2093 0000 		sts BattLowVoltageWarning,r18
175
 193 00f4 1123      		tst r17
176
 194 00f6 D9F0      		breq .L19
177
 195 00f8 68EC      		ldi r22,lo8(200)
178
 196 00fa 70E0      		ldi r23,hi8(200)
179
 197 00fc 8C2F      		mov r24,r28
180
 198 00fe 0E94 0000 		call Piep
181
 199 0102 DF93      		push r29
182
 200 0104 CF93      		push r28
183
 201 0106 80E0      		ldi r24,lo8(__c.13)
184
 202 0108 90E0      		ldi r25,hi8(__c.13)
185
 203 010a 9F93      		push r25
186
 204 010c 8F93      		push r24
187
 205 010e 80E0      		ldi r24,lo8(pm(uart_putchar))
188
 206 0110 90E0      		ldi r25,hi8(pm(uart_putchar))
189
 207 0112 9F93      		push r25
190
 208 0114 8F93      		push r24
191
 209 0116 E091 0000 		lds r30,_printf_P
192
 210 011a F091 0000 		lds r31,(_printf_P)+1
193
 211 011e 0995      		icall
194
 212 0120 8DB7      		in r24,__SP_L__
195
 213 0122 9EB7      		in r25,__SP_H__
196
 214 0124 0696      		adiw r24,6
197
 215 0126 8DBF      		out __SP_L__,r24
198
 216 0128 02C0      		rjmp .L19
199
 217               	.L8:
200
 218 012a 8093 0000 		sts BattLowVoltageWarning,r24
201
 219               	.L19:
202
 220 012e 1123      		tst r17
203
 221 0130 11F1      		breq .L6
204
 222 0132 8091 0000 		lds r24,BattLowVoltageWarning
205
 223 0136 6AE0      		ldi r22,lo8(10)
206
 224 0138 0E94 0000 		call __udivmodqi4
207
 225 013c 892F      		mov r24,r25
208
 226 013e 9927      		clr r25
209
 227 0140 9F93      		push r25
210
 228 0142 8F93      		push r24
211
 229 0144 8091 0000 		lds r24,BattLowVoltageWarning
212
 230 0148 0E94 0000 		call __udivmodqi4
213
 231 014c 9927      		clr r25
214
 232 014e 9F93      		push r25
215
 233 0150 8F93      		push r24
216
 234 0152 80E0      		ldi r24,lo8(__c.14)
217
 235 0154 90E0      		ldi r25,hi8(__c.14)
218
 236 0156 9F93      		push r25
219
 237 0158 8F93      		push r24
220
 238 015a 80E0      		ldi r24,lo8(pm(uart_putchar))
221
 239 015c 90E0      		ldi r25,hi8(pm(uart_putchar))
222
 240 015e 9F93      		push r25
223
 241 0160 8F93      		push r24
224
 242 0162 E091 0000 		lds r30,_printf_P
225
 243 0166 F091 0000 		lds r31,(_printf_P)+1
226
 244 016a 0995      		icall
227
 245 016c 2DB7      		in r18,__SP_L__
228
 246 016e 3EB7      		in r19,__SP_H__
229
 247 0170 285F      		subi r18,lo8(-(8))
230
 248 0172 3F4F      		sbci r19,hi8(-(8))
231
 249 0174 2DBF      		out __SP_L__,r18
232
 250               	.L6:
233
 251               	/* epilogue: frame size=0 */
234
 252 0176 DF91      		pop r29
235
 253 0178 CF91      		pop r28
236
 254 017a 1F91      		pop r17
237
 255 017c 0895      		ret
238
 256               	/* epilogue end (size=4) */
239
 257               	/* function LipoDetection size 138 (131) */
240
 259               		.section	.progmem.data
241
 262               	__c.0:
242
 263 002d 0A0D 466F 		.string	"\n\rFound BL-Ctrl: "
243
 263      756E 6420
244
 263      424C 2D43
245
 263      7472 6C3A
246
 263      2000
247
 266               	__c.1:
248
 267 003f 2564 00   		.string	"%d"
249
 270               	__c.2:
250
 271 0042 0A0D 0A0D 		.string	"\n\r\n\r!! MISSING BL-CTRL: %d !!"
251
 271      2121 204D
252
 271      4953 5349
253
 271      4E47 2042
254
 271      4C2D 4354
255
 274               	__c.3:
256
 275 0060 0A0D 3D3D 		.string	"\n\r==================================="
257
 275      3D3D 3D3D
258
 275      3D3D 3D3D
259
 275      3D3D 3D3D
260
 275      3D3D 3D3D
261
 278               	__c.4:
262
 279 0086 0A0D 4361 		.string	"\n\rCalibrating pressure sensor.."
263
 279      6C69 6272
264
 279      6174 696E
265
 279      6720 7072
266
 279      6573 7375
267
 282               	__c.5:
268
 283 00a6 4F4B 0A0D 		.string	"OK\n\r"
269
 283      00
270
 286               	__c.6:
271
 287 00ab 0A0D 466C 		.string	"\n\rFlight-time %u min  Total:%u min"
272
 287      6967 6874
273
 287      2D74 696D
274
 287      6520 2575
275
 287      206D 696E
276
 290               	__c.7:
277
 291 00ce 0A0D 436F 		.string	"\n\rControl: "
278
 291      6E74 726F
279
 291      6C3A 2000
280
 294               	__c.8:
281
 295 00da 4865 6164 		.string	"HeadingHold"
282
 295      696E 6748
283
 295      6F6C 6400
284
 298               	__c.9:
285
 299 00e6 4E6F 726D 		.string	"Normal (ACC-Mode)"
286
 299      616C 2028
287
 299      4143 432D
288
 299      4D6F 6465
289
 299      2900
290
 302               	__c.10:
291
 303 00f8 0A0D 3D3D 		.string	"\n\r===================================\n\r"
292
 303      3D3D 3D3D
293
 303      3D3D 3D3D
294
 303      3D3D 3D3D
295
 303      3D3D 3D3D
296
 304               		.lcomm second.11,1
297
 305               		.text
298
 306               	.global	main
299
 308               	main:
300
 309               	/* prologue: frame size=0 */
301
 310 017e C0E0      		ldi r28,lo8(__stack - 0)
302
 311 0180 D0E0      		ldi r29,hi8(__stack - 0)
303
 312 0182 DEBF      		out __SP_H__,r29
304
 313 0184 CDBF      		out __SP_L__,r28
305
 314               	/* prologue end (size=4) */
306
 315 0186 8824      		clr r8
307
 316 0188 9924      		clr r9
308
 317 018a 14B8      		out 36-0x20,__zero_reg__
309
 318 018c 15B8      		out 37-0x20,__zero_reg__
310
 319 018e 07EE      		ldi r16,lo8(999)
311
 320 0190 13E0      		ldi r17,hi8(999)
312
 321               	.L26:
313
 322 0192 0253      		subi r16,lo8(-(-50))
314
 323 0194 1040      		sbci r17,hi8(-(-50))
315
 324 0196 17FF      		sbrs r17,7
316
 325 0198 FCCF      		rjmp .L26
317
 326 019a 189B      		sbis 35-0x20,0
318
 327 019c 06C0      		rjmp .L27
319
 328 019e 199B      		sbis 35-0x20,1
320
 329 01a0 02C0      		rjmp .L28
321
 330 01a2 8DE0      		ldi r24,lo8(13)
322
 331 01a4 07C0      		rjmp .L228
323
 332               	.L28:
324
 333 01a6 8BE0      		ldi r24,lo8(11)
325
 334 01a8 05C0      		rjmp .L228
326
 335               	.L27:
327
 336 01aa 199B      		sbis 35-0x20,1
328
 337 01ac 02C0      		rjmp .L31
329
 338 01ae 84E1      		ldi r24,lo8(20)
330
 339 01b0 01C0      		rjmp .L228
331
 340               	.L31:
332
 341 01b2 8AE0      		ldi r24,lo8(10)
333
 342               	.L228:
334
 343 01b4 8093 0000 		sts PlatinenVersion,r24
335
 344 01b8 81E8      		ldi r24,lo8(-127)
336
 345 01ba 87B9      		out 39-0x20,r24
337
 346 01bc 3E9A      		sbi 39-0x20,6
338
 347 01be 8FEF      		ldi r24,lo8(-1)
339
 348 01c0 88B9      		out 40-0x20,r24
340
 349 01c2 8BE1      		ldi r24,lo8(27)
341
 350 01c4 84B9      		out 36-0x20,r24
342
 351 01c6 81E0      		ldi r24,lo8(1)
343
 352 01c8 85B9      		out 37-0x20,r24
344
 353 01ca 8EE3      		ldi r24,lo8(62)
345
 354 01cc 8AB9      		out 42-0x20,r24
346
 355 01ce 87E4      		ldi r24,lo8(71)
347
 356 01d0 8BB9      		out 43-0x20,r24
348
 357 01d2 469A      		sbi 40-0x20,6
349
 358 01d4 84B7      		in r24,84-0x20
350
 359 01d6 877F      		andi r24,lo8(-9)
351
 360 01d8 84BF      		out 84-0x20,r24
352
 361 01da 8091 6000 		lds r24,96
353
 362 01de 8861      		ori r24,lo8(24)
354
 363 01e0 8093 6000 		sts 96,r24
355
 364 01e4 1092 6000 		sts 96,__zero_reg__
356
 365 01e8 84EC      		ldi r24,lo8(2500)
357
 366 01ea 99E0      		ldi r25,hi8(2500)
358
 367 01ec 9093 0000 		sts (beeptime)+1,r25
359
 368 01f0 8093 0000 		sts beeptime,r24
360
 369 01f4 1092 0000 		sts (StickGier)+1,__zero_reg__
361
 370 01f8 1092 0000 		sts StickGier,__zero_reg__
362
 371 01fc 1092 0000 		sts (PPM_in+4)+1,__zero_reg__
363
 372 0200 1092 0000 		sts PPM_in+4,__zero_reg__
364
 373 0204 1092 0000 		sts (StickRoll)+1,__zero_reg__
365
 374 0208 1092 0000 		sts StickRoll,__zero_reg__
366
 375 020c 1092 0000 		sts (StickNick)+1,__zero_reg__
367
 376 0210 1092 0000 		sts StickNick,__zero_reg__
368
 377 0214 2091 0000 		lds r18,PlatinenVersion
369
 378 0218 2431      		cpi r18,lo8(20)
370
 379 021a 28F0      		brlo .L33
371
 380 021c 84EC      		ldi r24,lo8(1220)
372
 381 021e 94E0      		ldi r25,hi8(1220)
373
 382 0220 A0E0      		ldi r26,hlo8(1220)
374
 383 0222 B0E0      		ldi r27,hhi8(1220)
375
 384 0224 04C0      		rjmp .L229
376
 385               	.L33:
377
 386 0226 8BE0      		ldi r24,lo8(1291)
378
 387 0228 95E0      		ldi r25,hi8(1291)
379
 388 022a A0E0      		ldi r26,hlo8(1291)
380
 389 022c B0E0      		ldi r27,hhi8(1291)
381
 390               	.L229:
382
 391 022e 8093 0000 		sts GIER_GRAD_FAKTOR,r24
383
 392 0232 9093 0000 		sts (GIER_GRAD_FAKTOR)+1,r25
384
 393 0236 A093 0000 		sts (GIER_GRAD_FAKTOR)+2,r26
385
 394 023a B093 0000 		sts (GIER_GRAD_FAKTOR)+3,r27
386
 395 023e 2A30      		cpi r18,lo8(10)
387
 396 0240 11F0      		breq .L36
388
 397 0242 2431      		cpi r18,lo8(20)
389
 398 0244 10F0      		brlo .L35
390
 399               	.L36:
391
 400 0246 2898      		cbi 37-0x20,0
392
 401 0248 01C0      		rjmp .L37
393
 402               	.L35:
394
 403 024a 289A      		sbi 37-0x20,0
395
 404               	.L37:
396
 405 024c 0E94 0000 		call Timer_Init
397
 406 0250 0E94 0000 		call TIMER2_Init
398
 407 0254 0E94 0000 		call UART_Init
399
 408 0258 0E94 0000 		call rc_sum_init
400
 409 025c 0E94 0000 		call ADC_Init
401
 410 0260 0E94 0000 		call I2C_Init
402
 411 0264 0E94 0000 		call SPI_MasterInit
403
 412 0268 0E94 0000 		call Capacity_Init
404
 413 026c 0E94 0000 		call LIBFC_Init
405
 414 0270 8091 0000 		lds r24,PlatinenVersion
406
 415 0274 8C30      		cpi r24,lo8(12)
407
 416 0276 10F4      		brsh .L38
408
 417 0278 299A      		sbi 37-0x20,1
409
 418 027a 01C0      		rjmp .L39
410
 419               	.L38:
411
 420 027c 2998      		cbi 37-0x20,1
412
 421               	.L39:
413
 422               	/* #APP */
414
 423 027e 7894      		sei
415
 424               	/* #NOAPP */
416
 425 0280 0E94 0000 		call ParamSet_Init
417
 426 0284 8091 0000 		lds r24,BLFlags
418
 427 0288 8260      		ori r24,lo8(2)
419
 428 028a 8093 0000 		sts BLFlags,r24
420
 429 028e 1092 0000 		sts motor_read,__zero_reg__
421
 430 0292 0E94 0000 		call SendMotorData
422
 431 0296 84EF      		ldi r24,lo8(500)
423
 432 0298 91E0      		ldi r25,hi8(500)
424
 433 029a 0E94 0000 		call SetDelay
425
 434 029e 8C01      		movw r16,r24
426
 435               	.L40:
427
 436 02a0 8091 0000 		lds r24,BLFlags
428
 437 02a4 80FD      		sbrc r24,0
429
 438 02a6 05C0      		rjmp .L41
430
 439 02a8 C801      		movw r24,r16
431
 440 02aa 0E94 0000 		call CheckDelay
432
 441 02ae 8823      		tst r24
433
 442 02b0 B9F3      		breq .L40
434
 443               	.L41:
435
 444 02b2 80E0      		ldi r24,lo8(__c.0)
436
 445 02b4 90E0      		ldi r25,hi8(__c.0)
437
 446 02b6 9F93      		push r25
438
 447 02b8 8F93      		push r24
439
 448 02ba B0E0      		ldi r27,lo8(pm(uart_putchar))
440
 449 02bc AB2E      		mov r10,r27
441
 450 02be B0E0      		ldi r27,hi8(pm(uart_putchar))
442
 451 02c0 BB2E      		mov r11,r27
443
 452 02c2 BF92      		push r11
444
 453 02c4 AF92      		push r10
445
 454 02c6 E091 0000 		lds r30,_printf_P
446
 455 02ca F091 0000 		lds r31,(_printf_P)+1
447
 456 02ce 0995      		icall
448
 457 02d0 80EA      		ldi r24,lo8(4000)
449
 458 02d2 9FE0      		ldi r25,hi8(4000)
450
 459 02d4 0E94 0000 		call SetDelay
451
 460 02d8 8C01      		movw r16,r24
452
 461 02da C0E0      		ldi r28,lo8(0)
453
 462 02dc D0E0      		ldi r29,hi8(0)
454
 463 02de 0F90      		pop __tmp_reg__
455
 464 02e0 0F90      		pop __tmp_reg__
456
 465 02e2 0F90      		pop __tmp_reg__
457
 466 02e4 0F90      		pop __tmp_reg__
458
 467 02e6 A0E0      		ldi r26,lo8(Motor+3)
459
 468 02e8 EA2E      		mov r14,r26
460
 469 02ea A0E0      		ldi r26,hi8(Motor+3)
461
 470 02ec FA2E      		mov r15,r26
462
 471 02ee F0E0      		ldi r31,lo8(Mixer+13)
463
 472 02f0 CF2E      		mov r12,r31
464
 473 02f2 F0E0      		ldi r31,hi8(Mixer+13)
465
 474 02f4 DF2E      		mov r13,r31
466
 475               	.L57:
467
 476 02f6 0E94 0000 		call SendMotorData
468
 477               	.L46:
469
 478 02fa 8091 0000 		lds r24,BLFlags
470
 479 02fe 80FD      		sbrc r24,0
471
 480 0300 05C0      		rjmp .L47
472
 481 0302 C801      		movw r24,r16
473
 482 0304 0E94 0000 		call CheckDelay
474
 483 0308 8823      		tst r24
475
 484 030a B9F3      		breq .L46
476
 485               	.L47:
477
 486 030c F601      		movw r30,r12
478
 487 030e 8081      		ld r24,Z
479
 488 0310 1816      		cp __zero_reg__,r24
480
 489 0312 ACF4      		brge .L49
481
 490 0314 0BC0      		rjmp .L233
482
 491               	.L55:
483
 492 0316 0E94 0000 		call SendMotorData
484
 493               	.L52:
485
 494 031a 8091 0000 		lds r24,BLFlags
486
 495 031e 80FD      		sbrc r24,0
487
 496 0320 05C0      		rjmp .L233
488
 497 0322 C801      		movw r24,r16
489
 498 0324 0E94 0000 		call CheckDelay
490
 499 0328 8823      		tst r24
491
 500 032a B9F3      		breq .L52
492
 501               	.L233:
493
 502 032c C801      		movw r24,r16
494
 503 032e 0E94 0000 		call CheckDelay
495
 504 0332 8823      		tst r24
496
 505 0334 21F4      		brne .L49
497
 506 0336 F701      		movw r30,r14
498
 507 0338 8081      		ld r24,Z
499
 508 033a 8823      		tst r24
500
 509 033c 64F7      		brge .L55
501
 510               	.L49:
502
 511 033e F701      		movw r30,r14
503
 512 0340 8081      		ld r24,Z
504
 513 0342 87FF      		sbrs r24,7
505
 514 0344 18C0      		rjmp .L45
506
 515 0346 2196      		adiw r28,1
507
 516 0348 DF93      		push r29
508
 517 034a CF93      		push r28
509
 518 034c 2197      		sbiw r28,1
510
 519 034e 80E0      		ldi r24,lo8(__c.1)
511
 520 0350 90E0      		ldi r25,hi8(__c.1)
512
 521 0352 9F93      		push r25
513
 522 0354 8F93      		push r24
514
 523 0356 BF92      		push r11
515
 524 0358 AF92      		push r10
516
 525 035a E091 0000 		lds r30,_printf_P
517
 526 035e F091 0000 		lds r31,(_printf_P)+1
518
 527 0362 0995      		icall
519
 528 0364 8091 0000 		lds r24,FoundMotors
520
 529 0368 8F5F      		subi r24,lo8(-(1))
521
 530 036a 8093 0000 		sts FoundMotors,r24
522
 531 036e 8DB7      		in r24,__SP_L__
523
 532 0370 9EB7      		in r25,__SP_H__
524
 533 0372 0696      		adiw r24,6
525
 534 0374 8DBF      		out __SP_L__,r24
526
 535               	.L45:
527
 536 0376 2196      		adiw r28,1
528
 537 0378 E4E0      		ldi r30,lo8(4)
529
 538 037a F0E0      		ldi r31,hi8(4)
530
 539 037c CE0E      		add r12,r30
531
 540 037e DF1E      		adc r13,r31
532
 541 0380 88E0      		ldi r24,lo8(8)
533
 542 0382 90E0      		ldi r25,hi8(8)
534
 543 0384 E80E      		add r14,r24
535
 544 0386 F91E      		adc r15,r25
536
 545 0388 CC30      		cpi r28,12
537
 546 038a D105      		cpc r29,__zero_reg__
538
 547 038c 08F4      		brsh .+2
539
 548 038e B3CF      		rjmp .L57
540
 549 0390 C0E0      		ldi r28,lo8(0)
541
 550 0392 D0E0      		ldi r29,hi8(0)
542
 551 0394 00E0      		ldi r16,lo8(Motor)
543
 552 0396 10E0      		ldi r17,hi8(Motor)
544
 553 0398 E0E0      		ldi r30,lo8(Mixer+13)
545
 554 039a EE2E      		mov r14,r30
546
 555 039c E0E0      		ldi r30,hi8(Mixer+13)
547
 556 039e FE2E      		mov r15,r30
548
 557               	.L62:
549
 558 03a0 F801      		movw r30,r16
550
 559 03a2 8381      		ldd r24,Z+3
551
 560 03a4 87FD      		sbrc r24,7
552
 561 03a6 1CC0      		rjmp .L61
553
 562 03a8 F701      		movw r30,r14
554
 563 03aa 8081      		ld r24,Z
555
 564 03ac 1816      		cp __zero_reg__,r24
556
 565 03ae C4F4      		brge .L61
557
 566 03b0 2196      		adiw r28,1
558
 567 03b2 DF93      		push r29
559
 568 03b4 CF93      		push r28
560
 569 03b6 2197      		sbiw r28,1
561
 570 03b8 80E0      		ldi r24,lo8(__c.2)
562
 571 03ba 90E0      		ldi r25,hi8(__c.2)
563
 572 03bc 9F93      		push r25
564
 573 03be 8F93      		push r24
565
 574 03c0 80E0      		ldi r24,lo8(pm(uart_putchar))
566
 575 03c2 90E0      		ldi r25,hi8(pm(uart_putchar))
567
 576 03c4 9F93      		push r25
568
 577 03c6 8F93      		push r24
569
 578 03c8 E091 0000 		lds r30,_printf_P
570
 579 03cc F091 0000 		lds r31,(_printf_P)+1
571
 580 03d0 0995      		icall
572
 581 03d2 82E0      		ldi r24,lo8(2)
573
 582 03d4 8093 0000 		sts ServoActive,r24
574
 583 03d8 8DB7      		in r24,__SP_L__
575
 584 03da 9EB7      		in r25,__SP_H__
576
 585 03dc 0696      		adiw r24,6
577
 586 03de 8DBF      		out __SP_L__,r24
578
 587               	.L61:
579
 588 03e0 F801      		movw r30,r16
580
 589 03e2 8381      		ldd r24,Z+3
581
 590 03e4 8078      		andi r24,lo8(-128)
582
 591 03e6 8383      		std Z+3,r24
583
 592 03e8 2196      		adiw r28,1
584
 593 03ea 84E0      		ldi r24,lo8(4)
585
 594 03ec 90E0      		ldi r25,hi8(4)
586
 595 03ee E80E      		add r14,r24
587
 596 03f0 F91E      		adc r15,r25
588
 597 03f2 085F      		subi r16,lo8(-(8))
589
 598 03f4 1F4F      		sbci r17,hi8(-(8))
590
 599 03f6 CC30      		cpi r28,12
591
 600 03f8 D105      		cpc r29,__zero_reg__
592
 601 03fa 90F2      		brlo .L62
593
 602 03fc 80E0      		ldi r24,lo8(__c.3)
594
 603 03fe 90E0      		ldi r25,hi8(__c.3)
595
 604 0400 9F93      		push r25
596
 605 0402 8F93      		push r24
597
 606 0404 C0E0      		ldi r28,lo8(pm(uart_putchar))
598
 607 0406 D0E0      		ldi r29,hi8(pm(uart_putchar))
599
 608 0408 DF93      		push r29
600
 609 040a CF93      		push r28
601
 610 040c E091 0000 		lds r30,_printf_P
602
 611 0410 F091 0000 		lds r31,(_printf_P)+1
603
 612 0414 0995      		icall
604
 613 0416 9091 0000 		lds r25,RequiredMotors
605
 614 041a 8091 0000 		lds r24,FoundMotors
606
 615 041e 0F90      		pop __tmp_reg__
607
 616 0420 0F90      		pop __tmp_reg__
608
 617 0422 0F90      		pop __tmp_reg__
609
 618 0424 0F90      		pop __tmp_reg__
610
 619 0426 9817      		cp r25,r24
611
 620 0428 28F4      		brsh .L63
612
 621 042a 8091 0000 		lds r24,VersionInfo+6
613
 622 042e 8061      		ori r24,lo8(16)
614
 623 0430 8093 0000 		sts VersionInfo+6,r24
615
 624               	.L63:
616
 625 0434 80E0      		ldi r24,lo8(__c.4)
617
 626 0436 90E0      		ldi r25,hi8(__c.4)
618
 627 0438 9F93      		push r25
619
 628 043a 8F93      		push r24
620
 629 043c DF93      		push r29
621
 630 043e CF93      		push r28
622
 631 0440 E091 0000 		lds r30,_printf_P
623
 632 0444 F091 0000 		lds r31,(_printf_P)+1
624
 633 0448 0995      		icall
625
 634 044a 88EE      		ldi r24,lo8(1000)
626
 635 044c 93E0      		ldi r25,hi8(1000)
627
 636 044e 0E94 0000 		call SetDelay
628
 637 0452 8C01      		movw r16,r24
629
 638 0454 0E94 0000 		call SucheLuftruckOffset
630
 639 0458 0F90      		pop __tmp_reg__
631
 640 045a 0F90      		pop __tmp_reg__
632
 641 045c 0F90      		pop __tmp_reg__
633
 642 045e 0F90      		pop __tmp_reg__
634
 643               	.L64:
635
 644 0460 C801      		movw r24,r16
636
 645 0462 0E94 0000 		call CheckDelay
637
 646 0466 8823      		tst r24
638
 647 0468 D9F3      		breq .L64
639
 648 046a 80E0      		ldi r24,lo8(__c.5)
640
 649 046c 90E0      		ldi r25,hi8(__c.5)
641
 650 046e 9F93      		push r25
642
 651 0470 8F93      		push r24
643
 652 0472 DF93      		push r29
644
 653 0474 CF93      		push r28
645
 654 0476 E091 0000 		lds r30,_printf_P
646
 655 047a F091 0000 		lds r31,(_printf_P)+1
647
 656 047e 0995      		icall
648
 657 0480 80E0      		ldi r24,lo8(0)
649
 658 0482 0E94 0000 		call SetNeutral
650
 659 0486 8091 0000 		lds r24,PlatinenVersion
651
 660 048a 0F90      		pop __tmp_reg__
652
 661 048c 0F90      		pop __tmp_reg__
653
 662 048e 0F90      		pop __tmp_reg__
654
 663 0490 0F90      		pop __tmp_reg__
655
 664 0492 8A30      		cpi r24,lo8(10)
656
 665 0494 11F0      		breq .L68
657
 666 0496 8431      		cpi r24,lo8(20)
658
 667 0498 10F0      		brlo .L67
659
 668               	.L68:
660
 669 049a 2898      		cbi 37-0x20,0
661
 670 049c 01C0      		rjmp .L69
662
 671               	.L67:
663
 672 049e 289A      		sbi 37-0x20,0
664
 673               	.L69:
665
 674 04a0 80ED      		ldi r24,lo8(2000)
666
 675 04a2 97E0      		ldi r25,hi8(2000)
667
 676 04a4 9093 0000 		sts (beeptime)+1,r25
668
 677 04a8 8093 0000 		sts beeptime,r24
669
 678 04ac 85E5      		ldi r24,lo8(85)
670
 679 04ae 8093 0000 		sts ExternControl,r24
671
 680 04b2 8EE0      		ldi r24,lo8(14)
672
 681 04b4 90E0      		ldi r25,hi8(14)
673
 682 04b6 0E94 0000 		call GetParamByte
674
 683 04ba 9927      		clr r25
675
 684 04bc 182F      		mov r17,r24
676
 685 04be 0027      		clr r16
677
 686 04c0 8FE0      		ldi r24,lo8(15)
678
 687 04c2 90E0      		ldi r25,hi8(15)
679
 688 04c4 0E94 0000 		call GetParamByte
680
 689 04c8 080F      		add r16,r24
681
 690 04ca 111D      		adc r17,__zero_reg__
682
 691 04cc 1093 0000 		sts (FlugMinuten)+1,r17
683
 692 04d0 0093 0000 		sts FlugMinuten,r16
684
 693 04d4 8AE0      		ldi r24,lo8(10)
685
 694 04d6 90E0      		ldi r25,hi8(10)
686
 695 04d8 0E94 0000 		call GetParamByte
687
 696 04dc 9927      		clr r25
688
 697 04de 182F      		mov r17,r24
689
 698 04e0 0027      		clr r16
690
 699 04e2 8BE0      		ldi r24,lo8(11)
691
 700 04e4 90E0      		ldi r25,hi8(11)
692
 701 04e6 0E94 0000 		call GetParamByte
693
 702 04ea 080F      		add r16,r24
694
 703 04ec 111D      		adc r17,__zero_reg__
695
 704 04ee 1093 0000 		sts (FlugMinutenGesamt)+1,r17
696
 705 04f2 0093 0000 		sts FlugMinutenGesamt,r16
697
 706 04f6 0F5F      		subi r16,lo8(-1)
698
 707 04f8 1F4F      		sbci r17,hi8(-1)
699
 708 04fa 39F0      		breq .L71
700
 709 04fc 8091 0000 		lds r24,FlugMinuten
701
 710 0500 9091 0000 		lds r25,(FlugMinuten)+1
702
 711 0504 8F5F      		subi r24,lo8(-1)
703
 712 0506 9F4F      		sbci r25,hi8(-1)
704
 713 0508 41F4      		brne .L70
705
 714               	.L71:
706
 715 050a 1092 0000 		sts (FlugMinuten)+1,__zero_reg__
707
 716 050e 1092 0000 		sts FlugMinuten,__zero_reg__
708
 717 0512 1092 0000 		sts (FlugMinutenGesamt)+1,__zero_reg__
709
 718 0516 1092 0000 		sts FlugMinutenGesamt,__zero_reg__
710
 719               	.L70:
711
 720 051a 8091 0000 		lds r24,FlugMinutenGesamt
712
 721 051e 9091 0000 		lds r25,(FlugMinutenGesamt)+1
713
 722 0522 9F93      		push r25
714
 723 0524 8F93      		push r24
715
 724 0526 8091 0000 		lds r24,FlugMinuten
716
 725 052a 9091 0000 		lds r25,(FlugMinuten)+1
717
 726 052e 9F93      		push r25
718
 727 0530 8F93      		push r24
719
 728 0532 80E0      		ldi r24,lo8(__c.6)
720
 729 0534 90E0      		ldi r25,hi8(__c.6)
721
 730 0536 9F93      		push r25
722
 731 0538 8F93      		push r24
723
 732 053a DF93      		push r29
724
 733 053c CF93      		push r28
725
 734 053e E091 0000 		lds r30,_printf_P
726
 735 0542 F091 0000 		lds r31,(_printf_P)+1
727
 736 0546 0995      		icall
728
 737 0548 8DB7      		in r24,__SP_L__
729
 738 054a 9EB7      		in r25,__SP_H__
730
 739 054c 0896      		adiw r24,8
731
 740 054e 8DBF      		out __SP_L__,r24
732
 741 0550 80E0      		ldi r24,lo8(__c.7)
733
 742 0552 90E0      		ldi r25,hi8(__c.7)
734
 743 0554 9F93      		push r25
735
 744 0556 8F93      		push r24
736
 745 0558 DF93      		push r29
737
 746 055a CF93      		push r28
738
 747 055c E091 0000 		lds r30,_printf_P
739
 748 0560 F091 0000 		lds r31,(_printf_P)+1
740
 749 0564 0995      		icall
741
 750 0566 8091 0000 		lds r24,EE_Parameter+13
742
 751 056a 0F90      		pop __tmp_reg__
743
 752 056c 0F90      		pop __tmp_reg__
744
 753 056e 0F90      		pop __tmp_reg__
745
 754 0570 0F90      		pop __tmp_reg__
746
 755 0572 E091 0000 		lds r30,_printf_P
747
 756 0576 F091 0000 		lds r31,(_printf_P)+1
748
 757 057a 82FF      		sbrs r24,2
749
 758 057c 07C0      		rjmp .L72
750
 759 057e 80E0      		ldi r24,lo8(__c.8)
751
 760 0580 90E0      		ldi r25,hi8(__c.8)
752
 761 0582 9F93      		push r25
753
 762 0584 8F93      		push r24
754
 763 0586 DF93      		push r29
755
 764 0588 CF93      		push r28
756
 765 058a 08C0      		rjmp .L230
757
 766               	.L72:
758
 767 058c 80E0      		ldi r24,lo8(__c.9)
759
 768 058e 90E0      		ldi r25,hi8(__c.9)
760
 769 0590 9F93      		push r25
761
 770 0592 8F93      		push r24
762
 771 0594 80E0      		ldi r24,lo8(pm(uart_putchar))
763
 772 0596 90E0      		ldi r25,hi8(pm(uart_putchar))
764
 773 0598 9F93      		push r25
765
 774 059a 8F93      		push r24
766
 775               	.L230:
767
 776 059c 0995      		icall
768
 777 059e 0F90      		pop __tmp_reg__
769
 778 05a0 0F90      		pop __tmp_reg__
770
 779 05a2 0F90      		pop __tmp_reg__
771
 780 05a4 0F90      		pop __tmp_reg__
772
 781 05a6 0E94 0000 		call LcdClear
773
 782 05aa 88E8      		ldi r24,lo8(5000)
774
 783 05ac 93E1      		ldi r25,hi8(5000)
775
 784 05ae 9093 0000 		sts (I2CTimeout)+1,r25
776
 785 05b2 8093 0000 		sts I2CTimeout,r24
777
 786 05b6 81E0      		ldi r24,lo8(1)
778
 787 05b8 8093 0000 		sts WinkelOut+7,r24
779
 788 05bc 0E94 0000 		call LipoDetection
780
 789 05c0 8091 0000 		lds r24,EE_Parameter+39
781
 790 05c4 0E94 0000 		call LIBFC_ReceiverInit
782
 791 05c8 80E0      		ldi r24,lo8(__c.10)
783
 792 05ca 90E0      		ldi r25,hi8(__c.10)
784
 793 05cc 9F93      		push r25
785
 794 05ce 8F93      		push r24
786
 795 05d0 DF93      		push r29
787
 796 05d2 CF93      		push r28
788
 797 05d4 E091 0000 		lds r30,_printf_P
789
 798 05d8 F091 0000 		lds r31,(_printf_P)+1
790
 799 05dc 0995      		icall
791
 800 05de 80ED      		ldi r24,lo8(2000)
792
 801 05e0 97E0      		ldi r25,hi8(2000)
793
 802 05e2 0E94 0000 		call SetDelay
794
 803 05e6 8C01      		movw r16,r24
795
 804 05e8 8AEF      		ldi r24,lo8(250)
796
 805 05ea 90E0      		ldi r25,hi8(250)
797
 806 05ec 0E94 0000 		call SetDelay
798
 807 05f0 EC01      		movw r28,r24
799
 808 05f2 83E0      		ldi r24,lo8(3)
800
 809 05f4 8093 0000 		sts DebugOut,r24
801
 810 05f8 0F90      		pop __tmp_reg__
802
 811 05fa 0F90      		pop __tmp_reg__
803
 812 05fc 0F90      		pop __tmp_reg__
804
 813 05fe 0F90      		pop __tmp_reg__
805
 814               	.L234:
806
 815 0600 CE01      		movw r24,r28
807
 816 0602 0E94 0000 		call CheckDelay
808
 817 0606 8823      		tst r24
809
 818 0608 39F0      		breq .L76
810
 819 060a 84E6      		ldi r24,lo8(100)
811
 820 060c 90E0      		ldi r25,hi8(100)
812
 821 060e 0E94 0000 		call SetDelay
813
 822 0612 EC01      		movw r28,r24
814
 823 0614 0E94 0000 		call LIBFC_Polling
815
 824               	.L76:
816
 825 0618 8091 0000 		lds r24,UpdateMotor
817
 826 061c 8823      		tst r24
818
 827 061e 09F4      		brne .+2
819
 828 0620 DFC1      		rjmp .L77
820
 829 0622 8091 0000 		lds r24,AdReady
821
 830 0626 8823      		tst r24
822
 831 0628 09F4      		brne .+2
823
 832 062a DAC1      		rjmp .L77
824
 833 062c 1092 0000 		sts UpdateMotor,__zero_reg__
825
 834 0630 8091 0000 		lds r24,WinkelOut+6
826
 835 0634 8823      		tst r24
827
 836 0636 19F0      		breq .L78
828
 837 0638 0E94 0000 		call CalMk3Mag
829
 838 063c 02C0      		rjmp .L79
830
 839               	.L78:
831
 840 063e 0E94 0000 		call MotorRegler
832
 841               	.L79:
833
 842 0642 0E94 0000 		call SendMotorData
834
 843 0646 2091 0000 		lds r18,PlatinenVersion
835
 844 064a 2A30      		cpi r18,lo8(10)
836
 845 064c 11F0      		breq .L81
837
 846 064e 2431      		cpi r18,lo8(20)
838
 847 0650 10F0      		brlo .L80
839
 848               	.L81:
840
 849 0652 2898      		cbi 37-0x20,0
841
 850 0654 01C0      		rjmp .L82
842
 851               	.L80:
843
 852 0656 289A      		sbi 37-0x20,0
844
 853               	.L82:
845
 854 0658 8091 0000 		lds r24,SenderOkay
846
 855 065c 9091 0000 		lds r25,VersionInfo+6
847
 856 0660 8823      		tst r24
848
 857 0662 39F0      		breq .L83
849
 858 0664 8091 0000 		lds r24,SenderOkay
850
 859 0668 8150      		subi r24,lo8(-(-1))
851
 860 066a 8093 0000 		sts SenderOkay,r24
852
 861 066e 977F      		andi r25,lo8(-9)
853
 862 0670 0AC0      		rjmp .L231
854
 863               	.L83:
855
 864 0672 8091 6F00 		lds r24,111
856
 865 0676 8062      		ori r24,lo8(32)
857
 866 0678 8093 6F00 		sts 111,r24
858
 867 067c 1092 0000 		sts (PPM_in)+1,__zero_reg__
859
 868 0680 1092 0000 		sts PPM_in,__zero_reg__
860
 869 0684 9860      		ori r25,lo8(8)
861
 870               	.L231:
862
 871 0686 9093 0000 		sts VersionInfo+6,r25
863
 872 068a 8091 0000 		lds r24,I2CTimeout
864
 873 068e 9091 0000 		lds r25,(I2CTimeout)+1
865
 874 0692 0197      		sbiw r24,1
866
 875 0694 9093 0000 		sts (I2CTimeout)+1,r25
867
 876 0698 8093 0000 		sts I2CTimeout,r24
868
 877 069c 8091 0000 		lds r24,I2CTimeout
869
 878 06a0 9091 0000 		lds r25,(I2CTimeout)+1
870
 879 06a4 892B      		or r24,r25
871
 880 06a6 29F0      		breq .L86
872
 881 06a8 8091 0000 		lds r24,MissingMotor
873
 882 06ac 8823      		tst r24
874
 883 06ae 09F4      		brne .+2
875
 884 06b0 3EC0      		rjmp .L85
876
 885               	.L86:
877
 886 06b2 8091 0000 		lds r24,I2CTimeout
878
 887 06b6 9091 0000 		lds r25,(I2CTimeout)+1
879
 888 06ba 892B      		or r24,r25
880
 889 06bc 01F5      		brne .L87
881
 890 06be 0E94 0000 		call I2C_Reset
882
 891 06c2 85E0      		ldi r24,lo8(5)
883
 892 06c4 90E0      		ldi r25,hi8(5)
884
 893 06c6 9093 0000 		sts (I2CTimeout)+1,r25
885
 894 06ca 8093 0000 		sts I2CTimeout,r24
886
 895 06ce 8091 0000 		lds r24,DebugOut+58
887
 896 06d2 9091 0000 		lds r25,(DebugOut+58)+1
888
 897 06d6 0196      		adiw r24,1
889
 898 06d8 9093 0000 		sts (DebugOut+58)+1,r25
890
 899 06dc 8093 0000 		sts DebugOut+58,r24
891
 900 06e0 8091 0000 		lds r24,FCFlags
892
 901 06e4 8068      		ori r24,lo8(-128)
893
 902 06e6 8093 0000 		sts FCFlags,r24
894
 903 06ea 8091 0000 		lds r24,VersionInfo+6
895
 904 06ee 8160      		ori r24,lo8(1)
896
 905 06f0 8093 0000 		sts VersionInfo+6,r24
897
 906 06f4 8091 0000 		lds r24,DebugOut+1
898
 907 06f8 8260      		ori r24,lo8(2)
899
 908 06fa 8093 0000 		sts DebugOut+1,r24
900
 909               	.L87:
901
 910 06fe 8091 0000 		lds r24,BeepMuster
902
 911 0702 9091 0000 		lds r25,(BeepMuster)+1
903
 912 0706 8F5F      		subi r24,lo8(-1)
904
 913 0708 9F4F      		sbci r25,hi8(-1)
905
 914 070a 19F5      		brne .L89
906
 915 070c 8091 0000 		lds r24,MotorenEin
907
 916 0710 8823      		tst r24
908
 917 0712 F9F0      		breq .L89
909
 918 0714 80E1      		ldi r24,lo8(10000)
910
 919 0716 97E2      		ldi r25,hi8(10000)
911
 920 0718 9093 0000 		sts (beeptime)+1,r25
912
 921 071c 8093 0000 		sts beeptime,r24
913
 922 0720 80E8      		ldi r24,lo8(128)
914
 923 0722 90E0      		ldi r25,hi8(128)
915
 924 0724 9093 0000 		sts (BeepMuster)+1,r25
916
 925 0728 8093 0000 		sts BeepMuster,r24
917
 926 072c 12C0      		rjmp .L89
918
 927               	.L85:
919
 928 072e 2A30      		cpi r18,lo8(10)
920
 929 0730 11F0      		breq .L91
921
 930 0732 2431      		cpi r18,lo8(20)
922
 931 0734 10F0      		brlo .L90
923
 932               	.L91:
924
 933 0736 2898      		cbi 37-0x20,0
925
 934 0738 01C0      		rjmp .L92
926
 935               	.L90:
927
 936 073a 289A      		sbi 37-0x20,0
928
 937               	.L92:
929
 938 073c 8091 0000 		lds r24,beeptime
930
 939 0740 9091 0000 		lds r25,(beeptime)+1
931
 940 0744 892B      		or r24,r25
932
 941 0746 29F4      		brne .L89
933
 942 0748 8091 0000 		lds r24,FCFlags
934
 943 074c 8F77      		andi r24,lo8(127)
935
 944 074e 8093 0000 		sts FCFlags,r24
936
 945               	.L89:
937
 946 0752 8091 0000 		lds r24,UpdateMotor
938
 947 0756 8823      		tst r24
939
 948 0758 09F0      		breq .+2
940
 949 075a 42C1      		rjmp .L77
941
 950 075c 0E94 0000 		call DatenUebertragung
942
 951 0760 0E94 0000 		call BearbeiteRxDaten
943
 952 0764 C801      		movw r24,r16
944
 953 0766 0E94 0000 		call CheckDelay
945
 954 076a 8823      		tst r24
946
 955 076c 09F4      		brne .+2
947
 956 076e 34C1      		rjmp .L95
948
 957 0770 0C5E      		subi r16,lo8(-(20))
949
 958 0772 1F4F      		sbci r17,hi8(-(20))
950
 959 0774 8091 0000 		lds r24,MissingMotor
951
 960 0778 9091 0000 		lds r25,VersionInfo+6
952
 961 077c 8823      		tst r24
953
 962 077e 39F0      		breq .L96
954
 963 0780 9260      		ori r25,lo8(2)
955
 964 0782 9093 0000 		sts VersionInfo+6,r25
956
 965 0786 8091 0000 		lds r24,DebugOut+1
957
 966 078a 8260      		ori r24,lo8(2)
958
 967 078c 0CC0      		rjmp .L232
959
 968               	.L96:
960
 969 078e 9D7F      		andi r25,lo8(-3)
961
 970 0790 9093 0000 		sts VersionInfo+6,r25
962
 971 0794 8091 0000 		lds r24,I2CTimeout
963
 972 0798 9091 0000 		lds r25,(I2CTimeout)+1
964
 973 079c 0797      		sbiw r24,7
965
 974 079e 28F0      		brlo .L97
966
 975 07a0 8091 0000 		lds r24,DebugOut+1
967
 976 07a4 8D7F      		andi r24,lo8(-3)
968
 977               	.L232:
969
 978 07a6 8093 0000 		sts DebugOut+1,r24
970
 979               	.L97:
971
 980 07aa 8091 0000 		lds r24,I2CTimeout
972
 981 07ae 9091 0000 		lds r25,(I2CTimeout)+1
973
 982 07b2 0797      		sbiw r24,7
974
 983 07b4 28F0      		brlo .L99
975
 984 07b6 8091 0000 		lds r24,VersionInfo+6
976
 985 07ba 8E7F      		andi r24,lo8(-2)
977
 986 07bc 8093 0000 		sts VersionInfo+6,r24
978
 987               	.L99:
979
 988 07c0 8091 0000 		lds r24,PcZugriff
980
 989 07c4 8823      		tst r24
981
 990 07c6 21F0      		breq .L100
982
 991 07c8 8150      		subi r24,lo8(-(-1))
983
 992 07ca 8093 0000 		sts PcZugriff,r24
984
 993 07ce 25C0      		rjmp .L101
985
 994               	.L100:
986
 995 07d0 8093 0000 		sts ExternControl+10,r24
987
 996 07d4 1092 0000 		sts (ExternStickNick)+1,__zero_reg__
988
 997 07d8 1092 0000 		sts ExternStickNick,__zero_reg__
989
 998 07dc 1092 0000 		sts (ExternStickRoll)+1,__zero_reg__
990
 999 07e0 1092 0000 		sts ExternStickRoll,__zero_reg__
991
 1000 07e4 1092 0000 		sts (ExternStickGier)+1,__zero_reg__
992
 1001 07e8 1092 0000 		sts ExternStickGier,__zero_reg__
993
 1002 07ec 8091 0000 		lds r24,BeepMuster
994
 1003 07f0 9091 0000 		lds r25,(BeepMuster)+1
995
 1004 07f4 8F5F      		subi r24,lo8(-1)
996
 1005 07f6 9F4F      		sbci r25,hi8(-1)
997
 1006 07f8 81F4      		brne .L101
998
 1007 07fa 8091 0000 		lds r24,SenderOkay
999
 1008 07fe 8823      		tst r24
1000
 1009 0800 61F4      		brne .L101
1001
 1010 0802 88E9      		ldi r24,lo8(15000)
1002
 1011 0804 9AE3      		ldi r25,hi8(15000)
1003
 1012 0806 9093 0000 		sts (beeptime)+1,r25
1004
 1013 080a 8093 0000 		sts beeptime,r24
1005
 1014 080e 80E0      		ldi r24,lo8(3072)
1006
 1015 0810 9CE0      		ldi r25,hi8(3072)
1007
 1016 0812 9093 0000 		sts (BeepMuster)+1,r25
1008
 1017 0816 8093 0000 		sts BeepMuster,r24
1009
 1018               	.L101:
1010
 1019 081a 8091 0000 		lds r24,NaviDataOkay
1011
 1020 081e 893C      		cpi r24,lo8(-55)
1012
 1021 0820 70F0      		brlo .L103
1013
 1022 0822 8150      		subi r24,lo8(-(-1))
1014
 1023 0824 8093 0000 		sts NaviDataOkay,r24
1015
 1024 0828 8091 0000 		lds r24,FCFlags
1016
 1025 082c 8F7B      		andi r24,lo8(-65)
1017
 1026 082e 8093 0000 		sts FCFlags,r24
1018
 1027 0832 8091 0000 		lds r24,VersionInfo+6
1019
 1028 0836 8B7F      		andi r24,lo8(-5)
1020
 1029 0838 8093 0000 		sts VersionInfo+6,r24
1021
 1030 083c 35C0      		rjmp .L104
1022
 1031               	.L103:
1023
 1032 083e 8091 0000 		lds r24,NC_Version+3
1024
 1033 0842 8823      		tst r24
1025
 1034 0844 09F1      		breq .L105
1026
 1035 0846 8091 0000 		lds r24,FCFlags
1027
 1036 084a 8064      		ori r24,lo8(64)
1028
 1037 084c 8093 0000 		sts FCFlags,r24
1029
 1038 0850 8091 0000 		lds r24,VersionInfo+6
1030
 1039 0854 8460      		ori r24,lo8(4)
1031
 1040 0856 8093 0000 		sts VersionInfo+6,r24
1032
 1041 085a 8091 0000 		lds r24,BeepMuster
1033
 1042 085e 9091 0000 		lds r25,(BeepMuster)+1
1034
 1043 0862 8F5F      		subi r24,lo8(-1)
1035
 1044 0864 9F4F      		sbci r25,hi8(-1)
1036
 1045 0866 81F4      		brne .L105
1037
 1046 0868 8091 0000 		lds r24,MotorenEin
1038
 1047 086c 8823      		tst r24
1039
 1048 086e 61F0      		breq .L105
1040
 1049 0870 88E9      		ldi r24,lo8(15000)
1041
 1050 0872 9AE3      		ldi r25,hi8(15000)
1042
 1051 0874 9093 0000 		sts (beeptime)+1,r25
1043
 1052 0878 8093 0000 		sts beeptime,r24
1044
 1053 087c 80E0      		ldi r24,lo8(-22528)
1045
 1054 087e 98EA      		ldi r25,hi8(-22528)
1046
 1055 0880 9093 0000 		sts (BeepMuster)+1,r25
1047
 1056 0884 8093 0000 		sts BeepMuster,r24
1048
 1057               	.L105:
1049
 1058 0888 1092 0000 		sts (GPS_Nick)+1,__zero_reg__
1050
 1059 088c 1092 0000 		sts GPS_Nick,__zero_reg__
1051
 1060 0890 1092 0000 		sts (GPS_Roll)+1,__zero_reg__
1052
 1061 0894 1092 0000 		sts GPS_Roll,__zero_reg__
1053
 1062 0898 8FEF      		ldi r24,lo8(-1)
1054
 1063 089a 9FEF      		ldi r25,hi8(-1)
1055
 1064 089c 9093 0000 		sts (FromNaviCtrl+7)+1,r25
1056
 1065 08a0 8093 0000 		sts FromNaviCtrl+7,r24
1057
 1066 08a4 1092 0000 		sts NaviDataOkay,__zero_reg__
1058
 1067               	.L104:
1059
 1068 08a8 8091 0000 		lds r24,BattLowVoltageWarning
1060
 1069 08ac 282F      		mov r18,r24
1061
 1070 08ae 3327      		clr r19
1062
 1071 08b0 8091 0000 		lds r24,UBat
1063
 1072 08b4 9091 0000 		lds r25,(UBat)+1
1064
 1073 08b8 8217      		cp r24,r18
1065
 1074 08ba 9307      		cpc r25,r19
1066
 1075 08bc CCF4      		brge .L107
1067
 1076 08be 8091 0000 		lds r24,FCFlags
1068
 1077 08c2 8062      		ori r24,lo8(32)
1069
 1078 08c4 8093 0000 		sts FCFlags,r24
1070
 1079 08c8 8091 0000 		lds r24,BeepMuster
1071
 1080 08cc 9091 0000 		lds r25,(BeepMuster)+1
1072
 1081 08d0 8F5F      		subi r24,lo8(-1)
1073
 1082 08d2 9F4F      		sbci r25,hi8(-1)
1074
 1083 08d4 C1F4      		brne .L109
1075
 1084 08d6 80E7      		ldi r24,lo8(6000)
1076
 1085 08d8 97E1      		ldi r25,hi8(6000)
1077
 1086 08da 9093 0000 		sts (beeptime)+1,r25
1078
 1087 08de 8093 0000 		sts beeptime,r24
1079
 1088 08e2 80E0      		ldi r24,lo8(768)
1080
 1089 08e4 93E0      		ldi r25,hi8(768)
1081
 1090 08e6 9093 0000 		sts (BeepMuster)+1,r25
1082
 1091 08ea 8093 0000 		sts BeepMuster,r24
1083
 1092 08ee 0BC0      		rjmp .L109
1084
 1093               	.L107:
1085
 1094 08f0 8091 0000 		lds r24,beeptime
1086
 1095 08f4 9091 0000 		lds r25,(beeptime)+1
1087
 1096 08f8 892B      		or r24,r25
1088
 1097 08fa 29F4      		brne .L109
1089
 1098 08fc 8091 0000 		lds r24,FCFlags
1090
 1099 0900 8F7D      		andi r24,lo8(-33)
1091
 1100 0902 8093 0000 		sts FCFlags,r24
1092
 1101               	.L109:
1093
 1102 0906 0E94 0000 		call SPI_StartTransmitPacket
1094
 1103 090a 84E0      		ldi r24,lo8(4)
1095
 1104 090c 8093 0000 		sts SendSPI,r24
1096
 1105 0910 8091 0000 		lds r24,MotorenEin
1097
 1106 0914 8823      		tst r24
1098
 1107 0916 29F4      		brne .L111
1099
 1108 0918 5AEA      		ldi r21,lo8(1450)
1100
 1109 091a 852E      		mov r8,r21
1101
 1110 091c 55E0      		ldi r21,hi8(1450)
1102
 1111 091e 952E      		mov r9,r21
1103
 1112 0920 12C0      		rjmp .L112
1104
 1113               	.L111:
1105
 1114 0922 8091 0000 		lds r24,second.11
1106
 1115 0926 8F5F      		subi r24,lo8(-(1))
1107
 1116 0928 8093 0000 		sts second.11,r24
1108
 1117 092c 8133      		cpi r24,lo8(49)
1109
 1118 092e 59F4      		brne .L112
1110
 1119 0930 1092 0000 		sts second.11,__zero_reg__
1111
 1120 0934 8091 0000 		lds r24,FlugSekunden
1112
 1121 0938 9091 0000 		lds r25,(FlugSekunden)+1
1113
 1122 093c 0196      		adiw r24,1
1114
 1123 093e 9093 0000 		sts (FlugSekunden)+1,r25
1115
 1124 0942 8093 0000 		sts FlugSekunden,r24
1116
 1125               	.L112:
1117
 1126 0946 0894      		sec
1118
 1127 0948 811C      		adc r8,__zero_reg__
1119
 1128 094a 911C      		adc r9,__zero_reg__
1120
 1129 094c F2E7      		ldi r31,lo8(2930)
1121
 1130 094e 8F16      		cp r8,r31
1122
 1131 0950 FBE0      		ldi r31,hi8(2930)
1123
 1132 0952 9F06      		cpc r9,r31
1124
 1133 0954 09F0      		breq .+2
1125
 1134 0956 40C0      		rjmp .L95
1126
 1135 0958 8824      		clr r8
1127
 1136 095a 9924      		clr r9
1128
 1137 095c 2091 0000 		lds r18,FlugMinuten
1129
 1138 0960 3091 0000 		lds r19,(FlugMinuten)+1
1130
 1139 0964 2F5F      		subi r18,lo8(-(1))
1131
 1140 0966 3F4F      		sbci r19,hi8(-(1))
1132
 1141 0968 3093 0000 		sts (FlugMinuten)+1,r19
1133
 1142 096c 2093 0000 		sts FlugMinuten,r18
1134
 1143 0970 8091 0000 		lds r24,FlugMinutenGesamt
1135
 1144 0974 9091 0000 		lds r25,(FlugMinutenGesamt)+1
1136
 1145 0978 0196      		adiw r24,1
1137
 1146 097a 9093 0000 		sts (FlugMinutenGesamt)+1,r25
1138
 1147 097e 8093 0000 		sts FlugMinutenGesamt,r24
1139
 1148 0982 832F      		mov r24,r19
1140
 1149 0984 9927      		clr r25
1141
 1150 0986 682F      		mov r22,r24
1142
 1151 0988 8EE0      		ldi r24,lo8(14)
1143
 1152 098a 90E0      		ldi r25,hi8(14)
1144
 1153 098c 0E94 0000 		call SetParamByte
1145
 1154 0990 8091 0000 		lds r24,FlugMinuten
1146
 1155 0994 9091 0000 		lds r25,(FlugMinuten)+1
1147
 1156 0998 9070      		andi r25,hi8(255)
1148
 1157 099a 682F      		mov r22,r24
1149
 1158 099c 8FE0      		ldi r24,lo8(15)
1150
 1159 099e 90E0      		ldi r25,hi8(15)
1151
 1160 09a0 0E94 0000 		call SetParamByte
1152
 1161 09a4 8091 0000 		lds r24,FlugMinutenGesamt
1153
 1162 09a8 9091 0000 		lds r25,(FlugMinutenGesamt)+1
1154
 1163 09ac 892F      		mov r24,r25
1155
 1164 09ae 9927      		clr r25
1156
 1165 09b0 682F      		mov r22,r24
1157
 1166 09b2 8AE0      		ldi r24,lo8(10)
1158
 1167 09b4 90E0      		ldi r25,hi8(10)
1159
 1168 09b6 0E94 0000 		call SetParamByte
1160
 1169 09ba 8091 0000 		lds r24,FlugMinutenGesamt
1161
 1170 09be 9091 0000 		lds r25,(FlugMinutenGesamt)+1
1162
 1171 09c2 9070      		andi r25,hi8(255)
1163
 1172 09c4 682F      		mov r22,r24
1164
 1173 09c6 8BE0      		ldi r24,lo8(11)
1165
 1174 09c8 90E0      		ldi r25,hi8(11)
1166
 1175 09ca 0E94 0000 		call SetParamByte
1167
 1176 09ce 84E1      		ldi r24,lo8(20)
1168
 1177 09d0 90E0      		ldi r25,hi8(20)
1169
 1178 09d2 0E94 0000 		call SetDelay
1170
 1179 09d6 8C01      		movw r16,r24
1171
 1180               	.L95:
1172
 1181 09d8 0E94 0000 		call LED_Update
1173
 1182 09dc 0E94 0000 		call Capacity_Update
1174
 1183               	.L77:
1175
 1184 09e0 8091 0000 		lds r24,SendSPI
1176
 1185 09e4 8823      		tst r24
1177
 1186 09e6 09F0      		breq .+2
1178
 1187 09e8 0BCE      		rjmp .L234
1179
 1188 09ea 0E94 0000 		call SPI_TransmitByte
1180
 1189 09ee 08CE      		rjmp .L234
1181
 1190               	/* epilogue: frame size=0 */
1182
 1191               	/* epilogue: noreturn */
1183
 1192               	/* epilogue end (size=0) */
1184
 1193               	/* function main size 1092 (1088) */
1185
 1195               		.comm _printf_P,2,1
1186
 1196               	/* File "main.c": code 1285 = 0x0505 (1273), prologues   7, epilogues   5 */
1187
DEFINED SYMBOLS
1188
                            *ABS*:00000000 main.c
1189
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:3      *ABS*:0000003f __SREG__
1190
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:4      *ABS*:0000003e __SP_H__
1191
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:5      *ABS*:0000003d __SP_L__
1192
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:6      *ABS*:00000000 __tmp_reg__
1193
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:7      *ABS*:00000001 __zero_reg__
1194
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:15     .bss:00000000 FoundMotors
1195
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:21     .bss:00000001 FlugSekunden
1196
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:27     .bss:00000003 FlugMinutenGesamt
1197
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:33     .bss:00000005 FlugMinuten
1198
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:39     .data:00000000 BattLowVoltageWarning
1199
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:44     .data:00000001 SendVersionToNavi
1200
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:49     .data:00000002 PlatinenVersion
1201
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:53     .data:00000003 stick.15
1202
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:58     .text:00000000 CalMk3Mag
1203
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:112    .progmem.data:00000000 __c.12
1204
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:116    .progmem.data:00000008 __c.13
1205
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:120    .progmem.data:00000013 __c.14
1206
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:125    .text:0000006a LipoDetection
1207
                            *COM*:00000002 _printf_P
1208
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:262    .progmem.data:0000002d __c.0
1209
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:266    .progmem.data:0000003f __c.1
1210
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:270    .progmem.data:00000042 __c.2
1211
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:274    .progmem.data:00000060 __c.3
1212
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:278    .progmem.data:00000086 __c.4
1213
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:282    .progmem.data:000000a6 __c.5
1214
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:286    .progmem.data:000000ab __c.6
1215
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:290    .progmem.data:000000ce __c.7
1216
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:294    .progmem.data:000000da __c.8
1217
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:298    .progmem.data:000000e6 __c.9
1218
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:302    .progmem.data:000000f8 __c.10
1219
                             .bss:00000007 second.11
1220
C:\Users\Arthur-P\AppData\Local\Temp/cc8Waaaa.s:308    .text:0000017e main
1221
 
1222
UNDEFINED SYMBOLS
1223
__do_copy_data
1224
__do_clear_bss
1225
EE_Parameter
1226
PPM_in
1227
WinkelOut
1228
beeptime
1229
Piep
1230
DebugOut
1231
uart_putchar
1232
SetDelay
1233
CheckDelay
1234
UBat
1235
__udivmodqi4
1236
__stack
1237
StickGier
1238
StickRoll
1239
StickNick
1240
GIER_GRAD_FAKTOR
1241
Timer_Init
1242
TIMER2_Init
1243
UART_Init
1244
rc_sum_init
1245
ADC_Init
1246
I2C_Init
1247
SPI_MasterInit
1248
Capacity_Init
1249
LIBFC_Init
1250
ParamSet_Init
1251
BLFlags
1252
motor_read
1253
SendMotorData
1254
Motor
1255
Mixer
1256
ServoActive
1257
RequiredMotors
1258
VersionInfo
1259
SucheLuftruckOffset
1260
SetNeutral
1261
ExternControl
1262
GetParamByte
1263
LcdClear
1264
I2CTimeout
1265
LIBFC_ReceiverInit
1266
LIBFC_Polling
1267
UpdateMotor
1268
AdReady
1269
MotorRegler
1270
SenderOkay
1271
MissingMotor
1272
I2C_Reset
1273
FCFlags
1274
BeepMuster
1275
MotorenEin
1276
DatenUebertragung
1277
BearbeiteRxDaten
1278
PcZugriff
1279
ExternStickNick
1280
ExternStickRoll
1281
ExternStickGier
1282
NaviDataOkay
1283
NC_Version
1284
GPS_Nick
1285
GPS_Roll
1286
FromNaviCtrl
1287
SPI_StartTransmitPacket
1288
SendSPI
1289
SetParamByte
1290
LED_Update
1291
Capacity_Update
1292
SPI_TransmitByte