Page 1 of 1

Re: Circles, min/max pde

Posted: Sun Feb 12, 2012 6:00 pm
by psyrob
Curt:
I uploaded and this works like a charm...thanks for you help...screen shot below
Don't know why, but my relay box is lined up opposite the way other people's seem to be...relay 1 is on the top right corner and relay 2 is on the top left, if you have the data cable port pointing down...

Re: Circles, min/max pde

Posted: Sun Feb 12, 2012 6:12 pm
by binder
Nice. Glad it works for you.
screenshot looks great! :)

Re: Circles, min/max pde

Posted: Wed Mar 21, 2012 8:46 pm
by binder
I just finished adding this into the libraries. I made some tweaks to it for better and improved functionality. I merged the reverse displaying into one function and made it adhere to the standard color scheme / coordination. I also renamed some of the functions to add more clarity to them. This will be in the 0.9.4 release.

Here are the functions added to the LCD library (RA_NokiaLCD):

Code: Select all

void DrawCircleOutline(byte x, byte y, byte radius, byte bordercolor);
void FillCircle(byte x, byte y, byte radius, byte fillcolor);
void DrawCircleOutletBox(byte x, byte y, byte RelayData, bool reverse = false);
To use, you would simply do exactly like you would for the standard outlet box:
This will display the outlet in "normal" fashion

Code: Select all

// Normal display like this:
// Outlets in 2 columns
// 1 2
// 3 4
// 5 6
// 7 8
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawCircleOutletBox(10,10,TempRelay);
And reversed:

Code: Select all

// Reversed display
// Outlets in 2 columns
// 2 1
// 4 3
// 6 5
// 8 7
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawCircleOutletBox(10,10,TempRelay,true);
There are no numbering on the circles. If you want the labels, you gotta add them in yourself and use code like on the initial post.

Regardless, I just wanted to share that this will be an option for the next release of the libraries. :ugeek:

Re: Circles, min/max pde

Posted: Wed Mar 21, 2012 9:25 pm
by psyrob
very cool!!

Re: Circles, min/max pde

Posted: Thu Mar 22, 2012 4:32 pm
by jsclownfish
Thanks Curt! It will be nice to have these available for custom screens.
-Jon

Re: Circles, min/max pde

Posted: Wed Oct 08, 2014 1:27 pm
by phat
hi i would love to able to use this custom screen but i am not sure as how to do this i don't understand what i should put where in the libraries, i am new to this

i have read this http://curtbinder.info/ragen/docs/RA_Custom_Menu.pdf and added

#define CUSTOM_MENU

to the features file

and this to the RA_NOKIALCD

void DrawCircleOutline(byte x, byte y, byte radius, byte bordercolor);
void FillCircle(byte x, byte y, byte radius, byte fillcolor);
void DrawCircleOutletBox(byte x, byte y, byte RelayData, bool reverse = false);

what else do i need to do ?

Re: Circles, min/max pde

Posted: Sat Oct 11, 2014 9:03 am
by phat
anyone ???

Re: Circles, min/max pde

Posted: Sat Oct 11, 2014 9:24 am
by lnevo
You shouldn't need to do any of that anymore afaik. I believe you just need to define the functions in your INO DrawCustomMain and DrawCustomGraph and start drawing your screens. I'd say look at my code but it's not a good beginner reference. Take a look at some people's posted INO files for some examples.