Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 | // + Copyright (c) 04.2007 Holger Buss |
||
3 | // + only for non-profit use |
||
4 | // + www.MikroKopter.com |
||
5 | // + see the File "License.txt" for further Informations |
||
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
7 | |||
8 | #include "main.h" |
||
9 | #include "uart.h" |
||
10 | |||
11 | unsigned char DebugGetAnforderung = 0,DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0; |
||
12 | unsigned volatile char SioTmp = 0; |
||
683 | killagreg | 13 | unsigned volatile char txd_buffer[TXD_BUFFER_LEN]; |
14 | unsigned volatile char rxd_buffer[RXD_BUFFER_LEN]; |
||
15 | |||
1 | ingob | 16 | unsigned volatile char NeuerDatensatzEmpfangen = 0; |
17 | unsigned volatile char NeueKoordinateEmpfangen = 0; |
||
18 | unsigned volatile char UebertragungAbgeschlossen = 1; |
||
19 | unsigned volatile char CntCrcError = 0; |
||
20 | unsigned volatile char AnzahlEmpfangsBytes = 0; |
||
21 | unsigned volatile char PC_DebugTimeout = 0; |
||
499 | hbuss | 22 | unsigned char RemotePollDisplayLine = 0; |
395 | hbuss | 23 | unsigned char NurKanalAnforderung = 0; |
499 | hbuss | 24 | unsigned char DebugTextAnforderung = 255; |
1 | ingob | 25 | unsigned char PcZugriff = 100; |
26 | unsigned char MotorTest[4] = {0,0,0,0}; |
||
683 | killagreg | 27 | unsigned char DubWiseKeys[4] = {0,0,0,0}; |
1 | ingob | 28 | unsigned char MeineSlaveAdresse; |
595 | hbuss | 29 | unsigned char ConfirmFrame; |
1 | ingob | 30 | struct str_DebugOut DebugOut; |
595 | hbuss | 31 | struct str_ExternControl ExternControl; |
1 | ingob | 32 | struct str_VersionInfo VersionInfo; |
33 | int Debug_Timer; |
||
34 | |||
499 | hbuss | 35 | const unsigned char ANALOG_TEXT[32][16] = |
36 | { |
||
683 | killagreg | 37 | //1234567890123456 |
499 | hbuss | 38 | "IntegralNick ", //0 |
39 | "IntegralRoll ", |
||
683 | killagreg | 40 | "AccNick ", |
499 | hbuss | 41 | "AccRoll ", |
42 | "GyroGier ", |
||
43 | "HoehenWert ", //5 |
||
44 | "AccZ ", |
||
45 | "Gas ", |
||
46 | "KompassValue ", |
||
513 | hbuss | 47 | "Spannung ", |
48 | "Empfang ", //10 |
||
49 | "Analog11 ", |
||
499 | hbuss | 50 | "Motor_Vorne ", |
51 | "Motor_Hinten ", |
||
52 | "Motor_Links ", |
||
53 | "Motor_Rechts ", //15 |
||
513 | hbuss | 54 | "Acc_Z ", |
55 | "MittelAccNick ", |
||
56 | "MittelAccRoll ", |
||
57 | "IntegralErrNick ", |
||
499 | hbuss | 58 | "IntegralErrRoll ", //20 |
513 | hbuss | 59 | "MittelIntNick ", |
60 | "MittelIntRoll ", |
||
61 | "NeutralNick ", |
||
62 | "RollOffset ", |
||
63 | "IntRoll*Faktor ", //25 |
||
623 | hbuss | 64 | "Analog26 ", |
499 | hbuss | 65 | "DirektAusglRoll ", |
513 | hbuss | 66 | "MesswertRoll ", |
67 | "AusgleichRoll ", |
||
68 | "I-LageRoll ", //30 |
||
69 | "StickRoll " |
||
499 | hbuss | 70 | }; |
71 | |||
72 | |||
73 | |||
683 | killagreg | 74 | /****************************************************************/ |
75 | /* Initialization of the USART0 */ |
||
76 | /****************************************************************/ |
||
77 | void USART0_Init (void) |
||
1 | ingob | 78 | { |
683 | killagreg | 79 | uint8_t sreg = SREG; |
80 | uint16_t ubrr = (uint16_t) ((uint32_t) SYSCLK/(8 * USART0_BAUD) - 1); |
||
81 | |||
82 | // disable all interrupts before configuration |
||
83 | cli(); |
||
84 | |||
85 | // disable RX-Interrupt |
||
86 | UCSR0B &= ~(1 << RXCIE0); |
||
87 | // disable TX-Interrupt |
||
88 | UCSR0B &= ~(1 << TXCIE0); |
||
89 | |||
90 | // set direction of RXD0 and TXD0 pins |
||
91 | // set RXD0 (PD0) as an input pin |
||
92 | PORTD |= (1 << PORTD0); |
||
93 | DDRD &= ~(1 << DDD0); |
||
94 | // set TXD0 (PD1) as an output pin |
||
95 | PORTD |= (1 << PORTD1); |
||
96 | DDRD |= (1 << DDD1); |
||
97 | |||
98 | // USART0 Baud Rate Register |
||
99 | // set clock divider |
||
100 | UBRR0H = (uint8_t)(ubrr >> 8); |
||
101 | UBRR0L = (uint8_t)ubrr; |
||
102 | |||
103 | // USART0 Control and Status Register A, B, C |
||
104 | |||
105 | // enable double speed operation in |
||
106 | UCSR0A |= (1 << U2X0); |
||
107 | // enable receiver and transmitter in |
||
108 | UCSR0B = (1 << TXEN0) | (1 << RXEN0); |
||
109 | // set asynchronous mode |
||
110 | UCSR0C &= ~(1 << UMSEL01); |
||
111 | UCSR0C &= ~(1 << UMSEL00); |
||
112 | // no parity |
||
113 | UCSR0C &= ~(1 << UPM01); |
||
114 | UCSR0C &= ~(1 << UPM00); |
||
115 | // 1 stop bit |
||
116 | UCSR0C &= ~(1 << USBS0); |
||
117 | // 8-bit |
||
118 | UCSR0B &= ~(1 << UCSZ02); |
||
119 | UCSR0C |= (1 << UCSZ01); |
||
120 | UCSR0C |= (1 << UCSZ00); |
||
121 | |||
122 | // flush receive buffer |
||
123 | while ( UCSR0A & (1<<RXC0) ) UDR0; |
||
124 | |||
125 | // enable interrupts at the end |
||
126 | // enable RX-Interrupt |
||
127 | UCSR0B |= (1 << RXCIE0); |
||
128 | // enable TX-Interrupt |
||
129 | UCSR0B |= (1 << TXCIE0); |
||
130 | |||
131 | // restore global interrupt flags |
||
132 | SREG = sreg; |
||
133 | } |
||
134 | |||
135 | /****************************************************************/ |
||
136 | /* USART0 transmitter ISR */ |
||
137 | /****************************************************************/ |
||
138 | ISR(USART0_TX_vect) |
||
139 | { |
||
140 | static uint16_t ptr = 0; |
||
141 | uint8_t tmp_tx; |
||
142 | if(!UebertragungAbgeschlossen) |
||
1 | ingob | 143 | { |
144 | ptr++; // die [0] wurde schon gesendet |
||
683 | killagreg | 145 | tmp_tx = txd_buffer[ptr]; |
146 | if((tmp_tx == '\r') || (ptr == TXD_BUFFER_LEN)) |
||
1 | ingob | 147 | { |
148 | ptr = 0; |
||
149 | UebertragungAbgeschlossen = 1; |
||
150 | } |
||
683 | killagreg | 151 | UDR0 = tmp_tx; // send byte will trigger this ISR again |
152 | } |
||
1 | ingob | 153 | else ptr = 0; |
154 | } |
||
155 | |||
683 | killagreg | 156 | /****************************************************************/ |
157 | /* USART0 receiver ISR */ |
||
158 | /****************************************************************/ |
||
159 | ISR(USART0_RX_vect) |
||
1 | ingob | 160 | { |
683 | killagreg | 161 | static uint16_t crc; |
162 | static uint8_t crc1,crc2,buf_ptr; |
||
163 | static uint8_t UartState = 0; |
||
164 | uint8_t CrcOkay = 0; |
||
1 | ingob | 165 | |
683 | killagreg | 166 | SioTmp = UDR0; |
167 | if(buf_ptr >= RXD_BUFFER_LEN) UartState = 0; |
||
168 | if(SioTmp == '\r' && UartState == 2) |
||
1 | ingob | 169 | { |
170 | UartState = 0; |
||
683 | killagreg | 171 | crc -= rxd_buffer[buf_ptr-2]; |
172 | crc -= rxd_buffer[buf_ptr-1]; |
||
1 | ingob | 173 | crc %= 4096; |
174 | crc1 = '=' + crc / 64; |
||
175 | crc2 = '=' + crc % 64; |
||
176 | CrcOkay = 0; |
||
683 | killagreg | 177 | if((crc1 == rxd_buffer[buf_ptr-2]) && (crc2 == rxd_buffer[buf_ptr-1])) CrcOkay = 1; else { CrcOkay = 0; CntCrcError++;}; |
1 | ingob | 178 | if(!NeuerDatensatzEmpfangen && CrcOkay) // Datensatz schon verarbeitet |
179 | { |
||
683 | killagreg | 180 | NeuerDatensatzEmpfangen = 1; |
1 | ingob | 181 | AnzahlEmpfangsBytes = buf_ptr; |
683 | killagreg | 182 | rxd_buffer[buf_ptr] = '\r'; |
183 | if(rxd_buffer[2] == 'R') wdt_enable(WDTO_250MS); // Reset-Commando |
||
184 | } |
||
1 | ingob | 185 | } |
186 | else |
||
187 | switch(UartState) |
||
188 | { |
||
189 | case 0: |
||
190 | if(SioTmp == '#' && !NeuerDatensatzEmpfangen) UartState = 1; // Startzeichen und Daten schon verarbeitet |
||
191 | buf_ptr = 0; |
||
683 | killagreg | 192 | rxd_buffer[buf_ptr++] = SioTmp; |
1 | ingob | 193 | crc = SioTmp; |
194 | break; |
||
195 | case 1: // Adresse auswerten |
||
196 | UartState++; |
||
683 | killagreg | 197 | rxd_buffer[buf_ptr++] = SioTmp; |
1 | ingob | 198 | crc += SioTmp; |
199 | break; |
||
200 | case 2: // Eingangsdaten sammeln |
||
683 | killagreg | 201 | rxd_buffer[buf_ptr] = SioTmp; |
202 | if(buf_ptr < RXD_BUFFER_LEN) buf_ptr++; |
||
1 | ingob | 203 | else UartState = 0; |
204 | crc += SioTmp; |
||
205 | break; |
||
683 | killagreg | 206 | default: |
207 | UartState = 0; |
||
1 | ingob | 208 | break; |
209 | } |
||
210 | } |
||
211 | |||
212 | |||
683 | killagreg | 213 | |
1 | ingob | 214 | // -------------------------------------------------------------------------- |
215 | void AddCRC(unsigned int wieviele) |
||
216 | { |
||
683 | killagreg | 217 | uint16_t tmpCRC = 0,i; |
1 | ingob | 218 | for(i = 0; i < wieviele;i++) |
219 | { |
||
683 | killagreg | 220 | tmpCRC += txd_buffer[i]; |
1 | ingob | 221 | } |
222 | tmpCRC %= 4096; |
||
683 | killagreg | 223 | txd_buffer[i++] = '=' + tmpCRC / 64; |
224 | txd_buffer[i++] = '=' + tmpCRC % 64; |
||
225 | txd_buffer[i++] = '\r'; |
||
1 | ingob | 226 | UebertragungAbgeschlossen = 0; |
683 | killagreg | 227 | UDR0 = txd_buffer[0]; |
1 | ingob | 228 | } |
229 | |||
230 | |||
231 | |||
232 | // -------------------------------------------------------------------------- |
||
683 | killagreg | 233 | void SendOutData(uint8_t cmd,uint8_t modul, uint8_t *snd, uint8_t len) |
1 | ingob | 234 | { |
683 | killagreg | 235 | uint16_t pt = 0; |
236 | uint8_t a,b,c; |
||
237 | uint8_t ptr = 0; |
||
1 | ingob | 238 | |
683 | killagreg | 239 | txd_buffer[pt++] = '#'; // Startzeichen |
240 | txd_buffer[pt++] = modul; // Adresse (a=0; b=1,...) |
||
241 | txd_buffer[pt++] = cmd; // Commando |
||
1 | ingob | 242 | |
243 | while(len) |
||
244 | { |
||
245 | if(len) { a = snd[ptr++]; len--;} else a = 0; |
||
246 | if(len) { b = snd[ptr++]; len--;} else b = 0; |
||
247 | if(len) { c = snd[ptr++]; len--;} else c = 0; |
||
683 | killagreg | 248 | txd_buffer[pt++] = '=' + (a >> 2); |
249 | txd_buffer[pt++] = '=' + (((a & 0x03) << 4) | ((b & 0xf0) >> 4)); |
||
250 | txd_buffer[pt++] = '=' + (((b & 0x0f) << 2) | ((c & 0xc0) >> 6)); |
||
251 | txd_buffer[pt++] = '=' + ( c & 0x3f); |
||
1 | ingob | 252 | } |
253 | AddCRC(pt); |
||
254 | } |
||
255 | |||
256 | |||
257 | // -------------------------------------------------------------------------- |
||
683 | killagreg | 258 | void Decode64(uint8_t *ptrOut, uint8_t len, uint8_t ptrIn, uint8_t max) // Wohin mit den Daten; Wie lang; Wo im rxd_buffer |
1 | ingob | 259 | { |
683 | killagreg | 260 | uint8_t a,b,c,d; |
261 | uint8_t ptr = 0; |
||
262 | uint8_t x,y,z; |
||
1 | ingob | 263 | while(len) |
264 | { |
||
683 | killagreg | 265 | a = rxd_buffer[ptrIn++] - '='; |
266 | b = rxd_buffer[ptrIn++] - '='; |
||
267 | c = rxd_buffer[ptrIn++] - '='; |
||
268 | d = rxd_buffer[ptrIn++] - '='; |
||
1 | ingob | 269 | if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden |
270 | |||
271 | x = (a << 2) | (b >> 4); |
||
272 | y = ((b & 0x0f) << 4) | (c >> 2); |
||
273 | z = ((c & 0x03) << 6) | d; |
||
274 | |||
275 | if(len--) ptrOut[ptr++] = x; else break; |
||
276 | if(len--) ptrOut[ptr++] = y; else break; |
||
277 | if(len--) ptrOut[ptr++] = z; else break; |
||
278 | } |
||
279 | |||
280 | } |
||
281 | |||
282 | // -------------------------------------------------------------------------- |
||
283 | void BearbeiteRxDaten(void) |
||
284 | { |
||
285 | if(!NeuerDatensatzEmpfangen) return; |
||
286 | |||
683 | killagreg | 287 | uint8_t tmp_char_arr2[2]; |
288 | |||
1 | ingob | 289 | PcZugriff = 255; |
683 | killagreg | 290 | switch(rxd_buffer[2]) |
1 | ingob | 291 | { |
499 | hbuss | 292 | case 'a':// Texte der Analogwerte |
683 | killagreg | 293 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
499 | hbuss | 294 | DebugTextAnforderung = tmp_char_arr2[0]; |
295 | break; |
||
595 | hbuss | 296 | case 'b': |
683 | killagreg | 297 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
595 | hbuss | 298 | RemoteTasten |= ExternControl.RemoteTasten; |
299 | ConfirmFrame = ExternControl.Frame; |
||
300 | break; |
||
301 | case 'c': |
||
683 | killagreg | 302 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
595 | hbuss | 303 | RemoteTasten |= ExternControl.RemoteTasten; |
304 | ConfirmFrame = ExternControl.Frame; |
||
1 | ingob | 305 | DebugDataAnforderung = 1; |
306 | break; |
||
307 | case 'h':// x-1 Displayzeilen |
||
683 | killagreg | 308 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
1 | ingob | 309 | RemoteTasten |= tmp_char_arr2[0]; |
395 | hbuss | 310 | if(tmp_char_arr2[1] == 255) NurKanalAnforderung = 1; else NurKanalAnforderung = 0; // keine Displaydaten |
1 | ingob | 311 | DebugDisplayAnforderung = 1; |
312 | break; |
||
313 | case 't':// Motortest |
||
683 | killagreg | 314 | Decode64((uint8_t *) &MotorTest[0],sizeof(MotorTest),3,AnzahlEmpfangsBytes); |
1 | ingob | 315 | break; |
492 | hbuss | 316 | case 'k':// Keys von DubWise |
683 | killagreg | 317 | Decode64((uint8_t *) &DubWiseKeys[0],sizeof(DubWiseKeys),3,AnzahlEmpfangsBytes); |
595 | hbuss | 318 | ConfirmFrame = DubWiseKeys[3]; |
492 | hbuss | 319 | break; |
1 | ingob | 320 | case 'v': // Version-Anforderung und Ausbaustufe |
321 | GetVersionAnforderung = 1; |
||
683 | killagreg | 322 | break; |
323 | case 'g':// "Get"-Anforderung für Debug-Daten |
||
1 | ingob | 324 | // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
325 | DebugGetAnforderung = 1; |
||
326 | break; |
||
327 | case 'q':// "Get"-Anforderung für Settings |
||
328 | // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
||
683 | killagreg | 329 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
1 | ingob | 330 | if(tmp_char_arr2[0] != 0xff) |
331 | { |
||
332 | if(tmp_char_arr2[0] > 5) tmp_char_arr2[0] = 5; |
||
683 | killagreg | 333 | ReadParameterSet(tmp_char_arr2[0], (uint8_t *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
334 | SendOutData('L' + tmp_char_arr2[0] -1,MeineSlaveAdresse,(uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
||
335 | } |
||
336 | else |
||
337 | SendOutData('L' + GetActiveParamSetNumber()-1,MeineSlaveAdresse,(uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
||
338 | |||
1 | ingob | 339 | break; |
683 | killagreg | 340 | |
1 | ingob | 341 | case 'l': |
342 | case 'm': |
||
343 | case 'n': |
||
344 | case 'o': |
||
345 | case 'p': // Parametersatz speichern |
||
683 | killagreg | 346 | Decode64((uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE,3,AnzahlEmpfangsBytes); |
347 | WriteParameterSet(rxd_buffer[2] - 'l' + 1, (uint8_t *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
||
348 | eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], rxd_buffer[2] - 'l' + 1); // aktiven Datensatz merken |
||
349 | Umschlag180Nick = (int32_t) EE_Parameter.WinkelUmschlagNick * 2500L; |
||
350 | Umschlag180Roll = (int32_t) EE_Parameter.WinkelUmschlagRoll * 2500L; |
||
1 | ingob | 351 | Piep(GetActiveParamSetNumber()); |
352 | break; |
||
683 | killagreg | 353 | |
354 | |||
1 | ingob | 355 | } |
356 | // DebugOut.AnzahlZyklen = Debug_Timer_Intervall; |
||
357 | NeuerDatensatzEmpfangen = 0; |
||
358 | } |
||
359 | |||
360 | //############################################################################ |
||
361 | //Routine für die Serielle Ausgabe |
||
683 | killagreg | 362 | int16_t uart_putchar (int8_t c) |
1 | ingob | 363 | //############################################################################ |
364 | { |
||
365 | if (c == '\n') |
||
366 | uart_putchar('\r'); |
||
367 | //Warten solange bis Zeichen gesendet wurde |
||
683 | killagreg | 368 | loop_until_bit_is_set(UCSR0A, UDRE0); |
1 | ingob | 369 | //Ausgabe des Zeichens |
683 | killagreg | 370 | UDR0 = c; |
371 | |||
1 | ingob | 372 | return (0); |
373 | } |
||
374 | |||
375 | // -------------------------------------------------------------------------- |
||
376 | void WriteProgramData(unsigned int pos, unsigned char wert) |
||
377 | { |
||
378 | //if (ProgramLocation == IN_RAM) Buffer[pos] = wert; |
||
379 | // else eeprom_write_byte(&EE_Buffer[pos], wert); |
||
380 | // Buffer[pos] = wert; |
||
381 | } |
||
382 | |||
383 | |||
384 | |||
385 | //--------------------------------------------------------------------------------------------- |
||
683 | killagreg | 386 | void DatenUebertragung(void) |
1 | ingob | 387 | { |
388 | if(!UebertragungAbgeschlossen) return; |
||
389 | |||
390 | if(DebugGetAnforderung && UebertragungAbgeschlossen) // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
||
683 | killagreg | 391 | { |
392 | SendOutData('G',MeineSlaveAdresse,(uint8_t *) &ExternControl,sizeof(ExternControl)); |
||
1 | ingob | 393 | DebugGetAnforderung = 0; |
394 | } |
||
395 | |||
683 | killagreg | 396 | if((CheckDelay(Debug_Timer) || DebugDataAnforderung) && UebertragungAbgeschlossen) |
1 | ingob | 397 | { |
683 | killagreg | 398 | SendOutData('D',MeineSlaveAdresse,(uint8_t *) &DebugOut,sizeof(DebugOut)); |
1 | ingob | 399 | DebugDataAnforderung = 0; |
683 | killagreg | 400 | Debug_Timer = SetDelay(MIN_DEBUG_INTERVALL); |
401 | } |
||
499 | hbuss | 402 | if(DebugTextAnforderung != 255) // Texte für die Analogdaten |
403 | { |
||
683 | killagreg | 404 | SendOutData('A',DebugTextAnforderung + '0',(uint8_t *) ANALOG_TEXT[DebugTextAnforderung],16); |
499 | hbuss | 405 | DebugTextAnforderung = 255; |
406 | } |
||
683 | killagreg | 407 | if(ConfirmFrame && UebertragungAbgeschlossen) // Datensatz ohne CRC bestätigen |
595 | hbuss | 408 | { |
683 | killagreg | 409 | txd_buffer[0] = '#'; |
410 | txd_buffer[1] = ConfirmFrame; |
||
411 | txd_buffer[2] = '\r'; |
||
595 | hbuss | 412 | UebertragungAbgeschlossen = 0; |
413 | ConfirmFrame = 0; |
||
683 | killagreg | 414 | UDR0 = txd_buffer[0]; |
595 | hbuss | 415 | } |
1 | ingob | 416 | if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
417 | { |
||
418 | Menu(); |
||
419 | DebugDisplayAnforderung = 0; |
||
683 | killagreg | 420 | if(++RemotePollDisplayLine == 4 || NurKanalAnforderung) |
173 | holgerb | 421 | { |
683 | killagreg | 422 | SendOutData('4',0,(uint8_t *)&PPM_in,sizeof(PPM_in)); // DisplayZeile übertragen |
499 | hbuss | 423 | RemotePollDisplayLine = -1; |
683 | killagreg | 424 | } |
425 | else SendOutData('0' + RemotePollDisplayLine,0,(uint8_t *)&DisplayBuff[20 * RemotePollDisplayLine],20); // DisplayZeile übertragen |
||
426 | } |
||
427 | if(GetVersionAnforderung && UebertragungAbgeschlossen) |
||
428 | { |
||
429 | SendOutData('V',MeineSlaveAdresse,(uint8_t *) &VersionInfo,sizeof(VersionInfo)); |
||
1 | ingob | 430 | GetVersionAnforderung = 0; |
431 | } |
||
432 | |||
433 | } |
||
434 |