Turbo3
Gold Member
Posts: 1966
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

Sat Mar 10, 2018 1:03 pm

For those Android LeafSpy Pro users who would like to try the new colors features there is a test version if you bought from Google. Use this link.
https://play.google.com/apps/testing/com.Turbo3.Leaf_Spy_Pro

If you have created a screen you think others might find useful send it to me and I might added it as another example screen.

Turbo3
Gold Member
Posts: 1966
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

Mon Mar 12, 2018 1:24 pm

(Updated: Dropped 3 Image types and use "L" type instead for numbers and text so font gets scaled properly)
(Changed parameter order so width comes first to better match "L" type format)


Coming in next test release 3 new types for climate control images.

IM = climate control Mode Dropped
IR = Recirculate mode
IP = climate control Power Dropped
IF = Fan speed
IS = Set Temperature Dropped
IA = Air flow direction

Format is:
IM: Type
25: Image width in % of screen width
20: Center image position in % of screen width
10: Top image position in % of screen height

Image height is automatically set based on image size.

Code: Select all

IR,25,20,10
IF,16,50,12
IA,25,80,10

Image
Last edited by Turbo3 on Thu Mar 15, 2018 3:19 pm, edited 1 time in total.

Turbo3
Gold Member
Posts: 1966
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

Mon Mar 12, 2018 11:28 pm

Here is a comparison between the built-in hard coded Screen 3 and a Custom Screen version. This is on a Fire HD 5th generation.

Note the better scaling of the Custom version.

Based on this I will be looking at dropping the hard coded Screen 3 and replacing it with the Custom Screen version.

(Simulated data as you can tell)
Image Image
Here is the code that generated the screen with new button types and a couple of unique types to handle conditional variables (type 200,201)

Code: Select all

If needed adjust Font scale factor by tapping top/bottom of screen when screen is Frozen for better appearance,,,,,,,,,,,,
Type,Width,Offset, Label (comma ends label), font,justify, width(%),top(%),variable, font,justify, width(%),top(%)
CV,0xff000000,0xffffffff,0,0,0,0
L,45,0,,0,r,0,0,-20,40,r,100,1
L,55,45,% SOC,30,L,100,2
L,28,0,,0,r,0,0,-20,40,r,100,11.5
L,30,28, kWh,25,L,100,13.5
L,39,50,,0,r,0,0,-32,40,r,100,11.5
L,10,89, Ah,25,L,100,13.5
IM,15,73,25
IR,15,80,25
IP,50,75,25
IF,50,81,16
IS,85,69,25
IA,85,77,25
L,45,0,,0,r,0,0,-13,43,r,100,24
L,15,45, Wh,25,L,100,27
BR,75,26,32
L,45,0,,0,r,0,0,-200,43,r,100,37
BT,70,38,45
L,45,0,,0,r,0,0,-12,43,r,100,50
BE+,60,51,25
BE-,86,51,25
L,45,0,,0,r,0,0,201,43,r,100,63
BG,70,64,45

Turbo3
Gold Member
Posts: 1966
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 14, 2018 10:42 am

Here is a comparison of a custom screen and the built-in screen displayed using Android's split screen mode.

The built-in screen totally fails at rendering in the half screen while the custom screen has no problem at all.

Image Image

When I hold the phone in landscape mode the custom screen is better but still needs some work. Buttons and images are not correct but the label and variables look just fine.

(Custom Screen 3)
Image

(Built-in screen 3)
Image

hieronymous
Posts: 34
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 14, 2018 8:57 pm

Hmm, I’ve already switched to the custom screen as my main screen, and now you are strongly tempting me to get better hardware.. :D
Built 05/12, Nissan stockpiled 26 months
Local use only: max. charge 39.0% SoC
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, SOH 93%, AHr 61.41
07/16: 6628km, SOH 95%, AHr 62.90 (P3227)
07/17: 8742km, SOH 95% AHR 62.90

Turbo3
Gold Member
Posts: 1966
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 15, 2018 3:37 pm

