Changing font colors...

Do you have a question on how to do something.
Ask in here.
Post Reply
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Changing font colors...

Post by NanoTrevor »

how do i code the color changes...ive tried adding the color library and pasting in the define codes...no luck...any help would be appreciated.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Changing font colors...

Post by binder »

NanoTrevor wrote:how do i code the color changes...ive tried adding the color library and pasting in the define codes...no luck...any help would be appreciated.
What type of color changes are you wanting to do?

I have coded everything to make it fully customizable but have yet to give people an application or an easier way to code it.

This cannot be enabled via RAGen. So you have to manually enable it.

Here's what you have to do to manually add it in. This will not affect the libraries. I would suggest that once you get the colors you like, that you copy the ReefAngel_CustomColors.h file because that will be replaced with upgrading of libraries.

You have 2 routes that you can take to customize the colors:
1) Edit the ReefAngel_Globals.h file. Not recommended because of all the other stuff in it.
2) Allow for ReefAngel_CustomColors.h file. This is recommended to use but a copy of the file is recommended to have for when you upgrade the libraries for reasons explained above.

Here's what you have to do, using option 2.
  • Edit ReefAngel_Features.h file and add in

    Code: Select all

    #define COLORS_PDE
  • Edit your PDE file and add in at the top of the PDE file above the #include <ReefAngel_Features.h> line.

    Code: Select all

    #include <ReefAngel_Colors.h>
    #include <ReefAngel_CustomColors.h>
  • Edit ReefAngel_CustomColors.h to have the colors you want to use. The list of colors are available in ReefAngel_Colors.h
Then just compile and upload to your controller. The CustomColors file has comments in it about what each line means and how to use it.

I'm attaching the official Color Palette to this post to give you a visual idea of the colors.
Color Palette
Color Palette
RA color palette v1.0.jpg (975.75 KiB) Viewed 7107 times

curt
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Re: Changing font colors...

Post by NanoTrevor »

hey curt, thanks for the response. im just wanting to change the font colors for the temps ph clock, prob bg color, just wanna put my spin on the ra. another question, on the demo code the main screen has ra demo across top, how hard would it be to put something like "Trevor's NC6"? in ragen code?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Changing font colors...

Post by binder »

NanoTrevor wrote:hey curt, thanks for the response. im just wanting to change the font colors for the temps ph clock, prob bg color, just wanna put my spin on the ra. another question, on the demo code the main screen has ra demo across top, how hard would it be to put something like "Trevor's NC6"? in ragen code?
Let me just say that all this simplicity with changing colors only applies to my Development branch. The simple / standard libraries is much more difficult to change the colors.

As for the adding the Banner across the top of the screen, that would have to be done with my latest code from my github account that has not "officially" been released yet (even though the code works). You would have to use the CustomMain feature to create your own custom main screen. You could model it after the existing home screen but put a slight spin on it for your liking. It wouldn't be too difficult to accomplish (for me at least :) ) but may take some experimenting for you.

Let me know if you are running my development libraries and if you are up for trying this out.

curt
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Re: Changing font colors...

Post by NanoTrevor »

hey curt, just made the changes you said and it worked perfect, now to just tinker with the exact colors i want. for instance now ports that are on are green and off is red...makes things tad bit easier at a glance. i do believe i am running your dev library i gen the pde with ragen and tweaked for pwm...so i think i am up for the challenge...your ragen is invaluable for peeps like me with no coding experience, thanks again.


Hey one more question...any idea why the bottom left of my graph border is like 1 pixel down for about half the bottom line? section above the temps?
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Changing font colors...

Post by alexwbush »

NanoTrevor wrote:hey curt, just made the changes you said and it worked perfect, now to just tinker with the exact colors i want. for instance now ports that are on are green and off is red...makes things tad bit easier at a glance. i do believe i am running your dev library i gen the pde with ragen and tweaked for pwm...so i think i am up for the challenge...your ragen is invaluable for peeps like me with no coding experience, thanks again.
good idea! I like the red and green, I might have to look into that!
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Changing font colors...

Post by binder »

NanoTrevor wrote:hey curt, just made the changes you said and it worked perfect, now to just tinker with the exact colors i want. for instance now ports that are on are green and off is red...makes things tad bit easier at a glance. i do believe i am running your dev library i gen the pde with ragen and tweaked for pwm...so i think i am up for the challenge...your ragen is invaluable for peeps like me with no coding experience, thanks again.
If you got things working that easily, then you are running the development libraries. You will need to use the latest code from my github account to be able to do the custom main screen. Before you go upgrading, let me work something up for you and see what you think first.
NanoTrevor wrote:Hey one more question...any idea why the bottom left of my graph border is like 1 pixel down for about half the bottom line? section above the temps?
No, I don't have any idea. I attribute it to overlap from drawing on the screen.

curt
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Re: Changing font colors...

Post by NanoTrevor »

alright curt sounds like a plan...i really would only want to add a header of text...i think id like to keep the graph and other items already there...thanks again...hey while im hassling you...ive read through the reversing the high ato threads but still dont understand if it is poss to have on high ato with wires facing up? ive got a small tank and it would be alot easier if i could mount it in this config. thanks
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Changing font colors...

Post by binder »

NanoTrevor wrote:alright curt sounds like a plan...i really would only want to add a header of text...i think id like to keep the graph and other items already there...thanks again...hey while im hassling you...ive read through the reversing the high ato threads but still dont understand if it is poss to have on high ato with wires facing up? ive got a small tank and it would be alot easier if i could mount it in this config. thanks
In the latest addition to my master / main branch of code on my github account, I flipped the single ATO code around so that the wires will be mounted up.

I also created a custom main screen for you too. Hopefully this will work for you:
Trevor's NC6
Trevor's NC6
Trevor.JPG (111.9 KiB) Viewed 7079 times
To use this, you will have to use the CustomMain define in your ReefAngel_Features.h file. Here is the code that is behind this menu:

Code: Select all

void DrawCustomMain()
{
  ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, 30, 2, "Trevor's NC6");
  ReefAngel.LCD.DrawDate(6, 118);
  pingSerial();
  ReefAngel.LCD.DrawMonitor(15, 68, ReefAngel.Params,
                            ReefAngel.PWM.GetDaylightValue(), 
                            ReefAngel.PWM.GetActinicValue());
  pingSerial();
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 101, TempRelay);
}

void DrawCustomGraph()
{
  ReefAngel.LCD.DrawGraph(5, 11);
}
curt
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Re: Changing font colors...

Post by NanoTrevor »

awesome curt, i will implement this as soon as i get the pwm dialed in. im having tons of probs. ive got the pwm expansion module roberto sells. i also got the buckpucks wired and will work with the 0-5 volt pwm. the problem is that the pucks have a reverse setup, 5v is off 0v in on, weird. i reversed the code, instead of 0-50, its 100-50, same thing. the memory is also set to pwm channels 100, meaning off. i have the pwmslope code as copied and pasted from other threads and theres no ramping, itll just jump from 100 to 50 at the specified time. i can also not get the pwm exp mod to work, no voltage at the connectors. any help would be nice...if u need the code...ill post it in the requests forum.
Post Reply