Subversion Repositories FlightCtrl

Rev

Rev 2300 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2285 - 1
   1               		.file	"spi.c"
2
   2               		.arch atmega1284p
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	MagVec
11
  11               	.global	MagVec
12
  12               		.section .bss
13
  15               	MagVec:
14
  16 0000 0000 0000 		.skip 6,0
15
  16      0000
16
  17               	.global	POI_KameraNick
17
  18               	.global	POI_KameraNick
18
  21               	POI_KameraNick:
19
  22 0006 0000      		.skip 2,0
20
  23               	.global	NC_To_FC_MaxAltitude
21
  24               	.global	NC_To_FC_MaxAltitude
22
  27               	NC_To_FC_MaxAltitude:
23
  28 0008 00        		.skip 1,0
24
  29               	.global	NC_To_FC_Flags
25
  30               	.global	NC_To_FC_Flags
26
  33               	NC_To_FC_Flags:
27
  34 0009 00        		.skip 1,0
28
  35               	.global	EarthMagneticInclinationTheoretic
29
  36               	.global	EarthMagneticInclinationTheoretic
30
  39               	EarthMagneticInclinationTheoretic:
31
  40 000a 00        		.skip 1,0
32
  41               	.global	EarthMagneticInclination
33
  42               	.global	EarthMagneticInclination
34
  45               	EarthMagneticInclination:
35
  46 000b 00        		.skip 1,0
36
  47               	.global	EarthMagneticField
37
  48               	.global	EarthMagneticField
38
  51               	EarthMagneticField:
39
  52 000c 00        		.skip 1,0
40
  53               	.global	NC_GPS_ModeCharacter
41
  54               		.data
42
  57               	NC_GPS_ModeCharacter:
43
  58 0000 20        		.byte	32
44
  59               	.global	NC_ErrorCode
45
  60               	.global	NC_ErrorCode
46
  61               		.section .bss
47
  64               	NC_ErrorCode:
48
  65 000d 00        		.skip 1,0
49
  66               	.global	SPI_CommandCounter
50
  67               	.global	SPI_CommandCounter
51
  70               	SPI_CommandCounter:
52
  71 000e 00        		.skip 1,0
53
  72               	.global	SPI_CommandSequence
54
  73               		.data
55
  76               	SPI_CommandSequence:
56
  77 0001 0B        		.byte	11
57
  78 0002 0A        		.byte	10
58
  79 0003 0D        		.byte	13
59
  80 0004 0B        		.byte	11
60
  81 0005 0C        		.byte	12
61
  82 0006 0E        		.byte	14
62
  83 0007 0B        		.byte	11
63
  84 0008 0F        		.byte	15
64
  85 0009 10        		.byte	16
65
  86 000a 0B        		.byte	11
66
  87 000b 11        		.byte	17
67
  88               	.global	NaviDataOkay
68
  91               	NaviDataOkay:
69
  92 000c FA        		.byte	-6
70
  93               	.global	FromNC_Rotate_S
71
  94               	.global	FromNC_Rotate_S
72
  95               		.section .bss
73
  98               	FromNC_Rotate_S:
74
  99 000f 00        		.skip 1,0
75
 100               	.global	FromNC_Rotate_C
76
 101               		.data
77
 104               	FromNC_Rotate_C:
78
 105 000d 20        		.byte	32
79
 106               		.text
80
 107               	.global	SPI_MasterInit
81
 109               	SPI_MasterInit:
82
 110               	/* prologue: frame size=0 */
83
 111               	/* prologue end (size=0) */
84
 112 0000 84B1      		in r24,36-0x20
85
 113 0002 806A      		ori r24,lo8(-96)
86
 114 0004 84B9      		out 36-0x20,r24
87
 115 0006 3D9A      		sbi 39-0x20,5
88
 116 0008 82E5      		ldi r24,lo8(82)
89
 117 000a 8CBD      		out 76-0x20,r24
90
 118 000c 1DBC      		out 77-0x20,__zero_reg__
91
 119 000e 459A      		sbi 40-0x20,5
92
 120 0010 81E0      		ldi r24,lo8(1)
93
 121 0012 8093 0000 		sts SPITransferCompleted,r24
94
 122 0016 8AEA      		ldi r24,lo8(-86)
95
 123 0018 8093 0000 		sts ToNaviCtrl,r24
96
 124 001c 83E8      		ldi r24,lo8(-125)
97
 125 001e 8093 0000 		sts ToNaviCtrl+1,r24
98
 126 0022 8AE0      		ldi r24,lo8(10)
99
 127 0024 8093 0000 		sts ToNaviCtrl+2,r24
100
 128 0028 1092 0000 		sts (ToNaviCtrl+3)+1,__zero_reg__
101
 129 002c 1092 0000 		sts ToNaviCtrl+3,__zero_reg__
102
 130 0030 1092 0000 		sts (ToNaviCtrl+5)+1,__zero_reg__
103
 131 0034 1092 0000 		sts ToNaviCtrl+5,__zero_reg__
104
 132 0038 1092 0000 		sts FromNaviCtrl_Value+3,__zero_reg__
105
 133 003c 1092 0000 		sts SPI_RxDataValid,__zero_reg__
106
 134               	/* epilogue: frame size=0 */
107
 135 0040 0895      		ret
108
 136               	/* epilogue end (size=1) */
109
 137               	/* function SPI_MasterInit size 33 (32) */
110
 139               		.lcomm SPI_RXState.2,1
111
 140               		.lcomm rxchksum.3,1
112
 141               	.global	SPI_TransmitByte
113
 143               	SPI_TransmitByte:
114
 144               	/* prologue: frame size=0 */
115
 145               	/* prologue end (size=0) */
116
 146 0042 3091 0000 		lds r19,SPITransferCompleted
117
 147 0046 3323      		tst r19
118
 148 0048 01F0      		breq .+2
119
 149 004a 00C0      		rjmp .L2
120
 150 004c 0DB4      		in __tmp_reg__,77-0x20
121
 151 004e 07FE      		sbrs __tmp_reg__,7
122
 152 0050 00C0      		rjmp .L2
123
 153 0052 84E0      		ldi r24,lo8(4)
124
 154 0054 8093 0000 		sts SendSPI,r24
125
 155 0058 459A      		sbi 40-0x20,5
126
 156 005a 2EB5      		in r18,78-0x20
127
 157 005c 8091 0000 		lds r24,SPI_RXState.2
128
 158 0060 9927      		clr r25
129
 159 0062 8130      		cpi r24,1
130
 160 0064 9105      		cpc r25,__zero_reg__
131
 161 0066 01F0      		breq .L8
132
 162 0068 8230      		cpi r24,2
133
 163 006a 9105      		cpc r25,__zero_reg__
134
 164 006c 04F4      		brge .L16
135
 165 006e 892B      		or r24,r25
136
 166 0070 01F0      		breq .L6
137
 167 0072 00C0      		rjmp .L5
138
 168               	.L16:
139
 169 0074 0297      		sbiw r24,2
140
 170 0076 01F0      		breq .L11
141
 171 0078 00C0      		rjmp .L5
142
 172               	.L6:
143
 173 007a 3093 0000 		sts SPI_RxBufferIndex,r19
144
 174 007e 2093 0000 		sts rxchksum.3,r18
145
 175 0082 2138      		cpi r18,lo8(-127)
146
 176 0084 01F4      		brne .L5
147
 177 0086 81E0      		ldi r24,lo8(1)
148
 178 0088 00C0      		rjmp .L19
149
 179               	.L8:
150
 180 008a 2535      		cpi r18,lo8(85)
151
 181 008c 01F4      		brne .L9
152
 182 008e 8091 0000 		lds r24,rxchksum.3
153
 183 0092 820F      		add r24,r18
154
 184 0094 8093 0000 		sts rxchksum.3,r24
155
 185 0098 82E0      		ldi r24,lo8(2)
156
 186               	.L19:
157
 187 009a 8093 0000 		sts SPI_RXState.2,r24
158
 188 009e 00C0      		rjmp .L5
159
 189               	.L9:
160
 190 00a0 3093 0000 		sts SPI_RXState.2,r19
161
 191 00a4 00C0      		rjmp .L5
162
 192               	.L11:
163
 193 00a6 8091 0000 		lds r24,SPI_RxBufferIndex
164
 194 00aa E82F      		mov r30,r24
165
 195 00ac FF27      		clr r31
166
 196 00ae E050      		subi r30,lo8(-(SPI_Buffer))
167
 197 00b0 F040      		sbci r31,hi8(-(SPI_Buffer))
168
 198 00b2 2083      		st Z,r18
169
 199 00b4 8F5F      		subi r24,lo8(-(1))
170
 200 00b6 8093 0000 		sts SPI_RxBufferIndex,r24
171
 201 00ba 9091 0000 		lds r25,rxchksum.3
172
 202 00be 8032      		cpi r24,lo8(32)
173
 203 00c0 00F0      		brlo .L12
174
 204 00c2 2917      		cp r18,r25
175
 205 00c4 01F4      		brne .L13
176
 206 00c6 80E2      		ldi r24,lo8(32)
177
 207 00c8 A0E0      		ldi r26,lo8(SPI_Buffer)
178
 208 00ca B0E0      		ldi r27,hi8(SPI_Buffer)
179
 209 00cc E0E0      		ldi r30,lo8(FromNaviCtrl)
