Page 2 of 2

Re: gpio connection error

Posted: Fri May 19, 2017 2:50 am
by jsmcortina
I'm afraid I don't have any suggestions on how to fix this at present. The only workaround I can think of is create two new projects and tune independently. i.e.
a. MS2. Connect your serial cable to the MS2 and tune the MS2 only.
b. GPIO. Connect your serial cable to the GPIO and tune the GPIO only.

I have escalated this issue to the relevant developers.

James

Re: gpio connection error

Posted: Fri May 19, 2017 9:53 am
by rukavina
OK.. that's where I was at. I need to street test but if I have no other issues I will wait and see.. thank you

Re: gpio connection error

Posted: Thu May 25, 2017 5:41 am
by LT401Vette
I have found an fixed a bug in TS on readChunk with small blockingFactor. That was triggering the issue.
This will be in the next release.

Re: gpio connection error

Posted: Thu May 25, 2017 11:21 am
by jsmcortina
Phil,
I know I mentioned the blocking factor earlier, but as this is CAN passthrough, shouldn't that actually be irrelevant? So long as the blocking factor used in TunerSutdio matches the CAN "master", there are only 8 bytes sent over CAN at a time anyway?

James

Re: gpio connection error

Posted: Thu May 25, 2017 12:03 pm
by LT401Vette
jsmcortina wrote:Phil,
I know I mentioned the blocking factor earlier, but as this is CAN passthrough, shouldn't that actually be irrelevant? So long as the blocking factor used in TunerSutdio matches the CAN "master", there are only 8 bytes sent over CAN at a time anyway?

James
Prior to TS 3.0, TS didn't use the readChunk command, it always read the full page. As you know if you open a dialog, TS refreshes the data from the controller to make sure you are always looking at what is actually on the controller. So prior to TS 3.0, this meant TS would look at all the settings in a the opening dialog and issue reads on any pages contained in that dialog.

With MS2 Extra or MS3, generally this was still very fast as they all support the crc 'k' command, so it will pass the CRC for the page and skip the full read, worse case it was a 1024 byte read and still didn't take a great deal of time. Thus there was little motivation to implement readChunk and read subsets of the page.

However, there have been some firmwares that do not use the k (crc) command such as MShift and others with much larger pages. in a case where TS has to read a large page, this interfered with runtime data while it was retrieving the page refresh.

Thus the implementation of the readChunk command. In TS 3.0+, TS follows similar logic where it refreshes the data from the controller, but now only the ranges of the page that are included on dialog.

Now to finally answer your question.....
When using the readChunk command to read a block larger than the blockingFactor, starting at an offset > 0 , on a firmware not supporting the k command, TS was mis-aligning up the indexing of the data read. The data was shifted.

In my own car I regularly use a project with an MS3-Pro as the primary controller and your Trans code as a CAN controller. Never had an issue, but I see that is because your Trans code supports the k (crc) command, so it would skip the chunk read as it should always pass the crc when opening a dialog.

Re: gpio connection error

Posted: Thu May 25, 2017 11:23 pm
by rukavina
Well I thank you...... !