hieronymous
Posts: 35
Joined: Tue Sep 16, 2014 8:54 pm
Delivery Date: 30 Jul 2014
Leaf Number: 200222
Location: Auckland, New Zealand

Re: LeafSpy Pro Custom Screens

Wed Mar 07, 2018 2:33 am

Hi Turbo3

Your custom screens are a great addition , and I'll be using LeafSpy much more regularly while driving, now that I can easily read my cell display. Your sample files are fairly intuitive, as I built my first custom screens before I ever got around to reading this thread...

I have a few queries:

The variable Battery kWh has a negative sign before the identifier (-34), but the output is in the form "6,122". This puzzled me at first, but now appears to me to be an expression of Wh not kWh, which explains the comma after the "6" when I was expecting a decimal point.

The variable Trip displays as an integer value, on screen 4 also. Can this be expressed to 1 decimal place?

On screen 4, Trip is accompanied by km/kWh. Is a variable for km/kWh a possibility?

The main screens display labels and data in black text on a white background, which gives good contrast, important when font sizes are small. The custom screens default to black text on a grey background, which has reduced contrast - could you consider an optional white background, or colour settings for both data and background, so I could use something like white on royal blue or vice versa?

Thanks...
Last edited by hieronymous on Thu Mar 08, 2018 7:48 pm, edited 6 times in total.
Local use only: max. charge 39.0% SoC
Built 05/12, Nissan stockpiled 26 months
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, 93%, 61.41
07/16: 6628km, 95%, 62.90 (P3227)
07/17: 8742km, 95%, 62.90
07/18: 11355km, 94.8%, 62.22

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Wed Mar 07, 2018 11:28 am

hieronymous wrote:Hi Turbo3

Your custom screens are a great addition , and I'll be using LeafSpy much more regularly while driving, now that I can easily read my cell display. Your sample files are fairly intuitive, as I built my first custom screens before I ever got around to reading this thread...

I have a few queries:

The variable Battery kWh has a negative sign before the identifier (-34), but the output is in the form "6,122". This puzzled me at first, but now appears to me to be an expression of Wh not kWh, which explains the comma after the "6" when I was expecting a decimal point.

The variable Trip displays as an integer value, on screen 4 also. Can this be expressed to 1 decimal place?

On screen 4, Trip is accompanied by km/kWh. Is a variable for km/kWh a possibility?

The main screens display labels and data in black text on a white background, which gives good contrast, important when font sizes are small. The custom screens default to black text on a grey background, which has reduced contrast - could you consider an optional white background, or colour settings for both data and background, so I could use something like white on royal blue or vice versa?

Thanks...

I am currently working on getting an update of TM-Spy for iOS out which should happen in the next few days.

Once that is done I will have a look at the Custom code and see what is going on.

Keep the suggestions and bugs coming in.

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Thu Mar 08, 2018 12:55 am

In addition to Type "L" the next release will support three additional types to control colors ("CP","CL","CV") . Color should be in 4 byte hex ARGB format, 0xAARRGGBB where

AA = Alpha 0x00=transparent and 0xFF = solid color
RR = Red
GG = Green
BB = Blue

Solid white would be 0xFFFFFFFF, black would be 0xFF000000, and transparent would be 0x00123456 (does not matter want values you place in 123456).

Each element's color needs a day color and a night color. For labels and variables you need to specify the Text color and the Background color. Backgrounds can be transparent by setting Alpha to 0.

Default colors are used until overridden by a Cx type.

CP, DayPanelColor, NightPanelColor (note that Alpha is always forced to 0xFF as the panel color must be a solid color)

CL,LabelDayTextColor, LabelNightTextColor, LabelDayBackgroundColor, LabelNightBackgroundColor

CV,VarDayTextColor, VarNightTextColor, VarDayBackgroundColor, VarNightBackgroundColor

The CP type can be placed anywhere in the file start or end.

The CL and CV types can be single lines placed at the start and then all lines following will use that color scheme. Or you can place one set or just one of them before some or all of the L Types to have every field have a different color.

You can search the Internet for "Hex Colors" to get the values to use and see what the colors look like. Just don't forget to add the Alpha byte at the start or there will be no color. The current labels all use a transparent background and the variables use a solid color background of light gray.

hieronymous
Posts: 35
Joined: Tue Sep 16, 2014 8:54 pm
Delivery Date: 30 Jul 2014
Leaf Number: 200222
Location: Auckland, New Zealand

Re: LeafSpy Pro Custom Screens

Thu Mar 08, 2018 3:09 am

Thanks, Turbo3, for the detail of the colour choice to come - glad I've got some time to the next release to digest it!

Very impressive...
Last edited by hieronymous on Fri Mar 09, 2018 7:19 pm, edited 5 times in total.
Local use only: max. charge 39.0% SoC
Built 05/12, Nissan stockpiled 26 months
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, 93%, 61.41
07/16: 6628km, 95%, 62.90 (P3227)
07/17: 8742km, 95%, 62.90
07/18: 11355km, 94.8%, 62.22

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 12:29 am

