diff 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
line wrap: on
line diff
--- a/Discovery/Src/tComm.c	Mon Dec 02 22:03:05 2019 +0100
+++ b/Discovery/Src/tComm.c	Sat Dec 21 20:21:26 2019 +0100
@@ -590,12 +590,6 @@
     uint8_t tempHigh, tempLow;
     count = 0;
 
-    // Ignore communication on Text like RING, CONNECT,
-    if(type == 0xFF) return 0;
-    if(type < 0x60)
-   	{
-    	return prompt4D4C(receiveStartByteUart);
-   	}
     // service mode only commands
     if(receiveStartByteUart == BYTE_SERVICE_MODE)
     {
@@ -636,6 +630,10 @@
         totalDiveCount.u16bit = 0;
 #endif
 
+        // Exit communication on Text like RING, CONNECT, ... or 0xFF command
+        if((type < 0x60) || (type == 0xFF))
+            return 0;
+
         // return of command for (almost) all commands
         switch(type)
         {