180
 210 00ce F0E0      		ldi r31,hi8(FromNaviCtrl)
181
 211 00d0 0D90      		ld __tmp_reg__,X+
182
 212 00d2 0192      		st Z+,__tmp_reg__
183
 213 00d4 8A95      		dec r24
184
 214 00d6 01F4      		brne .-8
185
 215 00d8 81E0      		ldi r24,lo8(1)
186
 216 00da 8093 0000 		sts SPI_RxDataValid,r24
187
 217 00de 00C0      		rjmp .L14
188
 218               	.L13:
189
 219 00e0 3093 0000 		sts SPI_RxDataValid,r19
190
 220               	.L14:
191
 221 00e4 1092 0000 		sts SPI_RXState.2,__zero_reg__
192
 222 00e8 00C0      		rjmp .L5
193
 223               	.L12:
194
 224 00ea 920F      		add r25,r18
195
 225 00ec 9093 0000 		sts rxchksum.3,r25
196
 226               	.L5:
197
 227 00f0 2091 0000 		lds r18,SPI_BufferIndex
198
 228 00f4 2232      		cpi r18,lo8(34)
199
 229 00f6 00F0      		brlo .+2
200
 230 00f8 00C0      		rjmp .L17
201
 231 00fa 4598      		cbi 40-0x20,5
202
 232               	/* #APP */
203
 233 00fc 0000      		nop
204
 234 00fe 0000      		nop
205
 235 0100 0000      		nop
206
 236 0102 0000      		nop
207
 237 0104 0000      		nop
208
 238 0106 0000      		nop
209
 239 0108 0000      		nop
210
 240 010a 0000      		nop
211
 241 010c 0000      		nop
212
 242 010e 0000      		nop
213
 243 0110 0000      		nop
214
 244 0112 0000      		nop
215
 245 0114 0000      		nop
216
 246 0116 0000      		nop
217
 247 0118 0000      		nop
218
 248 011a 0000      		nop
219
 249 011c 0000      		nop
220
 250 011e 0000      		nop
221
 251 0120 0000      		nop
222
 252 0122 0000      		nop
223
 253 0124 0000      		nop
224
 254 0126 0000      		nop
225
 255 0128 0000      		nop
226
 256 012a 0000      		nop
227
 257               	/* #NOAPP */
228
 258 012c E091 0000 		lds r30,SPI_TX_Buffer
229
 259 0130 F091 0000 		lds r31,(SPI_TX_Buffer)+1
230
 260 0134 E20F      		add r30,r18
231
 261 0136 F11D      		adc r31,__zero_reg__
232
 262 0138 8081      		ld r24,Z
233
 263 013a 8EBD      		out 78-0x20,r24
234
 264 013c 8091 0000 		lds r24,ToNaviCtrl+33
235
 265 0140 9081      		ld r25,Z
236
 266 0142 890F      		add r24,r25
237
 267 0144 8093 0000 		sts ToNaviCtrl+33,r24
238
 268 0148 00C0      		rjmp .L18
239
 269               	.L17:
240
 270 014a 81E0      		ldi r24,lo8(1)
241
 271 014c 8093 0000 		sts SPITransferCompleted,r24
242
 272               	.L18:
243
 273 0150 2F5F      		subi r18,lo8(-(1))
244
 274 0152 2093 0000 		sts SPI_BufferIndex,r18
245
 275               	.L2:
246
 276 0156 0895      		ret
247
 277               	/* epilogue: frame size=0 */
248
 278               	/* epilogue: noreturn */
249
 279               	/* epilogue end (size=0) */
250
 280               	/* function SPI_TransmitByte size 164 (164) */
251
 282               		.lcomm motorindex.0,1
252
 283               		.data
253
 286               	oldcommand.1:
254
 287 000e 68        		.byte	104
255
 288               		.text
256
 289               	.global	UpdateSPI_Buffer
257
 291               	UpdateSPI_Buffer:
258
 292               	/* prologue: frame size=0 */
259
 293 0158 EF92      		push r14
260
 294 015a FF92      		push r15
261
 295 015c 0F93      		push r16
262
 296 015e 1F93      		push r17
263
 297               	/* prologue end (size=4) */
264
 298 0160 8091 0000 		lds r24,EE_Parameter+28
265
 299 0164 9927      		clr r25
266
 300 0166 880F      		lsl r24
267
 301 0168 991F      		rol r25
268
 302 016a 880F      		lsl r24
269
 303 016c 991F      		rol r25
270
 304 016e 7C01      		movw r14,r24
271
 305 0170 0027      		clr r16
272
 306 0172 F7FC      		sbrc r15,7
273
 307 0174 0095      		com r16
274
 308 0176 102F      		mov r17,r16
275
 309 0178 8091 0000 		lds r24,IntegralNick
276
 310 017c 9091 0000 		lds r25,(IntegralNick)+1
277
 311 0180 A091 0000 		lds r26,(IntegralNick)+2
278
 312 0184 B091 0000 		lds r27,(IntegralNick)+3
279
 313 0188 BC01      		movw r22,r24
280
 314 018a CD01      		movw r24,r26
281
 315 018c A801      		movw r20,r16
282
 316 018e 9701      		movw r18,r14
283
 317 0190 0E94 0000 		call __divmodsi4
284
 318 0194 3093 0000 		sts (ToNaviCtrl+3)+1,r19
285
 319 0198 2093 0000 		sts ToNaviCtrl+3,r18
286
 320 019c 8091 0000 		lds r24,IntegralRoll
287
 321 01a0 9091 0000 		lds r25,(IntegralRoll)+1
288
 322 01a4 A091 0000 		lds r26,(IntegralRoll)+2
289
 323 01a8 B091 0000 		lds r27,(IntegralRoll)+3
290
 324 01ac BC01      		movw r22,r24
291
 325 01ae CD01      		movw r24,r26
292
 326 01b0 A801      		movw r20,r16
293
 327 01b2 9701      		movw r18,r14
294
 328 01b4 0E94 0000 		call __divmodsi4
295
 329 01b8 3093 0000 		sts (ToNaviCtrl+5)+1,r19
296
 330 01bc 2093 0000 		sts ToNaviCtrl+5,r18
297
 331 01c0 2091 0000 		lds r18,ErsatzKompass
298
 332 01c4 3091 0000 		lds r19,(ErsatzKompass)+1
299
 333 01c8 4091 0000 		lds r20,(ErsatzKompass)+2
300
 334 01cc 5091 0000 		lds r21,(ErsatzKompass)+3
301
 335 01d0 DA01      		movw r26,r20
302
 336 01d2 C901      		movw r24,r18
303
 337 01d4 63E0      		ldi r22,3
304
 338 01d6 880F      	1:	lsl r24
305
 339 01d8 991F      		rol r25
306
 340 01da AA1F      		rol r26
307
 341 01dc BB1F      		rol r27
308
 342 01de 6A95      		dec r22
309
 343 01e0 01F4      		brne 1b
310
 344 01e2 820F      		add r24,r18
311
 345 01e4 931F      		adc r25,r19
312
 346 01e6 A41F      		adc r26,r20
313
 347 01e8 B51F      		adc r27,r21
314
 348 01ea 820F      		add r24,r18
315
 349 01ec 931F      		adc r25,r19
316
 350 01ee A41F      		adc r26,r20
317
 351 01f0 B51F      		adc r27,r21
318
 352 01f2 2091 0000 		lds r18,GIER_GRAD_FAKTOR
319
 353 01f6 3091 0000 		lds r19,(GIER_GRAD_FAKTOR)+1
320
 354 01fa 4091 0000 		lds r20,(GIER_GRAD_FAKTOR)+2
321
 355 01fe 5091 0000 		lds r21,(GIER_GRAD_FAKTOR)+3
322
 356 0202 BC01      		movw r22,r24
323
 357 0204 CD01      		movw r24,r26
324
 358 0206 0E94 0000 		call __divmodsi4
325
 359 020a 3093 0000 		sts (ToNaviCtrl+11)+1,r19
326
 360 020e 2093 0000 		sts ToNaviCtrl+11,r18
327
 361 0212 8091 0000 		lds r24,AdNeutralGier
328
 362 0216 9091 0000 		lds r25,(AdNeutralGier)+1
329
 363 021a 2091 0000 		lds r18,AdWertGier
330
 364 021e 3091 0000 		lds r19,(AdWertGier)+1
331
 365 0222 821B      		sub r24,r18
332
 366 0224 930B      		sbc r25,r19
333
 367 0226 9093 0000 		sts (ToNaviCtrl+17)+1,r25
334
 368 022a 8093 0000 		sts ToNaviCtrl+17,r24
335
 369 022e E091 0000 		lds r30,NaviCntAcc
336
 370 0232 F091 0000 		lds r31,(NaviCntAcc)+1
337
 371 0236 8091 0000 		lds r24,NaviAccNick
338
 372 023a 9091 0000 		lds r25,(NaviAccNick)+1
339
 373 023e BF01      		movw r22,r30
340
 374 0240 0E94 0000 		call __divmodhi4
341
 375 0244 9B01      		movw r18,r22
342
 376 0246 220F      		lsl r18
343
 377 0248 331F      		rol r19
344
 378 024a 220F      		lsl r18
345
 379 024c 331F      		rol r19
346
 380 024e 260F      		add r18,r22
347
 381 0250 371F      		adc r19,r23
348
 382 0252 260F      		add r18,r22
