Rev 1783 | Rev 1839 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1783 | Rev 1837 | ||
---|---|---|---|
Line 336... | Line 336... | ||
336 | case FC_ADDRESS: // FC special commands |
336 | case FC_ADDRESS: // FC special commands |
337 | switch(RxdBuffer[2]) |
337 | switch(RxdBuffer[2]) |
338 | { |
338 | { |
339 | case 'K':// Kompasswert |
339 | case 'K':// Kompasswert |
340 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
340 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
341 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
341 | KompassRichtung = ((540 + KompassValue - KompassSollWert) % 360) - 180; |
342 | break; |
342 | break; |
343 | case 't':// Motortest |
343 | case 't':// Motortest |
344 | if(AnzahlEmpfangsBytes > 20) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |
344 | if(AnzahlEmpfangsBytes > 20) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |
345 | else memcpy(&MotorTest[0], (unsigned char *)pRxData, 4); |
345 | else memcpy(&MotorTest[0], (unsigned char *)pRxData, 4); |
346 | PC_MotortestActive = 240; |
346 | PC_MotortestActive = 240; |
Line 543... | Line 543... | ||
543 | AboTimeOut = SetDelay(ABO_TIMEOUT); |
543 | AboTimeOut = SetDelay(ABO_TIMEOUT); |
544 | break; |
544 | break; |
545 | // 'K' comand placed here only for compatibility to old MK3MAG software, that does not send the right Slave Address |
545 | // 'K' comand placed here only for compatibility to old MK3MAG software, that does not send the right Slave Address |
546 | case 'K':// Kompasswert |
546 | case 'K':// Kompasswert |
547 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
547 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
548 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
548 | KompassRichtung = ((540 + KompassValue - KompassSollWert) % 360) - 180; |
549 | break; |
549 | break; |
550 | case 'a':// Texte der Analogwerte |
550 | case 'a':// Texte der Analogwerte |
551 | DebugTextAnforderung = pRxData[0]; |
551 | DebugTextAnforderung = pRxData[0]; |
552 | if (DebugTextAnforderung > 31) DebugTextAnforderung = 31; |
552 | if (DebugTextAnforderung > 31) DebugTextAnforderung = 31; |
553 | PcZugriff = 255; |
553 | PcZugriff = 255; |