Rev 1055 | Rev 1058 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1055 | Rev 1056 | ||
---|---|---|---|
Line 176... | Line 176... | ||
176 | } |
176 | } |
Line 177... | Line 177... | ||
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | // -------------------------------------------------------------------------- |
180 | // -------------------------------------------------------------------------- |
181 | void SendOutData(unsigned char cmd,unsigned char modul, unsigned char BufferAnzahl, ...) //unsigned char *snd, unsigned char len) |
181 | void SendOutData(unsigned char cmd,unsigned char address, unsigned char BufferAnzahl, ...) //unsigned char *snd, unsigned char len) |
182 | { |
182 | { |
183 | va_list ap; |
183 | va_list ap; |
Line 184... | Line 184... | ||
184 | unsigned int pt = 0; |
184 | unsigned int pt = 0; |
185 | unsigned char a,b,c; |
185 | unsigned char a,b,c; |
Line 186... | Line 186... | ||
186 | unsigned char ptr = 0; |
186 | unsigned char ptr = 0; |
187 | 187 | ||
188 | unsigned char *snd = 0; |
188 | unsigned char *snd = 0; |
Line 189... | Line 189... | ||
189 | int len = 0; |
189 | int len = 0; |
190 | 190 | ||
191 | SendeBuffer[pt++] = '#'; // Startzeichen |
191 | SendeBuffer[pt++] = '#'; // Startzeichen |
Line 283... | Line 283... | ||
283 | // -------------------------------------------------------------------------- |
283 | // -------------------------------------------------------------------------- |
284 | void BearbeiteRxDaten(void) |
284 | void BearbeiteRxDaten(void) |
285 | { |
285 | { |
286 | if(!NeuerDatensatzEmpfangen) return; |
286 | if(!NeuerDatensatzEmpfangen) return; |
Line -... | Line 287... | ||
- | 287 | ||
287 | 288 | Decode64(); // dekodiere datenblock im Empfangsbuffer |
|
288 | switch(RxdBuffer[1]-'a') // check for Slave Address |
289 | switch(RxdBuffer[1]-'a') // check for Slave Address |
289 | { |
290 | { |
290 | case FC_ADDRESS: // FC special commands |
- | |
- | 291 | case FC_ADDRESS: // FC special commands |
|
291 | Decode64(); // dekodiere datenblock im Empfangsbuffer |
292 | |
292 | switch(RxdBuffer[2]) |
293 | switch(RxdBuffer[2]) |
293 | { |
294 | { |
294 | case 'K':// Kompasswert |
295 | case 'K':// Kompasswert |
295 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
296 | memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue)); |
Line 336... | Line 337... | ||
336 | while(!UebertragungAbgeschlossen); |
337 | while(!UebertragungAbgeschlossen); |
337 | SendOutData('S', FC_ADDRESS, 1, &pRxData[0], sizeof(unsigned char)); |
338 | SendOutData('S', FC_ADDRESS, 1, &pRxData[0], sizeof(unsigned char)); |
338 | } |
339 | } |
339 | break; |
340 | break; |
Line 340... | Line -... | ||
340 | - | ||
341 | } |
341 | |
Line 342... | Line 342... | ||
342 | break; // case FC_ADDRESS: |
342 | } // case FC_ADDRESS: |
343 | 343 | ||
344 | default: // any Slave Address |
344 | default: // any Slave Address |
345 | Decode64(); |
345 | |
346 | switch(RxdBuffer[2]) |
346 | switch(RxdBuffer[2]) |
347 | { |
347 | { |
348 | // 't' comand placed here only for compatibility to BL |
348 | // 't' comand placed here only for compatibility to BL |