Circles, min/max pde

Requests for new functions or software apps

Posts: 243
Joined: Thu Sep 01, 2011 8:44 pm
PostPosted: Sun Feb 12, 2012 6:00 pm
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 2981 times
Image
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun Feb 12, 2012 6:12 pm
Nice. Glad it works for you.
screenshot looks great! :)
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Mar 21, 2012 8:46 pm
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:

Posts: 243
Joined: Thu Sep 01, 2011 8:44 pm
PostPosted: Wed Mar 21, 2012 9:25 pm
very cool!!
Image
User avatar
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis
PostPosted: Thu Mar 22, 2012 4:32 pm
Thanks Curt! It will be nice to have these available for custom screens.
-Jon

Posts: 8
Joined: Sun Sep 21, 2014 12:58 pm
PostPosted: Wed Oct 08, 2014 1:27 pm
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 ?

Posts: 8
Joined: Sun Sep 21, 2014 12:58 pm
PostPosted: Sat Oct 11, 2014 9:03 am
anyone ???
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Oct 11, 2014 9:24 am
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.
Previous

Return to Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron