Mercurial > public > ostc4
comparison Discovery/Src/tComm.c @ 399:523892f62ce0 ImproveBluetooth
Revert change to keep connection open in case of BlueMod messages:
Some problems occure within Subsurface in case the connection is kept open => Reverted
author | ideenmodellierer |
---|---|
date | Sat, 21 Dec 2019 20:21:26 +0100 |
parents | 2d980f765034 |
children | 7bcbbaa42cbf |
comparison
equal
deleted
inserted
replaced
398:2d980f765034 | 399:523892f62ce0 |
---|---|
588 aTxBuffer[0] = type; | 588 aTxBuffer[0] = type; |
589 aTxBuffer[1] = prompt4D4C(receiveStartByteUart); | 589 aTxBuffer[1] = prompt4D4C(receiveStartByteUart); |
590 uint8_t tempHigh, tempLow; | 590 uint8_t tempHigh, tempLow; |
591 count = 0; | 591 count = 0; |
592 | 592 |
593 // Ignore communication on Text like RING, CONNECT, | |
594 if(type == 0xFF) return 0; | |
595 if(type < 0x60) | |
596 { | |
597 return prompt4D4C(receiveStartByteUart); | |
598 } | |
599 // service mode only commands | 593 // service mode only commands |
600 if(receiveStartByteUart == BYTE_SERVICE_MODE) | 594 if(receiveStartByteUart == BYTE_SERVICE_MODE) |
601 { | 595 { |
602 // first part | 596 // first part |
603 switch(type) | 597 switch(type) |
633 uint8_t logStepBackwards = 0; | 627 uint8_t logStepBackwards = 0; |
634 convert16_Type totalDiveCount; | 628 convert16_Type totalDiveCount; |
635 logCopyDataLength.u32bit = 0; | 629 logCopyDataLength.u32bit = 0; |
636 totalDiveCount.u16bit = 0; | 630 totalDiveCount.u16bit = 0; |
637 #endif | 631 #endif |
632 | |
633 // Exit communication on Text like RING, CONNECT, ... or 0xFF command | |
634 if((type < 0x60) || (type == 0xFF)) | |
635 return 0; | |
638 | 636 |
639 // return of command for (almost) all commands | 637 // return of command for (almost) all commands |
640 switch(type) | 638 switch(type) |
641 { | 639 { |
642 // not supported yet case 0x20: // send hi:lo:temp1 bytes starting from ext_flash_address:3 | 640 // not supported yet case 0x20: // send hi:lo:temp1 bytes starting from ext_flash_address:3 |