Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Using TM-Spy for iOS

This site may earn commission on affiliate links.
Unfortunately Apple did not get around to reviewing the next beta release before they closed for the weekend. So the fix for the crash bug won't be available until Monday morning.

Here are some test screenshots of the new stacked graphs with support for 2 through 4 plots. Scales on either side still need work. Using Gary's three and four plot recipes.

IMG_0294.PNG
IMG_0293.PNG
 
  • Like
Reactions: Andyw2100
Jim,
We appreciate all your hard work and dedication to making this app something special for us. Please have a good Sunday yourself. We will be looking forward to Monday morning and trying out the latest of your creations.

Happy Easter to you and to all people everywhere.
Let us try for a century or two of Peace, for a change.
Sincerely, Gary
 
Easter Egg, showing bytes D1 and D2.

Education: Note that the red graph could represent Amps into the battery pack, or perhaps the Pack's voltage. However, this byte D2 is a bit jagged, as if it is low resolution data. In this case, the adjacent byte, in this case D1, appears to have some well-correlated "noise". Here, D2 is probably the high order byte of a 2-byte value, and D1 is likely to be the "detail" carried in the low order byte of the same value. Happy Easter.

I tried scaling by 1 (to get values 0 to 255), and setting scaling to zero, which should mean no scaling (also values 0 to 255), so the scaling in v0.0.11 must be a little broken.

image.png


Somehow this 2-variable plot from v0.0.11 shows too high values.
Maybe this has already been fixed in the v0.0.13 that is in for review?
 
I will wait for the next version before posting more on scaling issues.

The Expansion Factor used when looking at data and Zooming In or Out can now, in v0.0.13, be set in Settings to:
a. 1.414... (the square root of 2) so that every other step is a nice power of 2.
b. 1.5 as similar, but slightly different.
c. 2.0 like two steps of (a).
 
I will wait for the next version before posting more on scaling issues.

The Expansion Factor used when looking at data and Zooming In or Out can now, in v0.0.13, be set in Settings to:
a. 1.414... (the square root of 2) so that every other step is a nice power of 2.
b. 1.5 as similar, but slightly different.
c. 2.0 like two steps of (a).
There are a lot of improvements in Monday's version 0.0.14 release. I believe all the bugs reported have been fixed. Let me know if I missed any.

Version 0.0.13 seems to have fixed the crashing problems.

I was surprised to see Apple reviewing on a Sunday.
 
This is an example of the Plots and Recipes that I am using to test various 1, 2, 3, and 4-variable Plots:

Code:
Var Name v2.00,Byte A#,Mask A,Shift A,Byte B#,Mask B,Shift B,Plot Min,Plot Max,2's Comp Ck,Scale Fact,Raw Zero,Reserved,Byte C#,Mask C,Equals C,Msg ID,Byte D#,Mask D,Shift D,Byte E#,Mask E,Shift E

PT:pAK Amps:Amps:Watt,3,255,0,4,127,8,-160,1600,1,-0.1,10000,100,0,255,3,258,0,0,0,0,0,0

PT:pAK Volts:Volts:kW,1,255,0,2,255,8,0,400,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:DC2DC Amps:As:W,5,255,0,0,224,-5,0,160,0,1,0,10,0,255,3,528,0,0,0,0,0,0

PT:DC2DC Volts:Vs:Ws,6,255,0,0,224,-5,0,16,0,0.1,0,10,0,255,3,528,0,0,0,0,0,0

PT:pAK Power:Amp:Watt,3,255,0,4,127,8,-160,1600,1,-0.1,10000,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:Volt:kW,1,255,0,2,255,8,0,400,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:DC2DC Power:A:W,5,255,0,0,224,-5,0,160,0,1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:Vs:Ws,6,255,0,0,224,-5,0,16,0,0.1,0,10,0,255,3,528,0,0,0,0,0,0

PT:pAK Power:Amp:Watt,3,255,0,4,127,8,-160,1600,1,-0.1,10000,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:Volt:kW,1,255,0,2,255,8,0,400,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:D7:byte,7,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:DC2DC Power:A:W,5,255,0,0,224,-5,0,160,0,1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:Vs:Ws,6,255,0,0,224,-5,0,16,0,0.1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:D3:byte,3,255,0,0,127,8,0,256,0,1,0,10,0,255,3,528,0,0,0,0,0,0

