Rev 1063 | Rev 1100 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1063 | Rev 1065 | ||
---|---|---|---|
Line 298... | Line 298... | ||
298 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
298 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
299 | break; |
299 | break; |
Line 300... | Line 300... | ||
300 | 300 | ||
301 | case 't':// Motortest |
301 | case 't':// Motortest |
302 | memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |
302 | memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |
303 | while(!UebertragungAbgeschlossen); |
303 | //while(!UebertragungAbgeschlossen); |
304 | SendOutData('T', MeineSlaveAdresse, 0); |
304 | //SendOutData('T', MeineSlaveAdresse, 0); |
305 | PcZugriff = 255; |
305 | PcZugriff = 255; |
Line 306... | Line 306... | ||
306 | break; |
306 | break; |
307 | 307 | ||
Line 468... | Line 468... | ||
468 | //--------------------------------------------------------------------------------------------- |
468 | //--------------------------------------------------------------------------------------------- |
469 | void DatenUebertragung(void) |
469 | void DatenUebertragung(void) |
470 | { |
470 | { |
471 | if(!UebertragungAbgeschlossen) return; |
471 | if(!UebertragungAbgeschlossen) return; |
Line -... | Line 472... | ||
- | 472 | ||
- | 473 | if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
|
- | 474 | { |
|
- | 475 | Menu(); |
|
- | 476 | SendOutData('H', FC_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), &DisplayBuff[DisplayLine * 20], 20); |
|
- | 477 | DisplayLine++; |
|
- | 478 | if(DisplayLine >= 4) DisplayLine = 0; |
|
- | 479 | DebugDisplayAnforderung = 0; |
|
- | 480 | } |
|
- | 481 | if(DebugDisplayAnforderung1 && UebertragungAbgeschlossen) |
|
- | 482 | { |
|
- | 483 | Menu(); |
|
- | 484 | SendOutData('L', FC_ADDRESS, 3, &MenuePunkt, sizeof(MenuePunkt), &MaxMenue, sizeof(MaxMenue), DisplayBuff, sizeof(DisplayBuff)); |
|
- | 485 | DebugDisplayAnforderung1 = 0; |
|
- | 486 | } |
|
- | 487 | if(GetVersionAnforderung && UebertragungAbgeschlossen) |
|
- | 488 | { |
|
- | 489 | SendOutData('V', FC_ADDRESS, 1, (unsigned char *) &VersionInfo, sizeof(VersionInfo)); |
|
- | 490 | GetVersionAnforderung = 0; |
|
- | 491 | } |
|
472 | 492 | ||
473 | if(GetExternalControl && UebertragungAbgeschlossen) // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
493 | if(GetExternalControl && UebertragungAbgeschlossen) // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
474 | { |
494 | { |
475 | SendOutData('G',MeineSlaveAdresse, 1, (unsigned char *) &ExternControl, sizeof(ExternControl)); |
495 | SendOutData('G',MeineSlaveAdresse, 1, (unsigned char *) &ExternControl, sizeof(ExternControl)); |
476 | GetExternalControl = 0; |
496 | GetExternalControl = 0; |
Line 477... | Line 497... | ||
477 | } |
497 | } |
478 | 498 | ||
479 | if((CheckDelay(Kompass_Timer)) && UebertragungAbgeschlossen) |
499 | if((CheckDelay(Kompass_Timer)) && UebertragungAbgeschlossen) |
480 | { |
500 | { |
Line 501... | Line 521... | ||
501 | { |
521 | { |
502 | SendOutData('B', FC_ADDRESS, 1, (uint8_t*)&ConfirmFrame, sizeof(ConfirmFrame)); |
522 | SendOutData('B', FC_ADDRESS, 1, (uint8_t*)&ConfirmFrame, sizeof(ConfirmFrame)); |
503 | ConfirmFrame = 0; |
523 | ConfirmFrame = 0; |
504 | } |
524 | } |
Line 505... | Line -... | ||
505 | - | ||
506 | if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
- | |
507 | { |
- | |
508 | Menu(); |
- | |
509 | SendOutData('H', FC_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), &DisplayBuff[DisplayLine * 20], 20); |
- | |
510 | DisplayLine++; |
- | |
511 | if(DisplayLine >= 4) DisplayLine = 0; |
- | |
512 | DebugDisplayAnforderung = 0; |
- | |
513 | } |
- | |
514 | if(DebugDisplayAnforderung1 && UebertragungAbgeschlossen) |
- | |
515 | { |
- | |
516 | Menu(); |
- | |
517 | SendOutData('L', FC_ADDRESS, 3, &MenuePunkt, sizeof(MenuePunkt), &MaxMenue, sizeof(MaxMenue), DisplayBuff, sizeof(DisplayBuff)); |
- | |
518 | DebugDisplayAnforderung1 = 0; |
- | |
519 | } |
- | |
520 | if(GetVersionAnforderung && UebertragungAbgeschlossen) |
- | |
521 | { |
- | |
522 | SendOutData('V', FC_ADDRESS, 1, (unsigned char *) &VersionInfo, sizeof(VersionInfo)); |
- | |
523 | GetVersionAnforderung = 0; |
- | |
524 | } |
525 | |
525 | if(GetPPMChannelAnforderung && UebertragungAbgeschlossen) |
526 | if(GetPPMChannelAnforderung && UebertragungAbgeschlossen) |
526 | { |
527 | { |
527 | SendOutData('P', FC_ADDRESS, 1, (unsigned char *) &PPM_in, sizeof(PPM_in)); |
528 | SendOutData('P', FC_ADDRESS, 1, (unsigned char *) &PPM_in, sizeof(PPM_in)); |
528 | GetPPMChannelAnforderung = 0; |
529 | GetPPMChannelAnforderung = 0; |