75,6 → 75,7 |
int Display_Timer, Debug_Timer,Kompass_Timer,Timer3D; |
unsigned int DebugDataIntervall = 0, Intervall3D = 0, Display_Interval = 0; |
unsigned int AboTimeOut = 0; |
unsigned volatile char JetiUpdateModeActive = 0; |
|
const unsigned char ANALOG_TEXT[32][16] PROGMEM = |
{ |
121,7 → 122,8 |
{ |
static unsigned int ptr = 0; |
unsigned char tmp_tx; |
if(!UebertragungAbgeschlossen) |
|
if(!UebertragungAbgeschlossen) |
{ |
ptr++; // die [0] wurde schon gesendet |
tmp_tx = TxdBuffer[ptr]; |
145,7 → 147,12 |
static unsigned char UartState = 0; |
unsigned char CrcOkay = 0; |
|
if (JetiUpdateModeActive) { UDR1 = UDR0; return; } |
|
SioTmp = UDR0; |
|
|
|
if(buf_ptr >= MAX_SENDE_BUFF) UartState = 0; |
if(SioTmp == '\r' && UartState == 2) |
{ |
167,8 → 174,8 |
LcdClear(); |
wdt_enable(WDTO_250MS); // Reset-Commando |
ServoActive = 0; |
|
} |
|
} |
} |
else |
460,7 → 467,41 |
SendOutData('W', FC_ADDRESS,2, &tempchar1, sizeof(tempchar1), &tempchar2, sizeof(tempchar2)); |
} |
break; |
case 'j': |
{ uint16_t ubrr = (uint16_t) ((uint32_t) F_CPU/ (8 * 38400L) - 1); |
|
JetiUpdateModeActive = 1; |
|
UBRR1H = (uint8_t)(ubrr>>8); |
UBRR1L = (uint8_t)ubrr; |
|
UBRR0H = UBRR1H; |
UBRR0L = UBRR1L; |
|
UCSR1C &= ~(1 << UPM11); // 0 = parity disabled |
UCSR1C &= ~(1 << UPM10); |
|
// 1 stop bit |
UCSR1C &= ~(1 << USBS1); |
UCSR0C &= ~(1 << USBS0); |
|
// 8-bit |
UCSR1B &= ~(1 << UCSZ12); |
UCSR1C |= (1 << UCSZ11); |
UCSR1C |= (1 << UCSZ10); |
|
UCSR0B &= ~(1 << TXCIE0); |
UCSR1B &= ~(1 << TXCIE1); |
|
UCSR1B |= (1 << RXEN1); // enable RX |
|
TIMSK1 &= ~_BV(ICIE1); // disable other Interrupts |
TIMSK2 &= ~(1<<OCIE2A); |
TIMSK0 &= ~_BV(TOIE0); |
|
} |
break; |
|
} // case FC_ADDRESS: |
|
default: // any Slave Address |