349
 383 0254 371F      		adc r19,r23
350
 384 0256 37FF      		sbrs r19,7
351
 385 0258 00C0      		rjmp .L21
352
 386 025a 2D5F      		subi r18,lo8(-(3))
353
 387 025c 3F4F      		sbci r19,hi8(-(3))
354
 388               	.L21:
355
 389 025e 3595      		asr r19
356
 390 0260 2795      		ror r18
357
 391 0262 3595      		asr r19
358
 392 0264 2795      		ror r18
359
 393 0266 3093 0000 		sts (ToNaviCtrl+7)+1,r19
360
 394 026a 2093 0000 		sts ToNaviCtrl+7,r18
361
 395 026e 8091 0000 		lds r24,NaviAccRoll
362
 396 0272 9091 0000 		lds r25,(NaviAccRoll)+1
363
 397 0276 BF01      		movw r22,r30
364
 398 0278 0E94 0000 		call __divmodhi4
365
 399 027c 9B01      		movw r18,r22
366
 400 027e 220F      		lsl r18
367
 401 0280 331F      		rol r19
368
 402 0282 220F      		lsl r18
369
 403 0284 331F      		rol r19
370
 404 0286 260F      		add r18,r22
371
 405 0288 371F      		adc r19,r23
372
 406 028a 260F      		add r18,r22
373
 407 028c 371F      		adc r19,r23
374
 408 028e 37FF      		sbrs r19,7
375
 409 0290 00C0      		rjmp .L22
376
 410 0292 2D5F      		subi r18,lo8(-(3))
377
 411 0294 3F4F      		sbci r19,hi8(-(3))
378
 412               	.L22:
379
 413 0296 3595      		asr r19
380
 414 0298 2795      		ror r18
381
 415 029a 3595      		asr r19
382
 416 029c 2795      		ror r18
383
 417 029e 3093 0000 		sts (ToNaviCtrl+9)+1,r19
384
 418 02a2 2093 0000 		sts ToNaviCtrl+9,r18
385
 419 02a6 1092 0000 		sts (NaviCntAcc)+1,__zero_reg__
386
 420 02aa 1092 0000 		sts NaviCntAcc,__zero_reg__
387
 421 02ae 1092 0000 		sts (NaviAccNick)+1,__zero_reg__
388
 422 02b2 1092 0000 		sts NaviAccNick,__zero_reg__
389
 423 02b6 1092 0000 		sts (NaviAccRoll)+1,__zero_reg__
390
 424 02ba 1092 0000 		sts NaviAccRoll,__zero_reg__
391
 425 02be 8091 0000 		lds r24,ToNaviCtrl+2
392
 426 02c2 9927      		clr r25
393
 427 02c4 AA27      		clr r26
394
 428 02c6 BB27      		clr r27
395
 429 02c8 FC01      		movw r30,r24
396
 430 02ca 3A97      		sbiw r30,10
397
 431 02cc E830      		cpi r30,8
398
 432 02ce F105      		cpc r31,__zero_reg__
399
 433 02d0 00F0      		brlo .+2
400
 434 02d2 00C0      		rjmp .L23
401
 435 02d4 E050      		subi r30,lo8(-(pm(.L50)))
402
 436 02d6 F040      		sbci r31,hi8(-(pm(.L50)))
403
 437 02d8 0C94 0000 		jmp __tablejump2__
404
 438               		.data
405
 439               		.section .progmem.gcc_sw_table, "a", @progbits
406
 440               		.p2align 1
407
 441               	.L50:
408
 442 0000 0000      		.word pm(.L24)
409
 443 0002 0000      		.word pm(.L31)
410
 444 0004 0000      		.word pm(.L44)
411
 445 0006 0000      		.word pm(.L26)
412
 446 0008 0000      		.word pm(.L48)
413
 447 000a 0000      		.word pm(.L49)
414
 448 000c 0000      		.word pm(.L25)
415
 449 000e 0000      		.word pm(.L27)
416
 450               		.text
417
 451               	.L24:
418
 452 02dc 8091 0000 		lds r24,Parameter_UserParam1
419
 453 02e0 8093 0000 		sts ToNaviCtrl+21,r24
420
 454 02e4 8091 0000 		lds r24,Parameter_UserParam2
421
 455 02e8 8093 0000 		sts ToNaviCtrl+22,r24
422
 456 02ec 8091 0000 		lds r24,Parameter_UserParam3
423
 457 02f0 8093 0000 		sts ToNaviCtrl+23,r24
424
 458 02f4 8091 0000 		lds r24,Parameter_UserParam4
425
 459 02f8 8093 0000 		sts ToNaviCtrl+24,r24
426
 460 02fc 8091 0000 		lds r24,Parameter_UserParam5
427
 461 0300 8093 0000 		sts ToNaviCtrl+25,r24
428
 462 0304 8091 0000 		lds r24,Parameter_UserParam6
429
 463 0308 8093 0000 		sts ToNaviCtrl+26,r24
430
 464 030c 8091 0000 		lds r24,Parameter_UserParam7
431
 465 0310 8093 0000 		sts ToNaviCtrl+27,r24
432
 466 0314 8091 0000 		lds r24,Parameter_UserParam8
433
 467 0318 8093 0000 		sts ToNaviCtrl+28,r24
434
 468 031c 8091 0000 		lds r24,FC_StatusFlags
435
 469 0320 8093 0000 		sts ToNaviCtrl+29,r24
436
 470 0324 8091 0000 		lds r24,FC_StatusFlags
437
 471 0328 837F      		andi r24,lo8(-13)
438
 472 032a 8093 0000 		sts FC_StatusFlags,r24
439
 473 032e 0E94 0000 		call GetActiveParamSet
440
 474 0332 8093 0000 		sts ToNaviCtrl+30,r24
441
 475 0336 8091 0000 		lds r24,EE_Parameter+102
442
 476 033a 8093 0000 		sts ToNaviCtrl+31,r24
443
 477 033e 8091 0000 		lds r24,FC_StatusFlags2
444
 478 0342 00C0      		rjmp .L72
445
 479               	.L25:
446
 480 0344 8091 0000 		lds r24,Capacity
447
 481 0348 9091 0000 		lds r25,(Capacity)+1
448
 482 034c 9093 0000 		sts (ToNaviCtrl+21)+1,r25
449
 483 0350 8093 0000 		sts ToNaviCtrl+21,r24
450
 484 0354 8091 0000 		lds r24,Capacity+4
451
 485 0358 9091 0000 		lds r25,(Capacity+4)+1
452
 486 035c 9093 0000 		sts (ToNaviCtrl+23)+1,r25
453
 487 0360 8093 0000 		sts ToNaviCtrl+23,r24
454
 488 0364 8091 0000 		lds r24,UBat
455
 489 0368 9091 0000 		lds r25,(UBat)+1
456
 490 036c 8093 0000 		sts ToNaviCtrl+25,r24
457
 491 0370 8091 0000 		lds r24,BattLowVoltageWarning
458
 492 0374 8093 0000 		sts ToNaviCtrl+26,r24
459
 493 0378 8091 0000 		lds r24,VarioCharacter
460
 494 037c 8093 0000 		sts ToNaviCtrl+27,r24
461
 495 0380 9091 0000 		lds r25,motorindex.0
462
 496 0384 9093 0000 		sts ToNaviCtrl+28,r25
463
 497 0388 E92F      		mov r30,r25
464
 498 038a FF27      		clr r31
465
 499 038c A3E0      		ldi r26,3
466
 500 038e EE0F      	1:	lsl r30
467
 501 0390 FF1F      		rol r31
468
 502 0392 AA95      		dec r26
469
 503 0394 01F4      		brne 1b
470
 504 0396 E050      		subi r30,lo8(-(Motor))
471
 505 0398 F040      		sbci r31,hi8(-(Motor))
472
 506 039a 8681      		ldd r24,Z+6
473
 507 039c 8093 0000 		sts ToNaviCtrl+29,r24
474
 508 03a0 8381      		ldd r24,Z+3
475
 509 03a2 8093 0000 		sts ToNaviCtrl+30,r24
476
 510 03a6 8781      		ldd r24,Z+7
477
 511 03a8 8093 0000 		sts ToNaviCtrl+31,r24
478
 512 03ac 8581      		ldd r24,Z+5
479
 513 03ae 8093 0000 		sts ToNaviCtrl+32,r24
480
 514 03b2 892F      		mov r24,r25
481
 515 03b4 8F5F      		subi r24,lo8(-(1))
482
 516 03b6 6CE0      		ldi r22,lo8(12)
483
 517 03b8 0E94 0000 		call __udivmodqi4
484
 518 03bc 9093 0000 		sts motorindex.0,r25
485
 519 03c0 00C0      		rjmp .L23
486
 520               	.L26:
487
 521 03c2 8091 0000 		lds r24,EE_Parameter+81
488
 522 03c6 8093 0000 		sts ToNaviCtrl+21,r24
489
 523 03ca 8091 0000 		lds r24,EE_Parameter+82
490
 524 03ce 8093 0000 		sts ToNaviCtrl+22,r24
491
 525 03d2 8091 0000 		lds r24,EE_Parameter+83
492
 526 03d6 8093 0000 		sts ToNaviCtrl+23,r24
493
 527 03da 8091 0000 		lds r24,EE_Parameter+84
494
 528 03de 8093 0000 		sts ToNaviCtrl+24,r24
