Rev 2427 | Rev 2443 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2427 | Rev 2437 | ||
---|---|---|---|
Line 137... | Line 137... | ||
137 | "Current [0.1A] ", |
137 | "Current [0.1A] ", |
138 | "Capacity [mAh] ", |
138 | "Capacity [mAh] ", |
139 | "Height Setpoint ", |
139 | "Height Setpoint ", |
140 | "25 ", //25 |
140 | "25 ", //25 |
141 | "26 ", //"26 CPU OverLoad ", |
141 | "26 ", //"26 CPU OverLoad ", |
142 | "Compass Setpoint", |
142 | "27 ", |
143 | "I2C-Error ", |
143 | "I2C-Error ", |
144 | "BL Limit ", |
144 | "BL Limit ", |
145 | "GPS_Nick ", //30 |
145 | "GPS_Nick ", //30 |
146 | "GPS_Roll " |
146 | "GPS_Roll " |
147 | }; |
147 | }; |
Line 570... | Line 570... | ||
570 | 570 | ||
Line 571... | Line 571... | ||
571 | default: // any Slave Address |
571 | default: // any Slave Address |
572 | 572 | ||
- | 573 | switch(RxdBuffer[2]) |
|
573 | switch(RxdBuffer[2]) |
574 | { |
574 | { |
575 | #ifdef REDUNDANT_FC_SLAVE |
575 | static unsigned int clear_I; |
576 | static unsigned int clear_I; |
576 | case '?':// Serielle Antwort eines BL-Reglers |
577 | case '?':// Serielle Antwort eines BL-Reglers |
577 | tempchar1 = RxdBuffer[1] - ('a'+11); |
578 | tempchar1 = RxdBuffer[1] - ('a'+11); |
578 | if(tempchar1 >= MAX_MOTORS) break; |
579 | if(tempchar1 >= MAX_MOTORS) break; |
- | 580 | memcpy((unsigned char *)&RedundantMotor[tempchar1], (unsigned char *)pRxData, sizeof(RedundantBl_t)); |
|
579 | memcpy((unsigned char *)&RedundantMotor[tempchar1], (unsigned char *)pRxData, sizeof(RedundantBl_t)); |
581 | if(RedundantMotor[tempchar1].BitSate & BL_BIT_STATE_I2C_OK && clear_I) clear_I--; |
580 | if(RedundantMotor[tempchar1].BitSate & BL_BIT_STATE_I2C_OK && clear_I) clear_I--; |
582 | if(!(RedundantMotor[tempchar1].BitSate & BL_BIT_STATE_I2C_OK)) ROT_FLASH; |
581 | 583 | GRN_FLASH; |
|
- | 584 | if(RedundantMotor[tempchar1].BitSate & BL_BIT_STATE_I2C_BAD) |
|
582 | if(RedundantMotor[tempchar1].BitSate & BL_BIT_STATE_I2C_BAD) |
585 | { |
583 | { |
586 | ROT_ON; |
584 | if(clear_I == 0) |
- | |
585 | { |
587 | if(clear_I == 0) |
586 | PORTB |= 0x02; |
588 | { |
587 | SummeNick = 0; |
589 | SummeNick = 0; |
588 | SummeRoll = 0; |
590 | SummeRoll = 0; |
589 | Mess_Integral_Gier = 0; |
591 | Mess_Integral_Gier = 0; |
590 | } |
592 | } |
591 | clear_I = 500; |
- | |
592 | } |
593 | clear_I = 500; |
593 | else PORTB &=~0x02; |
594 | } |
594 | //DebugOut.Analog[16] = RedundantMotor[tempchar1].BitSate; |
595 | //DebugOut.Analog[16] = RedundantMotor[tempchar1].BitSate; |
595 | //DebugOut.Analog[17]++; |
596 | //DebugOut.Analog[17]++; |
- | 597 | //DebugOut.Analog[18] = tempchar1; |
|
596 | //DebugOut.Analog[18] = tempchar1; |
598 | break; |
597 | break; |
599 | #endif |
598 | // 't' comand placed here only for compatibility to BL |
600 | // 't' comand placed here only for compatibility to BL |
599 | case 't':// Motortest |
601 | case 't':// Motortest |
600 | if(AnzahlEmpfangsBytes >= sizeof(MotorTest)) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |
602 | if(AnzahlEmpfangsBytes >= sizeof(MotorTest)) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest)); |