Potential fix for TS3 disconnection issue

This commit is contained in:
Josh Stewart 2016-06-29 22:08:04 +10:00
parent 1089c3ace4
commit 6254c405ca
2 changed files with 16 additions and 9 deletions

View File

@ -57,6 +57,10 @@ void command()
sendValues(39); sendValues(39);
break; break;
case 'F': // send serial protocol version
Serial.print("001");
break;
case 'S': // send code version case 'S': // send code version
//Serial.print(signature); //Serial.print(signature);
//break; //break;
@ -71,11 +75,13 @@ void command()
//Serial.write(titleString,16); //Serial.write(titleString,16);
*/ */
Serial.print("Speeduino 2016.06-pre"); Serial.print("Speeduino 2016.06-pre");
currentStatus.secl = 0; //This is required in TS3 due to its stricter timings
break; break;
case 'Q': // send code version case 'Q': // send code version
//Serial.print(signature); //Serial.print("speeduino 2016.06");
Serial.write(signature); Serial.print(signature);
//Serial.write(signature);
break; break;
//The following requires TunerStudio 3 //The following requires TunerStudio 3
@ -264,9 +270,10 @@ void sendValues(int length)
response[33] = currentStatus.flex; //Flex sensor value (or 0 if not used) response[33] = currentStatus.flex; //Flex sensor value (or 0 if not used)
cli(); //cli();
Serial.write(response, (size_t)packetSize); Serial.write(response, (size_t)packetSize);
sei(); //Serial.flush();
//sei();
return; return;
} }

View File

@ -5,12 +5,12 @@
queryCommand = "Q" queryCommand = "Q"
signature = 20 signature = 20
;signature = "speeduino 2016.05" ;signature = "speeduino 2016.06"
versionInfo = "S" ; Put this in the title bar. versionInfo = "S" ; Put this in the title bar.
[TunerStudio] ;[TunerStudio]
iniSpecVersion = 3.24 ; iniSpecVersion = 3.24
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
@ -90,10 +90,10 @@
tableBlockingFactor = 2048 tableBlockingFactor = 2048
delayAfterPortOpen=1000 delayAfterPortOpen=1000
;validateArrayBounds = true ;validateArrayBounds = true
blockReadTimeout = 1000 blockReadTimeout = 2000
;tsWriteBlocks = on ;tsWriteBlocks = on
; writeBlocks = on ; writeBlocks = on
interWriteDelay = 0 interWriteDelay = 10
;Page 1 is the fuel map and axis bins only ;Page 1 is the fuel map and axis bins only
page = 1 page = 1