495
 529 03e2 8091 0000 		lds r24,EE_Parameter+85
496
 530 03e6 8093 0000 		sts ToNaviCtrl+25,r24
497
 531 03ea 8091 0000 		lds r24,EE_Parameter+89
498
 532 03ee 8093 0000 		sts ToNaviCtrl+26,r24
499
 533 03f2 8091 0000 		lds r24,EE_Parameter+90
500
 534 03f6 8093 0000 		sts ToNaviCtrl+27,r24
501
 535 03fa 8091 0000 		lds r24,EE_Parameter+91
502
 536 03fe 8093 0000 		sts ToNaviCtrl+28,r24
503
 537 0402 8091 0000 		lds r24,EE_Parameter+94
504
 538 0406 8093 0000 		sts ToNaviCtrl+29,r24
505
 539 040a 8091 0000 		lds r24,EE_Parameter+92
506
 540 040e 8093 0000 		sts ToNaviCtrl+30,r24
507
 541 0412 8091 0000 		lds r24,EE_Parameter+93
508
 542 0416 8093 0000 		sts ToNaviCtrl+31,r24
509
 543 041a 8091 0000 		lds r24,EE_Parameter+95
510
 544 041e 00C0      		rjmp .L72
511
 545               	.L27:
512
 546 0420 8091 0000 		lds r24,EE_Parameter+80
513
 547 0424 8093 0000 		sts ToNaviCtrl+21,r24
514
 548 0428 8091 0000 		lds r24,EE_Parameter+39
515
 549 042c 8630      		cpi r24,lo8(6)
516
 550 042e 01F0      		breq .L28
517
 551 0430 8091 0000 		lds r24,JetiBeep
518
 552 0434 8234      		cpi r24,lo8(66)
519
 553 0436 01F0      		breq .L29
520
 554 0438 0E94 0000 		call HoTT_Waring
521
 555 043c E82F      		mov r30,r24
522
 556 043e FF27      		clr r31
523
 557 0440 E050      		subi r30,lo8(-(JETI_CODE))
524
 558 0442 F040      		sbci r31,hi8(-(JETI_CODE))
525
 559               	/* #APP */
526
 560 0444 8491      		lpm r24, Z
527
 561
528
 562               	/* #NOAPP */
529
 563 0446 8093 0000 		sts JetiBeep,r24
530
 564 044a 00C0      		rjmp .L28
531
 565               	.L29:
532
 566 044c 0E94 0000 		call HoTT_Waring
533
 567               	.L28:
534
 568 0450 8091 0000 		lds r24,ToNC_SpeakHoTT
535
 569 0454 8093 0000 		sts ToNaviCtrl+22,r24
536
 570 0458 00C0      		rjmp .L23
537
 571               	.L31:
538
 572               	/* #APP */
539
 573 045a F894      		cli
540
 574               	/* #NOAPP */
541
 575 045c 8091 0000 		lds r24,EE_Parameter+3
542
 576 0460 E82F      		mov r30,r24
543
 577 0462 FF27      		clr r31
544
 578 0464 EE0F      		add r30,r30
545
 579 0466 FF1F      		adc r31,r31
546
 580 0468 E050      		subi r30,lo8(-(PPM_in))
547
 581 046a F040      		sbci r31,hi8(-(PPM_in))
548
 582 046c 0190      		ld __tmp_reg__,Z+
549
 583 046e F081      		ld r31,Z
550
 584 0470 E02D      		mov r30,__tmp_reg__
551
 585 0472 E038      		cpi r30,128
552
 586 0474 F105      		cpc r31,__zero_reg__
553
 587 0476 04F0      		brlt .L32
554
 588 0478 EFE7      		ldi r30,lo8(127)
555
 589 047a F0E0      		ldi r31,hi8(127)
556
 590 047c 00C0      		rjmp .L33
557
 591               	.L32:
558
 592 047e 2FEF      		ldi r18,hi8(-127)
559
 593 0480 E138      		cpi r30,lo8(-127)
560
 594 0482 F207      		cpc r31,r18
561
 595 0484 04F4      		brge .L33
562
 596 0486 E1E8      		ldi r30,lo8(-127)
563
 597 0488 FFEF      		ldi r31,hi8(-127)
564
 598               	.L33:
565
 599 048a E093 0000 		sts ToNaviCtrl+21,r30
566
 600 048e 8091 0000 		lds r24,EE_Parameter+4
567
 601 0492 E82F      		mov r30,r24
568
 602 0494 FF27      		clr r31
569
 603 0496 EE0F      		add r30,r30
570
 604 0498 FF1F      		adc r31,r31
571
 605 049a E050      		subi r30,lo8(-(PPM_in))
572
 606 049c F040      		sbci r31,hi8(-(PPM_in))
573
 607 049e 0190      		ld __tmp_reg__,Z+
574
 608 04a0 F081      		ld r31,Z
575
 609 04a2 E02D      		mov r30,__tmp_reg__
576
 610 04a4 E038      		cpi r30,128
577
 611 04a6 F105      		cpc r31,__zero_reg__
578
 612 04a8 04F0      		brlt .L35
579
 613 04aa EFE7      		ldi r30,lo8(127)
580
 614 04ac F0E0      		ldi r31,hi8(127)
581
 615 04ae 00C0      		rjmp .L36
582
 616               	.L35:
583
 617 04b0 7FEF      		ldi r23,hi8(-127)
584
 618 04b2 E138      		cpi r30,lo8(-127)
585
 619 04b4 F707      		cpc r31,r23
586
 620 04b6 04F4      		brge .L36
587
 621 04b8 E1E8      		ldi r30,lo8(-127)
588
 622 04ba FFEF      		ldi r31,hi8(-127)
589
 623               	.L36:
590
 624 04bc E093 0000 		sts ToNaviCtrl+22,r30
591
 625 04c0 8091 0000 		lds r24,EE_Parameter+2
592
 626 04c4 E82F      		mov r30,r24
593
 627 04c6 FF27      		clr r31
594
 628 04c8 EE0F      		add r30,r30
595
 629 04ca FF1F      		adc r31,r31
596
 630 04cc E050      		subi r30,lo8(-(PPM_in))
597
 631 04ce F040      		sbci r31,hi8(-(PPM_in))
598
 632 04d0 0190      		ld __tmp_reg__,Z+
599
 633 04d2 F081      		ld r31,Z
600
 634 04d4 E02D      		mov r30,__tmp_reg__
601
 635 04d6 E038      		cpi r30,128
602
 636 04d8 F105      		cpc r31,__zero_reg__
603
 637 04da 04F0      		brlt .L38
604
 638 04dc EFE7      		ldi r30,lo8(127)
605
 639 04de F0E0      		ldi r31,hi8(127)
606
 640 04e0 00C0      		rjmp .L39
607
 641               	.L38:
608
 642 04e2 8FEF      		ldi r24,hi8(-127)
609
 643 04e4 E138      		cpi r30,lo8(-127)
610
 644 04e6 F807      		cpc r31,r24
611
 645 04e8 04F4      		brge .L39
612
 646 04ea E1E8      		ldi r30,lo8(-127)
613
 647 04ec FFEF      		ldi r31,hi8(-127)
614
 648               	.L39:
615
 649 04ee E093 0000 		sts ToNaviCtrl+23,r30
616
 650 04f2 8091 0000 		lds r24,EE_Parameter+1
617
 651 04f6 E82F      		mov r30,r24
618
 652 04f8 FF27      		clr r31
619
 653 04fa EE0F      		add r30,r30
620
 654 04fc FF1F      		adc r31,r31
621
 655 04fe E050      		subi r30,lo8(-(PPM_in))
622
 656 0500 F040      		sbci r31,hi8(-(PPM_in))
623
 657 0502 0190      		ld __tmp_reg__,Z+
624
 658 0504 F081      		ld r31,Z
625
 659 0506 E02D      		mov r30,__tmp_reg__
626
 660 0508 E038      		cpi r30,128
627
 661 050a F105      		cpc r31,__zero_reg__
628
 662 050c 04F0      		brlt .L41
629
 663 050e EFE7      		ldi r30,lo8(127)
630
 664 0510 F0E0      		ldi r31,hi8(127)
631
 665 0512 00C0      		rjmp .L42
632
 666               	.L41:
633
 667 0514 2FEF      		ldi r18,hi8(-127)
634
 668 0516 E138      		cpi r30,lo8(-127)
635
 669 0518 F207      		cpc r31,r18
636
 670 051a 04F4      		brge .L42
637
 671 051c E1E8      		ldi r30,lo8(-127)
638
 672 051e FFEF      		ldi r31,hi8(-127)
639
 673               	.L42:
640
 674               	/* #APP */
641
 675 0520 7894      		sei
642
 676               	/* #NOAPP */
643
 677 0522 E093 0000 		sts ToNaviCtrl+24,r30
644
 678 0526 8091 0000 		lds r24,Poti
645
 679 052a 8093 0000 		sts ToNaviCtrl+25,r24
646
 680 052e 8091 0000 		lds r24,Poti+1
647
 681 0532 8093 0000 		sts ToNaviCtrl+26,r24
648
 682 0536 8091 0000 		lds r24,Poti+2
649
 683 053a 8093 0000 		sts ToNaviCtrl+27,r24
650
 684 053e 8091 0000 		lds r24,Poti+3
