custom main font help

Do you have a question on how to do something.
Ask in here.
Post Reply
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

custom main font help

Post by psyrob »

Curt:
I am trying to use DrawLargeText for a custom main, and I have the fonts defined in the features file, but I keep getting the error "No member name DrawLargeText"

Can you spot what's wrong?

pde

Code: Select all

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define VersionMenu
#define wifi
#define SIMPLE_MENU
#define CUSTOM_MAIN
#define COLORS_PDE
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Colors.h>
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

byte wmport=Port5;
boolean wmdelay=false;

void DrawCustomMain()
{

ReefAngel.LCD.DrawDate(6, 118);
ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 6, 2, "ROB'S REEF ANGEL");
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 17, 132, 17);
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 115, 132, 115);
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 90, 132, 90);
pingSerial();


ReefAngel.LCD.DrawText(COLOR_GOLDENROD, COLOR_WHITE, 8, 21, "Main Tank:");
char text[7];
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
//ReefAngel.LCD.Clear(DefaultBGColor,43,20,73,20);
pingSerial();
ReefAngel.LCD.DrawText(T1TempColor, DefaultBGColor, 88, 20, text);
pingSerial(); 

ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 50, 58, "pH:");
ConvertNumToString(text, ReefAngel.Params.PH, 100);
//ReefAngel.LCD.Clear(DefaultBGColor, 98, 33, 128, 33);
ReefAngel.LCD.DrawText(PHColor, DefaultBGColor, 88, 58, text);
pingSerial();

ReefAngel.LCD.DrawText(COLOR_RED, COLOR_WHITE,8,33,"Frag Tank:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor, 
88, 33, 10);

ReefAngel.LCD.DrawText(COLOR_DARKORCHID, COLOR_WHITE,8,47,"Room Temp:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor, 
88, 47, 10);


here's the features file

Code: Select all


#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__


#define DisplayImages
#define VersionMenu
#define wifi
#define SIMPLE_MENU
#define CUSTOM_MAIN
#define COLORS_PDE
#define FONT_8X8
#define FONT_8X16





#endif  // __REEFANGEL_FEATURES_H__
Image
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

Re: custom main font help

Post by psyrob »

Or anyone....
Image
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: custom main font help

Post by binder »

That is a puzzler. I tested it out on my computer and was having similar problems. Here's how I fixed it (don't ask why it works, it just did). This is what I did. I did the extra compiles to test that things were being included properly.

Comment out the FONT_8x8 and FONT_8x16 lines
Comment out the DrawLargeText line.
Compile your code.
Uncomment the FONT_8x8 line (you don't really need the 8x16 line according to your code usage)
Compile your code.
Uncomment the DrawLargeText line.
Compile your code again.

That should work.
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

Re: custom main font help

Post by psyrob »

Well, tried it, got to the last step (uncomment DrawLargeTest) and it is again giving the "No member " error...
Image
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

Re: custom main font help

Post by psyrob »

You know, it was working to do large or huge numbers, I had those defined in the features file, but I removed them...don't know if that gives a hint...
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: custom main font help

Post by rimai »

You will not believe what the problem is... lol

Code: Select all

#define FONT_8X8
#define FONT_8X16
You used capitalize "X" and it has to be lower case :ugeek:
Roberto.
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

Re: custom main font help

Post by psyrob »

:oops: ARRRRGGGG!!!!!!! :lol:
Image
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: custom main font help

Post by binder »

Haha. That thought crossed my mind too but I wasn't paying close attention when I was testing it. Guess that's what I get for not paying close attention. :)
rufessor
Posts: 291
Joined: Tue Oct 25, 2011 7:39 am

Re: custom main font help

Post by rufessor »

THANKS for the reminder guys!

hahahah... I think I was doing the SAME thing! I KNOW that C++ is case sensitive but old habits are hard to break!!
Post Reply