Circles, min/max pde

Requests for new functions or software apps
Post Reply
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Circles, min/max pde

Post 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...
Attachments
RA screen.jpg
RA screen.jpg (62.47 KiB) Viewed 9456 times
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Circles, min/max pde

Post by binder »

Nice. Glad it works for you.
screenshot looks great! :)
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Circles, min/max pde

Post 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:
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Circles, min/max pde

Post by psyrob »

very cool!!
Image
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Circles, min/max pde

Post by jsclownfish »

Thanks Curt! It will be nice to have these available for custom screens.
-Jon
phat
Posts: 8
Joined: Sun Sep 21, 2014 12:58 pm

Re: Circles, min/max pde

Post 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 ?
phat
Posts: 8
Joined: Sun Sep 21, 2014 12:58 pm

Re: Circles, min/max pde

Post by phat »

anyone ???
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Circles, min/max pde

Post 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.
Post Reply