651
 685 0542 8093 0000 		sts ToNaviCtrl+28,r24
652
 686 0546 8091 0000 		lds r24,Poti+4
653
 687 054a 8093 0000 		sts ToNaviCtrl+29,r24
654
 688 054e 8091 0000 		lds r24,Poti+5
655
 689 0552 8093 0000 		sts ToNaviCtrl+30,r24
656
 690 0556 8091 0000 		lds r24,Poti+6
657
 691 055a 8093 0000 		sts ToNaviCtrl+31,r24
658
 692 055e 8091 0000 		lds r24,Poti+7
659
 693 0562 00C0      		rjmp .L72
660
 694               	.L44:
661
 695 0564 8091 0000 		lds r24,WinkelOut+6
662
 696 0568 8630      		cpi r24,lo8(6)
663
 697 056a 00F0      		brlo .L45
664
 698 056c 1092 0000 		sts WinkelOut+6,__zero_reg__
665
 699 0570 85E0      		ldi r24,lo8(5)
666
 700               	.L45:
667
 701 0572 8093 0000 		sts ToNaviCtrl+21,r24
668
 702 0576 8091 0000 		lds r24,EE_Parameter+96
669
 703 057a 8093 0000 		sts ToNaviCtrl+22,r24
670
 704 057e 8091 0000 		lds r24,HoehenWert
671
 705 0582 9091 0000 		lds r25,(HoehenWert)+1
672
 706 0586 A091 0000 		lds r26,(HoehenWert)+2
673
 707 058a B091 0000 		lds r27,(HoehenWert)+3
674
 708 058e BC01      		movw r22,r24
675
 709 0590 CD01      		movw r24,r26
676
 710 0592 25E0      		ldi r18,lo8(5)
677
 711 0594 30E0      		ldi r19,hi8(5)
678
 712 0596 40E0      		ldi r20,hlo8(5)
679
 713 0598 50E0      		ldi r21,hhi8(5)
680
 714 059a 0E94 0000 		call __divmodsi4
681
 715 059e 3093 0000 		sts (ToNaviCtrl+23)+1,r19
682
 716 05a2 2093 0000 		sts ToNaviCtrl+23,r18
683
 717 05a6 8091 0000 		lds r24,SollHoehe
684
 718 05aa 9091 0000 		lds r25,(SollHoehe)+1
685
 719 05ae A091 0000 		lds r26,(SollHoehe)+2
686
 720 05b2 B091 0000 		lds r27,(SollHoehe)+3
687
 721 05b6 BC01      		movw r22,r24
688
 722 05b8 CD01      		movw r24,r26
689
 723 05ba 25E0      		ldi r18,lo8(5)
690
 724 05bc 30E0      		ldi r19,hi8(5)
691
 725 05be 40E0      		ldi r20,hlo8(5)
692
 726 05c0 50E0      		ldi r21,hhi8(5)
693
 727 05c2 0E94 0000 		call __divmodsi4
694
 728 05c6 3093 0000 		sts (ToNaviCtrl+25)+1,r19
695
 729 05ca 2093 0000 		sts ToNaviCtrl+25,r18
696
 730 05ce 8091 0000 		lds r24,EE_Parameter+86
697
 731 05d2 8093 0000 		sts ToNaviCtrl+27,r24
698
 732 05d6 8091 0000 		lds r24,EE_Parameter+87
699
 733 05da 8093 0000 		sts ToNaviCtrl+28,r24
700
 734 05de 8091 0000 		lds r24,EE_Parameter+88
701
 735 05e2 8093 0000 		sts ToNaviCtrl+29,r24
702
 736 05e6 8091 0000 		lds r24,SenderOkay
703
 737 05ea 8093 0000 		sts ToNaviCtrl+30,r24
704
 738 05ee 8091 0000 		lds r24,PPM_in
705
 739 05f2 9091 0000 		lds r25,(PPM_in)+1
706
 740 05f6 8093 0000 		sts ToNaviCtrl+31,r24
707
 741 05fa 8091 0000 		lds r24,DebugOut+16
708
 742 05fe 9091 0000 		lds r25,(DebugOut+16)+1
709
 743 0602 97FD      		sbrc r25,7
710
 744 0604 0396      		adiw r24,3
711
 745               	.L47:
712
 746 0606 9595      		asr r25
713
 747 0608 8795      		ror r24
714
 748 060a 9595      		asr r25
715
 749 060c 8795      		ror r24
716
 750 060e 00C0      		rjmp .L72
717
 751               	.L48:
718
 752 0610 1092 0000 		sts ToNaviCtrl+21,__zero_reg__
719
 753 0614 8AE5      		ldi r24,lo8(90)
720
 754 0616 8093 0000 		sts ToNaviCtrl+22,r24
721
 755 061a 83E0      		ldi r24,lo8(3)
722
 756 061c 8093 0000 		sts ToNaviCtrl+23,r24
723
 757 0620 84E3      		ldi r24,lo8(52)
724
 758 0622 8093 0000 		sts ToNaviCtrl+24,r24
725
 759 0626 8091 0000 		lds r24,PlatinenVersion
726
 760 062a 8093 0000 		sts ToNaviCtrl+25,r24
727
 761 062e 8091 0000 		lds r24,VersionInfo+5
728
 762 0632 8093 0000 		sts ToNaviCtrl+26,r24
729
 763 0636 9091 0000 		lds r25,VersionInfo+6
730
 764 063a 9093 0000 		sts ToNaviCtrl+27,r25
731
 765 063e 8F77      		andi r24,lo8(127)
732
 766 0640 8093 0000 		sts VersionInfo+5,r24
733
 767 0644 9071      		andi r25,lo8(16)
734
 768 0646 9093 0000 		sts VersionInfo+6,r25
735
 769 064a 8091 0000 		lds r24,VersionInfo+7
736
 770 064e 8093 0000 		sts ToNaviCtrl+28,r24
737
 771 0652 8091 0000 		lds r24,Parameter_GlobalConfig
738
 772 0656 8093 0000 		sts ToNaviCtrl+29,r24
739
 773 065a 8091 0000 		lds r24,Parameter_ExtraConfig
740
 774 065e 8093 0000 		sts ToNaviCtrl+30,r24
741
 775 0662 8091 0000 		lds r24,EE_Parameter+98
742
 776 0666 8093 0000 		sts ToNaviCtrl+31,r24
743
 777 066a 8091 0000 		lds r24,EE_Parameter+111
744
 778 066e 00C0      		rjmp .L72
745
 779               	.L49:
746
 780 0670 8091 0000 		lds r24,EE_Parameter+53
747
 781 0674 8093 0000 		sts ToNaviCtrl+21,r24
748
 782 0678 8091 0000 		lds r24,EE_Parameter+109
749
 783 067c 8093 0000 		sts ToNaviCtrl+22,r24
750
 784 0680 8091 0000 		lds r24,Parameter_ServoNickControl
751
 785 0684 8093 0000 		sts ToNaviCtrl+23,r24
752
 786 0688 8091 0000 		lds r24,EE_Parameter+46
753
 787 068c 8093 0000 		sts ToNaviCtrl+24,r24
754
 788 0690 8091 0000 		lds r24,EE_Parameter+47
755
 789 0694 8093 0000 		sts ToNaviCtrl+25,r24
756
 790 0698 8091 0000 		lds r24,EE_Parameter+48
757
 791 069c 8093 0000 		sts ToNaviCtrl+26,r24
758
 792 06a0 8091 0000 		lds r24,Parameter_ServoRollControl
759
 793 06a4 8093 0000 		sts ToNaviCtrl+27,r24
760
 794 06a8 8091 0000 		lds r24,EE_Parameter+50
761
 795 06ac 8093 0000 		sts ToNaviCtrl+28,r24
762
 796 06b0 8091 0000 		lds r24,EE_Parameter+51
763
 797 06b4 8093 0000 		sts ToNaviCtrl+29,r24
764
 798 06b8 8091 0000 		lds r24,EE_Parameter+52
765
 799 06bc 8093 0000 		sts ToNaviCtrl+30,r24
766
 800 06c0 8091 0000 		lds r24,Capacity+6
767
 801 06c4 8093 0000 		sts ToNaviCtrl+31,r24
768
 802 06c8 8091 0000 		lds r24,DebugOut+58
769
 803               	.L72:
770
 804 06cc 8093 0000 		sts ToNaviCtrl+32,r24
771
 805               	.L23:
772
 806 06d0 8091 0000 		lds r24,SPI_RxDataValid
773
 807 06d4 8823      		tst r24
774
 808 06d6 01F4      		brne .+2
775
 809 06d8 00C0      		rjmp .L51
776
 810 06da 6091 0000 		lds r22,FromNaviCtrl
777
 811 06de 8091 0000 		lds r24,oldcommand.1
778
 812 06e2 6817      		cp r22,r24
779
 813 06e4 01F0      		breq .L52
780
 814 06e6 8AEF      		ldi r24,lo8(-6)
781
 815 06e8 8093 0000 		sts NaviDataOkay,r24
782
 816               	.L52:
783
 817 06ec 6093 0000 		sts oldcommand.1,r22
784
 818 06f0 81E0      		ldi r24,lo8(1)
785
 819 06f2 8093 0000 		sts CalculateCompassTimer,r24
786
 820 06f6 4091 0000 		lds r20,FromNaviCtrl+1
787
 821 06fa 5091 0000 		lds r21,(FromNaviCtrl+1)+1
