Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

HiPrecision Bar

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

HiPrecision Bar

Post by Rafael »

[beta release]

This is another horizontal bar, but, with more options and precision.

Usage:

$dll(RafaBar1,1,size,min#max#atual#c#style#chars)

Where:

min
Lower value of scale (number = any)

max
Higher value of scale (number = any)

actual
Atual value of scale (number = any)

c
All Custom -> a
Custom End & Start -> c
Default -> d

If you are using 'a' option, you need to observe the order that the function will create the output, eg:

Consider that [ ] is a character block in you display, so:

$CustomChar(1,31,0,16,16,16,0,31,0) -> [| ]
$CustomChar(2,31,0,24,24,24,0,31,0) -> [|| ]
$CustomChar(3,31,0,28,28,28,0,31,0) -> [||| ]
$CustomChar(4,31,0,30,30,30,0,31,0) -> [|||| ]
$CustomChar(5,31,0,31,31,31,0,31,0) -> [|||||]
$CustomChar(6,31,0,0,0,0,0,31,0) -> [ ]
$CustomChar(7,4,4,4,4,4,4,4,4) -> Start
$CustomChar(8,4,4,4,4,4,4,4,4) -> End

style Style of scale bar (number = 1 to 6)

If 'c' is set, you can use custom character for start and end. $Chr(135) and $Chr(136) is the new output, if 'c' is not set, the function will print default chars.

chars
You can define your char collection with you use another type of display. NEVER TESTED :roll:
Default Sequence 176|158|131|132|133|134|135|136 if this option is ignored.

Example:

$dll(RafaBar1,1,20,0#100#$CPUUsage%)

$CustomChar(7,4,4,4,4,4,4,4,4)$CustomChar(8,4,4,4,4,4,4,4,4)$dll(RafaBar1,1,20,0#100#$CPUUsage%#c)

$dll(RafaBar1,1,20,0#100#$CPUUsage%#d#3)

$CustomChar(7,4,4,4,4,4,4,4,4)$CustomChar(8,4,4,4,4,4,4,4,4)$dll(RafaBar1,1,20,0#100#$CPUUsage%#c#2)

$CustomChar(1,31,0,16,16,16,0,31,0)$CustomChar(2,31,0,24,24,24,0,31,0)$CustomChar(3,31,0,28,28,28,0,31,0)$CustomChar(4,31,0,30,30,30,0,31,0)$CustomChar(5,31,0,31,31,31,0,31,0)$CustomChar(6,31,0,0,0,0,0,31,0)$CustomChar(7,4,4,4,4,4,4,4,4)$CustomChar(8,4,4,4,4,4,4,4,4)$dll(RafaBar1,1,20,0#100#$CPUUsage%#a#5)

$CustomChar(1,31,0,16,16,16,0,31,0)$CustomChar(2,31,0,24,24,24,0,31,0)$CustomChar(3,31,0,28,28,28,0,31,0)$CustomChar(4,31,0,30,30,30,0,31,0)$CustomChar(5,31,0,31,31,31,0,31,0)$CustomChar(6,31,0,0,0,0,0,31,0)$CustomChar(7,4,4,4,4,4,4,4,4)$CustomChar(8,4,4,4,4,4,4,4,4)$dll(RafaBar1,1,20,0#100#$CPUUsage%#a#4#176|158|131|132|133|134|135|136)

Picture:

Image

Suggestions:

Are wellcome...

Notes:

If you are using more than one bar in a single screen, you need to use the same bar style.

ChangeLOG

:arrow: 17oct2009
Supports custom characters

:arrow: 18oct2009
Added more 5 bar styles
Custom character scale can be used
Custom character number can be used (not advanced, crazy guys only) :smt005
You do not have the required permissions to view the files attached to this post.
Last edited by Rafael on October 19th, 2009, 12:16 am, edited 6 times in total.
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

Looks nice!

Any chance for a version that lets you choose the custom char used?
I mean instead of 1 to 8 (0-7), output the chars 130-137 for example.
Like an extra variable defining the start char number and then use the following 7.
Just asking because I can define all 256 chars as custom so having multiple bars would be possible for me.

Pretty please? :D
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Hi Caesar...

Thanks for you suggestion!!!

Please, check this new version now... :D

:smt006
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

Hmm, works somewhat.
If I put "c" in there $dll(RafaBar1,1,40,0#100#$CPUUsage%#c) then it should let me set my own custom chars.

But "c" can not be exchanged for a number, right? Or am I missing something?

Like this: $dll(RafaBar1,1,40,0#100#$CPUUsage%#140) and then I define char 140 to 147 to output the bar in my style.

chars are 6px wide x 8px tall, so 8 custom chars will let you print a nice graph. There are also gapless displays.
char at index 0 is an empty block (or one with just margins defined), 1 is for one occupied line, 2 - 6 the same, 8

I thought of something like this: tell the function to use 140 as the starting char then just output the corresponding chars to the LCD.

I am trying to display a gapless bar that uses 8 custom chars ( 140-147).

Thanks!
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Hi caesar...

We have 8 customs characters to use per screen.

I am already using from 1 to 6. Setting the option to 'c', will tell to function print the $Chr(135) [start] and $Chr(136) [end]

Using like this:

$CustomChar(7,4,4,4,4,4,4,4,4)$CustomChar(8,4,4,4,4,4,4,4,4)$dll(RafaBar1,1,20,0#100#$CPUUsage%#c)

A suggestion is allow to user define all customs chars and the function only print the $Chr(176) to $Chr(136).

My VFD display is 5x7 dots...

Sorry for my english.

Thanks..
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

I have another LCD type. I can define any of the 256 chars, so the most part (besides normal ascii set) can be used as custom chars.

That's why I asked if it would be possible to specify the first custom char to use.

Here is a sample: (I am using 4 winamp plugins modified to use 4 different char sets; display is also gapless, using the whole number of pixels 6x8)

http://www.youtube.com/watch?v=ItTTrkSBKHk
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Wow... That´s nice..

But now? That you can choose all of custom characters, that´s ok for you?

Please, let me know..

:smt003
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

Almost :D

I can define all 8 custom chars. But I cannot define which 8 custom chars.
Sorry to pester you with my demands, as we are just 2 users here that can use this option.

Could it be done so that I can use chars 160, 161, 162, 163, 164, 165, 166 and 167, or to be able to set the starting char (160 in this example)?
Usually first 8 chars are used by the classic Smartie plugins so I need to use another 8 chars for this bar plugin in order to display different bar styles.

PS: in the above movie I used 4 different winamp plugins and each one used its own set of 8 custom chars
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Now I understand you!

:shock:

Jesus..

So....................

:roll: Check now... :wink:
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

Works somewhat now.
I tried $dll(RafaBar1,1,40,0#100#$CPUUsage%#a#1#160)
It doesn't use the 8 chars starting with 160, just char 160. The rest are the usual 7 custom chars.

And $dll(RafaBar1,1,20,0#100#$CPUUsage%#d#1#200) still customizes the first 8 chars but uses 200 instead of 1.

You are getting close.
May I have a look at the source?
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Hi, I have the source at home... but if you want, pvt me...

The correct is
$dll(RafaBar1,1,40,0#100#$CPUUsage%#a#1#160|161|162|163|164|165|166|167|168)

You must define all...

Try it... :D
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Re: HiPrecision Bar

Post by caesar »

Nice!
All custom chars work fine.

Just another suggestion.

You said:
$CustomChar(1,31,0,16,16,16,0,31,0) -> [| ]
$CustomChar(2,31,0,24,24,24,0,31,0) -> [|| ]
$CustomChar(3,31,0,28,28,28,0,31,0) -> [||| ]
$CustomChar(4,31,0,30,30,30,0,31,0) -> [|||| ]
$CustomChar(5,31,0,31,31,31,0,31,0) -> [|||||]
$CustomChar(6,31,0,0,0,0,0,31,0) -> [ ]
$CustomChar(7,4,4,4,4,4,4,4,4) -> Start
$CustomChar(8,4,4,4,4,4,4,4,4) -> End
This works good on the most part of LCDs but some are gapless (Matrix Orbital, CrystalFontz and others too).

The idea is to loose char 7 start, and put the empty one there. This will allow to use char 6 to fill the gap - fonts are 6x8 and here only 5x7 are used.
Char 1 can be used as the start and char 8 can be used as the end.

:mrgreen: please don't kill me!
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Re: HiPrecision Bar

Post by Rafael »

Sure... I need to try reduce the code, get it clean first....

:lol:

:smt006
Post Reply