PT:pAK Power:Amp:Watt,3,255,0,4,127,8,-160,1600,1,-0.1,10000,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:Volt:kW,1,255,0,2,255,8,0,400,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:D7:byte,7,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:pAK Power:D3:byte,3,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:DC2DC Power:A:W,5,255,0,0,224,-5,0,160,0,1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:Vs:Ws,6,255,0,0,224,-5,0,16,0,0.1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:D3:Byte,3,255,0,0,127,8,0,256,0,1,0,10,0,255,3,528,0,0,0,0,0,0
PT:DC2DC Power:D4:byte,4,255,0,0,127,8,0,256,0,1,0,10,0,255,3,528,0,0,0,0,0,0

PT:D1-D4 RAW:D1:byte,1,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D1-D4 RAW:D2:byte,2,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D1-D4 RAW:D3:byte,3,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D1-D4 RAW:D4:byte,4,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:D5-D8 RAW:D5:byte,5,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D5-D8 RAW:D6:byte,6,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D5-D8 RAW:D7:byte,7,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:D5-D8 RAW:D8:byte,8,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:I1 RAW:D1:byte,1,255,0,0,255,8,0,256,0,0,0,100,0,255,3,258,0,0,0,0,0,0
PT:I1 RAW:D2:byte,2,255,0,0,255,8,0,256,0,0,0,100,0,255,3,258,0,0,0,0,0,0

PT:I2 RAW:D3:byte,3,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:I2 RAW:D4:byte,4,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:I3 RAW:D5:byte,5,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:I3 RAW:D6:byte,6,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:I4 RAW:D7:byte,7,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0
PT:I4 RAW:D8:byte,8,255,0,0,255,8,0,256,0,1,0,100,0,255,3,258,0,0,0,0,0,0

PT:LI1-LI2/100:Int1:I1xI2,1,255,0,2,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:LI1-LI2/100:Int2:I1xI2,3,255,0,4,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:LI3-LI4/100:Int3:I1xI2,5,255,0,6,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:LI3-LI4/100:Int4:I1xI2,7,255,0,8,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:HI1-HI2/100:Int1:I1xI2,2,255,0,1,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:HI1-HI2/100:Int2:I1xI2,4,255,0,3,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:HI3-HI4/100:Int3:I1xI2,6,255,0,5,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:HI3-HI4/100:Int4:I1xI2,8,255,0,7,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:LI1-LI4/100:Int1:I1xI2,1,255,0,2,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:LI1-LI4/100:Int2:I1xI2,3,255,0,4,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:LI1-LI4/100:Int3:I1xI2,5,255,0,6,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:LI1-LI4/100:Int4:I1xI2,7,255,0,8,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

PT:HI1-HI4/100:Int1:I1xI2,2,255,0,1,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:HI1-HI4/100:Int2:I1xI2,4,255,0,3,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:HI1-HI4/100:Int3:I1xI2,6,255,0,5,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0
PT:HI1-HI4/100:Int4:I1xI2,8,255,0,7,255,8,0,500,0,0.01,0,100,0,255,3,258,0,0,0,0,0,0

I will attempt to explain a typical line later, but there are 4 main parts:
(refering to the first line that lists the column headers for this "spreadsheet")

1. Define the data bytes that are used, and how to assemble a "RAW" binary number.
Byte A#,Mask A,Shift A,
Byte B#,Mask B,Shift B,
Byte D#,Mask D,Shift D,
Byte E#,Mask E,Shift E

The Byte# is set to 1 through 8 to select D1 through D8, and zero (0) means not used.

The Mask is the decimal equivalent of an 8-bit binary to AND with the selected byte,
usually 255 to specify 0xFF or 1111 1111 to use all 8 bits of the data byte.

Shift is the number of bits to shift the data byte left before assembling the RAW binary number.
Typically 0 for the low order byte, or 8 for the high order byte, but more rarely other values.

2. Name the Plot and values, and specify the CAN messages of interest
Var Name v2.00, (text, typically 4 parts, separated by colons)
Example
PT:pAK Power:Amp:Watt
a.
b.
c.
d.