788
 822 06fe CA01      		movw r24,r20
789
 823 0700 8150      		subi r24,lo8(-(511))
790
 824 0702 9E4F      		sbci r25,hi8(-(511))
791
 825 0704 8F5F      		subi r24,lo8(1023)
792
 826 0706 9340      		sbci r25,hi8(1023)
793
 827 0708 00F4      		brsh .L53
794
 828 070a 2091 0000 		lds r18,FromNaviCtrl+3
795
 829 070e 3091 0000 		lds r19,(FromNaviCtrl+3)+1
796
 830 0712 C901      		movw r24,r18
797
 831 0714 8150      		subi r24,lo8(-(511))
798
 832 0716 9E4F      		sbci r25,hi8(-(511))
799
 833 0718 8F5F      		subi r24,lo8(1023)
800
 834 071a 9340      		sbci r25,hi8(1023)
801
 835 071c 00F4      		brsh .L53
802
 836 071e 8091 0000 		lds r24,EE_Parameter+13
803
 837 0722 85FF      		sbrs r24,5
804
 838 0724 00C0      		rjmp .L53
805
 839 0726 5093 0000 		sts (GPS_Nick)+1,r21
806
 840 072a 4093 0000 		sts GPS_Nick,r20
807
 841 072e 3093 0000 		sts (GPS_Roll)+1,r19
808
 842 0732 2093 0000 		sts GPS_Roll,r18
809
 843               	.L53:
810
 844 0736 8091 0000 		lds r24,FromNaviCtrl+7
811
 845 073a 9091 0000 		lds r25,(FromNaviCtrl+7)+1
812
 846 073e 21E0      		ldi r18,hi8(361)
813
 847 0740 8936      		cpi r24,lo8(361)
814
 848 0742 9207      		cpc r25,r18
815
 849 0744 04F4      		brge .L54
816
 850 0746 9093 0000 		sts (KompassValue)+1,r25
817
 851 074a 8093 0000 		sts KompassValue,r24
818
 852               	.L54:
819
 853 074e 2091 0000 		lds r18,FromNaviCtrl+17
820
 854 0752 3091 0000 		lds r19,(FromNaviCtrl+17)+1
821
 855 0756 8091 0000 		lds r24,beeptime
822
 856 075a 9091 0000 		lds r25,(beeptime)+1
823
 857 075e 8217      		cp r24,r18
824
 858 0760 9307      		cpc r25,r19
825
 859 0762 00F4      		brsh .L55
826
 860 0764 8091 0000 		lds r24,DisableRcOffBeeping
827
 861 0768 8823      		tst r24
828
 862 076a 01F4      		brne .L55
829
 863 076c 3093 0000 		sts (beeptime)+1,r19
830
 864 0770 2093 0000 		sts beeptime,r18
831
 865               	.L55:
832
 866 0774 862F      		mov r24,r22
833
 867 0776 9927      		clr r25
834
 868 0778 8936      		cpi r24,105
835
 869 077a 9105      		cpc r25,__zero_reg__
836
 870 077c 01F4      		brne .+2
837
 871 077e 00C0      		rjmp .L62
838
 872 0780 8A36      		cpi r24,106
839
 873 0782 9105      		cpc r25,__zero_reg__
840
 874 0784 04F4      		brge .L70
841
 875 0786 8736      		cpi r24,103
842
 876 0788 9105      		cpc r25,__zero_reg__
843
 877 078a 01F0      		breq .L57
844
 878 078c 8836      		cpi r24,104
845
 879 078e 9105      		cpc r25,__zero_reg__
846
 880 0790 01F4      		brne .+2
847
 881 0792 00C0      		rjmp .L61
848
 882 0794 00C0      		rjmp .L20
849
 883               	.L70:
850
 884 0796 8A36      		cpi r24,106
851
 885 0798 9105      		cpc r25,__zero_reg__
852
 886 079a 01F4      		brne .+2
853
 887 079c 00C0      		rjmp .L67
854
 888 079e 8B36      		cpi r24,107
855
 889 07a0 9105      		cpc r25,__zero_reg__
856
 890 07a2 01F4      		brne .+2
857
 891 07a4 00C0      		rjmp .L63
858
 892 07a6 00C0      		rjmp .L20
859
 893               	.L57:
860
 894 07a8 8091 0000 		lds r24,FromNaviCtrl+19
861
 895 07ac 8093 0000 		sts FromNaviCtrl_Value,r24
862
 896 07b0 8091 0000 		lds r24,FromNaviCtrl+20
863
 897 07b4 8093 0000 		sts FromNaviCtrl_Value+2,r24
864
 898 07b8 8091 0000 		lds r24,FromNaviCtrl+21
865
 899 07bc 8093 0000 		sts FromNaviCtrl_Value+1,r24
866
 900 07c0 8091 0000 		lds r24,FromNaviCtrl+22
867
 901 07c4 8093 0000 		sts KompassFusion,r24
868
 902 07c8 8091 0000 		lds r24,FromNaviCtrl+23
869
 903 07cc 8093 0000 		sts FromNaviCtrl_Value+4,r24
870
 904 07d0 8091 0000 		lds r24,FromNaviCtrl+24
871
 905 07d4 8093 0000 		sts FromNC_Rotate_C,r24
872
 906 07d8 8091 0000 		lds r24,FromNaviCtrl+25
873
 907 07dc 8093 0000 		sts FromNC_Rotate_S,r24
874
 908 07e0 8091 0000 		lds r24,FromNaviCtrl+26
875
 909 07e4 8093 0000 		sts GPS_Aid_StickMultiplikator,r24
876
 910 07e8 8091 0000 		lds r24,CareFree
877
 911 07ec 8823      		tst r24
878
 912 07ee 01F0      		breq .L58
879
 913 07f0 2091 0000 		lds r18,FromNaviCtrl+27
880
 914 07f4 3091 0000 		lds r19,(FromNaviCtrl+27)+1
881
 915 07f8 37FD      		sbrc r19,7
882
 916 07fa 00C0      		rjmp .L58
883
 917 07fc 3093 0000 		sts (KompassSollWert)+1,r19
884
 918 0800 2093 0000 		sts KompassSollWert,r18
885
 919 0804 9091 0000 		lds r25,EE_Parameter+55
886
 920 0808 9923      		tst r25
887
 921 080a 01F0      		breq .L58
888
 922 080c 8FE0      		ldi r24,lo8(15)
889
 923 080e 989F      		mul r25,r24
890
 924 0810 C001      		movw r24,r0
891
 925 0812 1124      		clr r1
892
 926 0814 281B      		sub r18,r24
893
 927 0816 390B      		sbc r19,r25
894
 928 0818 C901      		movw r24,r18
895
 929 081a 8859      		subi r24,lo8(-(360))
896
 930 081c 9E4F      		sbci r25,hi8(-(360))
897
 931 081e 68E6      		ldi r22,lo8(360)
898
 932 0820 71E0      		ldi r23,hi8(360)
899
 933 0822 0E94 0000 		call __divmodhi4
900
 934 0826 9093 0000 		sts (KompassSollWert)+1,r25
901
 935 082a 8093 0000 		sts KompassSollWert,r24
902
 936               	.L58:
903
 937 082e 2091 0000 		lds r18,POI_KameraNick
904
 938 0832 3091 0000 		lds r19,(POI_KameraNick)+1
905
 939 0836 8091 0000 		lds r24,FromNaviCtrl+29
906
 940 083a 9091 0000 		lds r25,(FromNaviCtrl+29)+1
907
 941 083e 280F      		add r18,r24
908
 942 0840 391F      		adc r19,r25
909
 943 0842 37FF      		sbrs r19,7
910
 944 0844 00C0      		rjmp .L60
911
 945 0846 2F5F      		subi r18,lo8(-(1))
912
 946 0848 3F4F      		sbci r19,hi8(-(1))
913
 947               	.L60:
914
 948 084a 3595      		asr r19
915
 949 084c 2795      		ror r18
916
 950 084e 3093 0000 		sts (POI_KameraNick)+1,r19
917
 951 0852 2093 0000 		sts POI_KameraNick,r18
918
 952 0856 00C0      		rjmp .L20
919
 953               	.L61:
920
 954 0858 8091 0000 		lds r24,FromNaviCtrl+19
921
 955 085c 8093 0000 		sts NC_Version,r24
922
 956 0860 8091 0000 		lds r24,FromNaviCtrl+20
923
 957 0864 8093 0000 		sts NC_Version+1,r24
924
 958 0868 8091 0000 		lds r24,FromNaviCtrl+21
925
 959 086c 8093 0000 		sts NC_Version+2,r24
926
 960 0870 8091 0000 		lds r24,FromNaviCtrl+22
927
 961 0874 8093 0000 		sts NC_Version+3,r24
928
 962 0878 8091 0000 		lds r24,FromNaviCtrl+23
929
 963 087c 8093 0000 		sts NC_Version+4,r24
930
 964 0880 8091 0000 		lds r24,DebugOut
931
 965 0884 9091 0000 		lds r25,FromNaviCtrl+24
932
 966 0888 892B      		or r24,r25
933
 967 088a 8093 0000 		sts DebugOut,r24
934
 968 088e 9091 0000 		lds r25,DebugOut+1
935
 969 0892 9370      		andi r25,lo8(3)
936
 970 0894 8091 0000 		lds r24,FromNaviCtrl+25