Added two more parameters to "CV" that, if present, allow you to control the boarder around the variable (border width and corner radius). A radius of 0 makes it a rectangle.

This screen was created by adding this line at the top. Also fixed the label bug for Battery Wh (was kWh).

Code: Select all

CV,0xFF000000,0xFFFFFFFF,0x0,0x0,1,0,,,,,,

Image

hieronymous
Posts: 35
Joined: Tue Sep 16, 2014 8:54 pm
Delivery Date: 30 Jul 2014
Leaf Number: 200222
Location: Auckland, New Zealand

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 12:58 am

So you can just represent "transparent" as 0x0?
Local use only: max. charge 39.0% SoC
Built 05/12, Nissan stockpiled 26 months
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, 93%, 61.41
07/16: 6628km, 95%, 62.90 (P3227)
07/17: 8742km, 95%, 62.90
07/18: 11355km, 94.8%, 62.22

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 1:06 am

hieronymous wrote:Hi Turbo3
I have a few queries:

The variable Battery kWh has a negative sign before the identifier (-34), but the output is in the form "6,122". This puzzled me at first, but now appears to me to be an expression of Wh not kWh, which explains the comma after the "6" when I was expecting a decimal point.

The variable Trip displays as an integer value, on screen 4 also. Can this be expressed to 1 decimal place?

You understand the function of the negative sign right? It suppresses displaying the units to the right of the variable.

The label "Battery kWh" was a typo The label should be "Battery Wh". The help overlay also has it wrong. If you removed the minus sign you would have seen the correct units "Wh" displayed to the right of the value.

The Trip distance is displayed as an integer when km units is selected. It is an integer from the Leaf so adding a decimal place is of no value as it would always be 0.

hieronymous
Posts: 35
Joined: Tue Sep 16, 2014 8:54 pm
Delivery Date: 30 Jul 2014
Leaf Number: 200222
Location: Auckland, New Zealand

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 1:47 am

Turbo3 wrote:
hieronymous wrote:Hi Turbo3
I have a few queries:

The variable Battery kWh has a negative sign before the identifier (-34), but the output is in the form "6,122". This puzzled me at first, but now appears to me to be an expression of Wh not kWh, which explains the comma after the "6" when I was expecting a decimal point.

The variable Trip displays as an integer value, on screen 4 also. Can this be expressed to 1 decimal place?

You understand the function of the negative sign right? It suppresses displaying the units to the right of the variable.

The label "Battery kWh" was a typo The label should be "Battery Wh". The help overlay also has it wrong. If you removed the minus sign you would have seen the correct units "Wh" displayed to the right of the value.

The Trip distance is displayed as an integer when km units is selected. It is an integer from the Leaf so adding a decimal place is of no value as it would always be 0.


Yes, I was clear about the minus sign function, but with the incorrect label I couldn't see why it was there at all. Thanks for the clarification....
Local use only: max. charge 39.0% SoC
Built 05/12, Nissan stockpiled 26 months
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, 93%, 61.41
07/16: 6628km, 95%, 62.90 (P3227)
07/17: 8742km, 95%, 62.90
07/18: 11355km, 94.8%, 62.22

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 10:45 am

hieronymous wrote:
Turbo3 wrote:
hieronymous wrote:Hi Turbo3
I have a few queries:

The variable Battery kWh has a negative sign before the identifier (-34), but the output is in the form "6,122". This puzzled me at first, but now appears to me to be an expression of Wh not kWh, which explains the comma after the "6" when I was expecting a decimal point.

The variable Trip displays as an integer value, on screen 4 also. Can this be expressed to 1 decimal place?

You understand the function of the negative sign right? It suppresses displaying the units to the right of the variable.

The label "Battery kWh" was a typo The label should be "Battery Wh". The help overlay also has it wrong. If you removed the minus sign you would have seen the correct units "Wh" displayed to the right of the value.

The Trip distance is displayed as an integer when km units is selected. It is an integer from the Leaf so adding a decimal place is of no value as it would always be 0.


Yes, I was clear about the minus sign function, but with the incorrect label I couldn't see why it was there at all. Thanks for the clarification....

Again, there is no connection between what the label says and the minus sign. The label can be anything you type in be it correct or not.

The minus sign only controls what is added to the variable field which is always to the right of the label.

But if you use a minus sign and still want to show units you would need to add units to the label. But that is up to you to decide.

I added the minus on power because power in Wh can be a 5 digit number and I did not want the variable field to be any larger by adding in "Wh" so I suppressed it with a minus sign and added units (incorrectly) to the label.

Turbo3
Gold Member
Posts: 1974
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: LeafSpy Pro Custom Screens

Fri Mar 09, 2018 10:48 am

hieronymous wrote:So you can just represent "transparent" as 0x0?

To be transparent the Alpha byte must be 0. The R,G and B bytes don't matter if Alpha is 0 so they can be anything including all zeros. Therefore 0x0 is transparent just like 0xFFFFFF would be transparent.

Return to “LEAF CANBus”