Msg ID, (the msgID to be gathered, in decimal, for example 0x102 is 258. Values 0 to 0x7FF)
Reserved, (number of CAN messages per second to try to gather while Gathering Data)
Byte C#,Mask C,Equals C, (might not be used yet)

3. Provide some defaults for graphing the "values" of interest.
Plot Min,Plot Max,
Byte C#,Mask C,Equals C, (might not be used yet)

4. Details of calculating the "value" from the assembled binary.
2's Comp Ck, (set to 1 if the raw binary represents a two's compliment signed number, 0 otherwise)
Raw Zero, (the raw value that represents a zero "value")
Scale Fact,
 
Last edited:
I ran out of time to ediit the above post ... TMC forum only allows 60 minutes of editing.
So, I will finish the rest here:

Scale Fact, (0 means no scaling, otherwise multiply the binary number by this value to get
the units that you desire. If the binary represents Volts x 1000 to represent millivolts, you
might use 0.001 to get Volts, like to convert 3241 mv to 3.241 volts for your graph.)

Example of the 4 parts of the Var Name entry:
a. PT (represents a reminder thar the Recipe is for messages from the PowerTrain CAN bus)
b. Pack Power (the name of this Plot, and all the sequential Recipes for this Plot have the identical name)
c. Amps (a name for the values produced by this Recipe line)
d. Amp (a name for the value's units, l believe ... might vary if Plot Product is On)

That covers most of it, I will answer questions later.
Cheers, Gary
 
v0.0.14 is available in TestFlight for Testing.

v13 bug: Earlier today, I used v13 to gather DC-DC Power data (0x210) while driving. At a Supercharger, I stopped gathering data, Saved, changed to Pack Power in Settings, and started gathering data again ... but it continued to gather 0x210 data, not the 0x102 messages that I expected.

V14 has some great new features, the best is the ability to change to other Plots after Loading data once, to much more conveniently explore the data. Very Nice.

Some, even many bugs in v13 are now missing, so those who really like them might not want to update to v14. However, I suggest going to v0.0.14 now.

1. This picture is of the data capture screen (4 of 4), after having chosen Pack Power as the Plot to specify what message to gather. The default fixed scale values appear to be from the Pack Power plot, but Menu allows one to select a different Plot, but only those that match the data currently loaded on screen 3.
Is this a bug?

2. Is a double-quote missing after Pack Power?

3. Since I was offline when checking this, the option to start gathering data was missing, as expected, but seeing the DC to DC options makes me wonder if v14 has the same bug as v13 described above.

image.png


Cheers, Gary
 
Last edited:
4 variables, Full-Scale graph type:

A tap of the left axis-values column could toggle to the green trace values.
Likewise, a tap of the right column could toggle to the purple trace values.
The Menu button could be a little less wide, to show more of the minute axis?
Similar comments for 3-variable plots?

image.png


While on these Plot screens, Menu could offer a "See Plot Recipes" option that would just pop up a text list of the 1 to 4 Recipes being used for the plot, perhaps using 2 or 3 lines per Recipe?

Cheers, Gary
 
Last edited:
v14 graph of four 2-byte values:

View attachment 168970

Could add green scale values on the left, and purple scale values on the right?

Vertical axis caption could be "Int1 (B) & Int2 (R) & Int3 (G) & Int4 (P)"?

Overall, very nice work.
Did you not read the Change Log? It says the third and fourth y-axis scales for the Stacked graph will be added in a future release. Just a matter of copying and pasting code and changing the basic graph routine to accept the new y-axis parameters but it takes time and there are other priorities like getting fixes out.
 
Guilty, I forgot to read the Change History, sorry.
I agree, bugs are far more important.

Ok, a bug: Scrolling makes two jumps every time I scroll, the first one almost immediately, sometimes almost to the point that I am at while dragging and it updates, but sometimes the drag is not even finished. The second jump is maybe a second later, almost always far beyond the point that I drag to.

Dragging very slowly ...
 
Last edited:
Ran out of time to submit my edit to the above post, and lost the addition ... so trying again to explain.

Dragging very slowly in Scrolling, it acts like it is trying to make incremental jumps to keep up with my finger, but it seems to be using the distance from position 0 to pos N rather than the incremental distance from pos N-1 to pos N. So, it gets further and further ahead, and then makes one last big jump after I stop dragging, going far beyond my end-drag point.