937
 971 0898 8C70      		andi r24,lo8(12)
938
 972 089a 982B      		or r25,r24
939
 973 089c 9093 0000 		sts DebugOut+1,r25
940
 974 08a0 8091 0000 		lds r24,FromNaviCtrl+26
941
 975 08a4 8093 0000 		sts NC_ErrorCode,r24
942
 976 08a8 8091 0000 		lds r24,FromNaviCtrl+27
943
 977 08ac 8093 0000 		sts NC_GPS_ModeCharacter,r24
944
 978 08b0 8091 0000 		lds r24,FromNaviCtrl+28
945
 979 08b4 8093 0000 		sts FromNaviCtrl_Value+3,r24
946
 980 08b8 8091 0000 		lds r24,FromNaviCtrl+29
947
 981 08bc 8093 0000 		sts NC_To_FC_Flags,r24
948
 982 08c0 8091 0000 		lds r24,FromNaviCtrl+30
949
 983 08c4 8093 0000 		sts NC_To_FC_MaxAltitude,r24
950
 984 08c8 00C0      		rjmp .L20
951
 985               	.L62:
952
 986 08ca 8091 0000 		lds r24,FromNaviCtrl+19
953
 987 08ce 8093 0000 		sts GPSInfo,r24
954
 988 08d2 8091 0000 		lds r24,FromNaviCtrl+20
955
 989 08d6 8093 0000 		sts GPSInfo+1,r24
956
 990 08da 8091 0000 		lds r24,FromNaviCtrl+21
957
 991 08de 8093 0000 		sts GPSInfo+2,r24
958
 992 08e2 8091 0000 		lds r24,FromNaviCtrl+22
959
 993 08e6 8093 0000 		sts GPSInfo+3,r24
960
 994 08ea 8091 0000 		lds r24,FromNaviCtrl+23
961
 995 08ee 9091 0000 		lds r25,(FromNaviCtrl+23)+1
962
 996 08f2 9093 0000 		sts (GPSInfo+4)+1,r25
963
 997 08f6 8093 0000 		sts GPSInfo+4,r24
964
 998 08fa 8091 0000 		lds r24,FromNaviCtrl+25
965
 999 08fe 9091 0000 		lds r25,(FromNaviCtrl+25)+1
966
 1000 0902 9093 0000 		sts (GPSInfo+6)+1,r25
967
 1001 0906 8093 0000 		sts GPSInfo+6,r24
968
 1002 090a 8091 0000 		lds r24,FromNaviCtrl+27
969
 1003 090e 9927      		clr r25
970
 1004 0910 87FD      		sbrc r24,7
971
 1005 0912 9095      		com r25
972
 1006 0914 9093 0000 		sts (PPM_in+50)+1,r25
973
 1007 0918 8093 0000 		sts PPM_in+50,r24
974
 1008 091c 8091 0000 		lds r24,FromNaviCtrl+28
975
 1009 0920 8093 0000 		sts FromNC_AltitudeSpeed,r24
976
 1010 0924 8091 0000 		lds r24,FromNaviCtrl+29
977
 1011 0928 9091 0000 		lds r25,(FromNaviCtrl+29)+1
978
 1012 092c 9C01      		movw r18,r24
979
 1013 092e 4427      		clr r20
980
 1014 0930 37FD      		sbrc r19,7
981
 1015 0932 4095      		com r20
982
 1016 0934 542F      		mov r21,r20
983
 1017 0936 DA01      		movw r26,r20
984
 1018 0938 C901      		movw r24,r18
985
 1019 093a 63E0      		ldi r22,3
986
 1020 093c 880F      	1:	lsl r24
987
 1021 093e 991F      		rol r25
988
 1022 0940 AA1F      		rol r26
989
 1023 0942 BB1F      		rol r27
990
 1024 0944 6A95      		dec r22
991
 1025 0946 01F4      		brne 1b
992
 1026 0948 820F      		add r24,r18
993
 1027 094a 931F      		adc r25,r19
994
 1028 094c A41F      		adc r26,r20
995
 1029 094e B51F      		adc r27,r21
996
 1030 0950 820F      		add r24,r18
997
 1031 0952 931F      		adc r25,r19
998
 1032 0954 A41F      		adc r26,r20
999
 1033 0956 B51F      		adc r27,r21
1000
 1034 0958 8093 0000 		sts FromNC_AltitudeSetpoint,r24
1001
 1035 095c 9093 0000 		sts (FromNC_AltitudeSetpoint)+1,r25
1002
 1036 0960 A093 0000 		sts (FromNC_AltitudeSetpoint)+2,r26
1003
 1037 0964 B093 0000 		sts (FromNC_AltitudeSetpoint)+3,r27
1004
 1038 0968 00C0      		rjmp .L20
1005
 1039               	.L63:
1006
 1040 096a 8091 0000 		lds r24,FromNaviCtrl+19
1007
 1041 096e 8093 0000 		sts EarthMagneticField,r24
1008
 1042 0972 8091 0000 		lds r24,FromNaviCtrl+20
1009
 1043 0976 8093 0000 		sts EarthMagneticInclination,r24
1010
 1044 097a 8091 0000 		lds r24,FromNaviCtrl+21
1011
 1045 097e 8093 0000 		sts EarthMagneticInclinationTheoretic,r24
1012
 1046 0982 9091 0000 		lds r25,FromNaviCtrl+22
1013
 1047 0986 9923      		tst r25
1014
 1048 0988 01F0      		breq .L64
1015
 1049 098a 8091 0000 		lds r24,SpeakHoTT
1016
 1050 098e 8823      		tst r24
1017
 1051 0990 01F0      		breq .L66
1018
 1052 0992 8151      		subi r24,lo8(-(-17))
1019
 1053 0994 8330      		cpi r24,lo8(3)
1020
 1054 0996 00F4      		brsh .L64
1021
 1055               	.L66:
1022
 1056 0998 9093 0000 		sts SpeakHoTT,r25
1023
 1057               	.L64:
1024
 1058 099c 8091 0000 		lds r24,FromNaviCtrl+23
1025
 1059 09a0 8093 0000 		sts NaviData_WaypointIndex,r24
1026
 1060 09a4 8091 0000 		lds r24,FromNaviCtrl+24
1027
 1061 09a8 8093 0000 		sts NaviData_WaypointNumber,r24
1028
 1062 09ac 8091 0000 		lds r24,FromNaviCtrl+25
1029
 1063 09b0 9091 0000 		lds r25,(FromNaviCtrl+25)+1
1030
 1064 09b4 9093 0000 		sts (NaviData_TargetDistance)+1,r25
1031
 1065 09b8 8093 0000 		sts NaviData_TargetDistance,r24
1032
 1066 09bc 8091 0000 		lds r24,FromNaviCtrl+27
1033
 1067 09c0 8093 0000 		sts NaviData_TargetHoldTime,r24
1034
 1068 09c4 00C0      		rjmp .L20
1035
 1069               	.L67:
1036
 1070 09c6 8091 0000 		lds r24,EE_Parameter+39
1037
 1071 09ca 8630      		cpi r24,lo8(6)
1038
 1072 09cc 01F4      		brne .L20
1039
 1073 09ce 0E94 0000 		call NC_Fills_HoTT_Telemety
1040
 1074 09d2 00C0      		rjmp .L20
1041
 1075               	.L51:
1042
 1076 09d4 1092 0000 		sts (GPS_Nick)+1,__zero_reg__
1043
 1077 09d8 1092 0000 		sts GPS_Nick,__zero_reg__
1044
 1078 09dc 1092 0000 		sts (GPS_Roll)+1,__zero_reg__
1045
 1079 09e0 1092 0000 		sts GPS_Roll,__zero_reg__
1046
 1080               	.L20:
1047
 1081               	/* epilogue: frame size=0 */
1048
 1082 09e4 1F91      		pop r17
1049
 1083 09e6 0F91      		pop r16
1050
 1084 09e8 FF90      		pop r15
1051
 1085 09ea EF90      		pop r14
1052
 1086 09ec 0895      		ret
1053
 1087               	/* epilogue end (size=5) */
1054
 1088               	/* function UpdateSPI_Buffer size 1115 (1106) */
1055
 1090               	.global	SPI_StartTransmitPacket
1056
 1092               	SPI_StartTransmitPacket:
1057
 1093               	/* prologue: frame size=0 */
1058
 1094               	/* prologue end (size=0) */
1059
 1095 09ee 8091 0000 		lds r24,SPITransferCompleted
1060
 1096 09f2 8823      		tst r24
1061
 1097 09f4 01F4      		brne .+2
1062
 1098 09f6 00C0      		rjmp .L73
1063
 1099 09f8 4598      		cbi 40-0x20,5
1064
 1100 09fa 80E0      		ldi r24,lo8(ToNaviCtrl)
1065
 1101 09fc 90E0      		ldi r25,hi8(ToNaviCtrl)
1066
 1102 09fe 9093 0000 		sts (SPI_TX_Buffer)+1,r25
1067
 1103 0a02 8093 0000 		sts SPI_TX_Buffer,r24
1068
 1104 0a06 9091 0000 		lds r25,SPI_CommandCounter
1069
 1105 0a0a E92F      		mov r30,r25
1070
 1106 0a0c FF27      		clr r31
1071
 1107 0a0e E050      		subi r30,lo8(-(SPI_CommandSequence))