Next release supports turning a Label ("L" type) into a button and selective Bold font instead of it being hard coded.

Both are controlled by adding to the Justification field. For example to bold and center use bc (any order or case).

To make a Button add the handler name in quotes. So above example would be bc"btnCtrRst" . Of course you need to know the handler name. In this case "btnCtrRst" calls the routine that asks and resets the Wh counter.

Basically anything that is a button in LeafSpy can be accessed this way.

Also better support for Android Split screen. The font/scale adjustment function is saved per custom screen name and screen size. So a split screen and normal screen can have separate font/scale adjustments.

Here is what the current replacement Screen 3 looks like with all the new elements. The rounded gray background you see on the labels is each controlled by the csv file using the CV type.
Image

hieronymous
Posts: 34
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 23, 2018 5:23 pm

Turbo3 wrote: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.


Hi Turbo3

I have added CP, CL, and CV lines in that order to my .csv file, following the initial 2 lines. The colours in these lines are all different to the defaults (no transparencies).

The CP and CV lines work as expected. The CL line appears to be being ignored, with labels, variables and background colours produced being unchanged from those of your sample file both day and night.

My CL line checks identical to my CV line, no typos...

CL,0xFFFFFFFF,0xFF000080,0xFF000080,0xFFFFFFFF,1,0,,,,,,

I also copied the CL line to a 2nd .csv file (no CP or CV) and it leaves that display unchanged also.

Cheers..
Built 05/12, Nissan stockpiled 26 months
Local use only: max. charge 39.0% SoC
07/14: 57km, SOH 96%, AHr 63.37 (new)
07/15: 4032km, SOH 93%, AHr 61.41
07/16: 6628km, SOH 95%, AHr 62.90 (P3227)
07/17: 8742km, SOH 95% AHR 62.90

Turbo3
Gold Member
Posts: 1966
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 29, 2018 10:16 pm

hieronymous wrote:
Turbo3 wrote: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.


Hi Turbo3

I have added CP, CL, and CV lines in that order to my .csv file, following the initial 2 lines. The colours in these lines are all different to the defaults (no transparencies).

The CP and CV lines work as expected. The CL line appears to be being ignored, with labels, variables and background colours produced being unchanged from those of your sample file both day and night.

My CL line checks identical to my CV line, no typos...

CL,0xFFFFFFFF,0xFF000080,0xFF000080,0xFFFFFFFF,1,0,,,,,,

I also copied the CL line to a 2nd .csv file (no CP or CV) and it leaves that display unchanged also.

Cheers..

CL only supports the four colors. Your CL line has four colors and then a 1 and a 0 parameter. Remove the 1 and 0 parameters.

The way you have it it will be ignored which is what you are seeing.

trhein
Posts: 2
Joined: Sun Apr 01, 2018 1:35 pm
Delivery Date: 30 Sep 2017
Leaf Number: 309341

Re: LeafSpy Pro Custom Screens

Mon Apr 09, 2018 6:59 pm

I created a custom screen if anyone is interested in trying it.
The screen highlights the number I think is most important (current GIDS) and groups some of the other items together. I also put a small area for values normally looked at during charging. I only created a landscape view since that is what I use while driving most of the time.
Give it a try if you'd like. A link to the screen and a description of the fields can be found at:
www.rhein.us/lsp/
<a href="http://www.rhein.us/lsp/">www.rhein.us/lsp/</a>

Hope you enjoy it.

trhein
Posts: 2
Joined: Sun Apr 01, 2018 1:35 pm
Delivery Date: 30 Sep 2017
Leaf Number: 309341

Re: LeafSpy Pro Custom Screens

Mon Apr 09, 2018 7:29 pm

I didn't realize I could include a sample image:
Again, more information regarding the fields and layout can be found at http://www.rhein.us/lsp/
A direct link to the csv file is http://www.rhein.us/lsp/ScrTR-D-1L.csv


Image

Return to “LEAF CANBus”