1072
 1108 0a10 F040      		sbci r31,hi8(-(SPI_CommandSequence))
1073
 1109 0a12 9F5F      		subi r25,lo8(-(1))
1074
 1110 0a14 9093 0000 		sts SPI_CommandCounter,r25
1075
 1111 0a18 8081      		ld r24,Z
1076
 1112 0a1a 8093 0000 		sts ToNaviCtrl+2,r24
1077
 1113 0a1e 9B30      		cpi r25,lo8(11)
1078
 1114 0a20 00F0      		brlo .L75
1079
 1115 0a22 1092 0000 		sts SPI_CommandCounter,__zero_reg__
1080
 1116               	.L75:
1081
 1117 0a26 1092 0000 		sts SPITransferCompleted,__zero_reg__
1082
 1118 0a2a 0E94 0000 		call UpdateSPI_Buffer
1083
 1119 0a2e 81E0      		ldi r24,lo8(1)
1084
 1120 0a30 8093 0000 		sts SPI_BufferIndex,r24
1085
 1121               	/* #APP */
1086
 1122 0a34 0000      		nop
1087
 1123 0a36 0000      		nop
1088
 1124 0a38 0000      		nop
1089
 1125 0a3a 0000      		nop
1090
 1126 0a3c 0000      		nop
1091
 1127 0a3e 0000      		nop
1092
 1128 0a40 0000      		nop
1093
 1129 0a42 0000      		nop
1094
 1130 0a44 0000      		nop
1095
 1131 0a46 0000      		nop
1096
 1132 0a48 0000      		nop
1097
 1133 0a4a 0000      		nop
1098
 1134 0a4c 0000      		nop
1099
 1135 0a4e 0000      		nop
1100
 1136 0a50 0000      		nop
1101
 1137 0a52 0000      		nop
1102
 1138 0a54 0000      		nop
1103
 1139 0a56 0000      		nop
1104
 1140 0a58 0000      		nop
1105
 1141 0a5a 0000      		nop
1106
 1142 0a5c 0000      		nop
1107
 1143 0a5e 0000      		nop
1108
 1144 0a60 0000      		nop
1109
 1145 0a62 0000      		nop
1110
 1146               	/* #NOAPP */
1111
 1147 0a64 8091 0000 		lds r24,ToNaviCtrl
1112
 1148 0a68 8093 0000 		sts ToNaviCtrl+33,r24
1113
 1149 0a6c 8EBD      		out 78-0x20,r24
1114
 1150               	.L73:
1115
 1151 0a6e 0895      		ret
1116
 1152               	/* epilogue: frame size=0 */
1117
 1153               	/* epilogue: noreturn */
1118
 1154               	/* epilogue end (size=0) */
1119
 1155               	/* function SPI_StartTransmitPacket size 89 (89) */
1120
 1157               		.comm GPSInfo,8,1
1121
 1158               		.comm NC_Version,5,1
1122
 1159               		.comm FromNaviCtrl_Value,5,1
1123
 1160               		.comm ToNaviCtrl,34,1
1124
 1161               		.comm FromNaviCtrl,32,1
1125
 1162               		.comm SPI_BufferIndex,1,1
1126
 1163               		.comm SPI_RxBufferIndex,1,1
1127
 1164               		.comm SPI_Buffer,32,1
1128
 1165               		.comm SPI_TX_Buffer,2,1
1129
 1166               		.comm SPITransferCompleted,1,1
1130
 1167               		.comm SPI_ChkSum,1,1
1131
 1168               		.comm SPI_RxDataValid,1,1
1132
 1169               	/* File "spi.c": code 1401 = 0x0579 (1391), prologues   4, epilogues   6 */
1133
DEFINED SYMBOLS
1134
                            *ABS*:00000000 spi.c
1135
  C:\Temp/ccnBcmNg.s:3      *ABS*:0000003f __SREG__
1136
  C:\Temp/ccnBcmNg.s:4      *ABS*:0000003e __SP_H__
1137
  C:\Temp/ccnBcmNg.s:5      *ABS*:0000003d __SP_L__
1138
  C:\Temp/ccnBcmNg.s:6      *ABS*:00000000 __tmp_reg__
1139
  C:\Temp/ccnBcmNg.s:7      *ABS*:00000001 __zero_reg__
1140
  C:\Temp/ccnBcmNg.s:15     .bss:00000000 MagVec
1141
  C:\Temp/ccnBcmNg.s:21     .bss:00000006 POI_KameraNick
1142
  C:\Temp/ccnBcmNg.s:27     .bss:00000008 NC_To_FC_MaxAltitude
1143
  C:\Temp/ccnBcmNg.s:33     .bss:00000009 NC_To_FC_Flags
1144
  C:\Temp/ccnBcmNg.s:39     .bss:0000000a EarthMagneticInclinationTheoretic
1145
  C:\Temp/ccnBcmNg.s:45     .bss:0000000b EarthMagneticInclination
1146
  C:\Temp/ccnBcmNg.s:51     .bss:0000000c EarthMagneticField
1147
  C:\Temp/ccnBcmNg.s:57     .data:00000000 NC_GPS_ModeCharacter
1148
  C:\Temp/ccnBcmNg.s:64     .bss:0000000d NC_ErrorCode
1149
  C:\Temp/ccnBcmNg.s:70     .bss:0000000e SPI_CommandCounter
1150
  C:\Temp/ccnBcmNg.s:76     .data:00000001 SPI_CommandSequence
1151
  C:\Temp/ccnBcmNg.s:91     .data:0000000c NaviDataOkay
1152
  C:\Temp/ccnBcmNg.s:98     .bss:0000000f FromNC_Rotate_S
1153
  C:\Temp/ccnBcmNg.s:104    .data:0000000d FromNC_Rotate_C
1154
  C:\Temp/ccnBcmNg.s:109    .text:00000000 SPI_MasterInit
1155
                            *COM*:00000001 SPITransferCompleted
1156
                            *COM*:00000022 ToNaviCtrl
1157
                            *COM*:00000005 FromNaviCtrl_Value
1158
                            *COM*:00000001 SPI_RxDataValid
1159
                             .bss:00000010 SPI_RXState.2
1160
  C:\Temp/ccnBcmNg.s:139    .bss:00000011 rxchksum.3
1161
  C:\Temp/ccnBcmNg.s:143    .text:00000042 SPI_TransmitByte
1162
                            *COM*:00000001 SPI_RxBufferIndex
1163
                            *COM*:00000020 SPI_Buffer
1164
                            *COM*:00000020 FromNaviCtrl
1165
                            *COM*:00000001 SPI_BufferIndex
1166
                            *COM*:00000002 SPI_TX_Buffer
1167
  C:\Temp/ccnBcmNg.s:140    .bss:00000012 motorindex.0
1168
  C:\Temp/ccnBcmNg.s:286    .data:0000000e oldcommand.1
1169
  C:\Temp/ccnBcmNg.s:291    .text:00000158 UpdateSPI_Buffer
1170
                            *COM*:00000005 NC_Version
1171
                            *COM*:00000008 GPSInfo
1172
  C:\Temp/ccnBcmNg.s:1092   .text:000009ee SPI_StartTransmitPacket
1173
                            *COM*:00000001 SPI_ChkSum
1174
 
1175
UNDEFINED SYMBOLS
1176
__do_copy_data
1177
__do_clear_bss
1178
SendSPI
1179
EE_Parameter
1180
IntegralNick
1181
__divmodsi4
1182
IntegralRoll
1183
ErsatzKompass
1184
GIER_GRAD_FAKTOR
1185
AdNeutralGier
1186
AdWertGier
1187
NaviCntAcc
1188
NaviAccNick
1189
__divmodhi4
1190
NaviAccRoll
1191
__tablejump2__
1192
Parameter_UserParam1
1193
Parameter_UserParam2
1194
Parameter_UserParam3
1195
Parameter_UserParam4
1196
Parameter_UserParam5
1197
Parameter_UserParam6
1198
Parameter_UserParam7
1199
Parameter_UserParam8
1200
FC_StatusFlags
1201
GetActiveParamSet
1202
FC_StatusFlags2
1203
Capacity
1204
UBat
1205
BattLowVoltageWarning
1206
VarioCharacter
1207
Motor
1208
__udivmodqi4
1209
JetiBeep
1210
HoTT_Waring
1211
JETI_CODE
1212
ToNC_SpeakHoTT
1213
PPM_in
1214
Poti
1215
WinkelOut
1216
HoehenWert
1217
SollHoehe
1218
SenderOkay
1219
DebugOut
1220
PlatinenVersion
1221
VersionInfo
1222
Parameter_GlobalConfig
1223
Parameter_ExtraConfig
1224
Parameter_ServoNickControl
1225
Parameter_ServoRollControl
1226
CalculateCompassTimer
1227
GPS_Nick
1228
GPS_Roll
1229
KompassValue
1230
beeptime
1231
DisableRcOffBeeping
1232
KompassFusion
1233
GPS_Aid_StickMultiplikator
1234
CareFree
1235
KompassSollWert
1236
FromNC_AltitudeSpeed
1237
FromNC_AltitudeSetpoint
1238
SpeakHoTT
1239
NaviData_WaypointIndex
1240
NaviData_WaypointNumber
1241
NaviData_TargetDistance
1242
NaviData_TargetHoldTime
1243
NC_Fills_HoTT_Telemety