code problem after updating from old libraries

Share you PDE file with our community

Posts: 240
Joined: Thu Sep 01, 2011 8:44 pm
PostPosted: Sun Aug 18, 2013 1:47 pm
Hey,
It's been a loooooooong time since I updated my libraries, just went from 1.04 to 1.09. I ran the wizard to get started again, then tried to cut and paste my old custom screen work into the new ino file. In trying to compile, I get the error:
In function "ReefAngelClass::ExitMenu()
Documents\Arduino\libraries\ReefAngel/ReefAngel.ccp:4237;
undefined reference to "DrawCustomGraph()"
ReefAngel\ReefAngel.cpp.o: In function ReefAngelClass:: Showinterface
Documents\Arduion|Libraries|ReefAngel1\Reefangel.cpp:3889;
undefined reference to "DrawCustomGraph()

attached is the code...what am I doing wrong? I assume it is something from having used such old code for a while and not keeping up with how things have been changing...
Thanks
Rob

Code: Select all
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>
//-------------------------------------------------------------------------- Screen set-up ---------------------------------------------------------------------------------
#define NumScreens 4
int ScreenID=0;
////// Place global variable code below here
////// Place global variable code above here
void DrawCustomMain()
{
  // Refresh is called at start of ShowInterface.
// ShowInterface calls DrawCustomMain
switch (ScreenID)
{
//---------------------------------------------------------------------------- Screen Code 1--------------------------------------------------------------------------------
case 0://temps and ph
//Top Banner
 
 {
  ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.Clear(COLOR_MAROON, 1,116, 132, 116);
 
  ReefAngel.LCD.DrawLargeText(COLOR_WHITE, COLOR_OLIVEDRAB,  4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 42, 119, 42);

  pingSerial();

  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 6, 17, "Display");
  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 18, 29, "Tank");
  char text[7];
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  pingSerial();
  ReefAngel.LCD.DrawHugeText(COLOR_GOLDENROD, DefaultBGColor, 65, 19, text);
  pingSerial();
   
 
  ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 10, 52, "pH:");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 40, 52, text);
   pingSerial();
 
   ReefAngel.LCD.DrawLargeText(COLOR_RED, COLOR_WHITE,59,70,"Frag:");
   ConvertNumToString(text, ReefAngel.Params.Temp[T3_PROBE], 10);
   ReefAngel.LCD.DrawLargeText(COLOR_RED, DefaultBGColor, 99, 70, text);
   
         
 
  ReefAngel.LCD.DrawLargeText(COLOR_DARKORCHID, COLOR_WHITE,59,90,"Room:");
  ConvertNumToString(text, ReefAngel.Params.Temp[T2_PROBE], 10);
  ReefAngel.LCD.DrawLargeText(COLOR_BLUE, DefaultBGColor, 99, 90, text);

  //

  pingSerial();
 break;
 }
//---------------------------------------------------------------------------- Screen Code 2---------------------------------------------------------------------------------

case 1:// outlet box
{
 ReefAngel.LCD.DrawLargeText(COLOR_DARKOLIVEGREEN, COLOR_WHITE, 4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.Clear(COLOR_MAROON, 1,116, 132, 116);
   ReefAngel.LCD.Clear(109, 0, 29, 131, 38);
   ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_DIMGREY, 28, 30, "OUTLET BOX");
   //ReefAngel.LCD.DrawText(COLOR_RED,DefaultBGColor, 40, 95, "RED = OFF");
   //ReefAngel.LCD.DrawText(COLOR_BLACK, DefaultBGColor, 35, 105, "BLACK = ON");
     // int t=WMRTimer-now();
      //if (t>=0)
     // ReefAngel.LCD.Clear(255,90,95,110,115);
     // ReefAngel.LCD.DrawText(DPColor,DefaultBGColor, 10, 95, "WAVE TIMER:");//display the timer for the wavemaker
    //ReefAngel.LCD.DrawText(APColor, COLOR_WHITE,90,95,t);
     

  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,80,47,"2");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,70,47,"4");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,60,47,"6");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,50,47,"8");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,80,80,"1");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,70,80,"3");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,60,80,"5");
  ReefAngel.LCD.DrawText(COLOR_NAVY,DefaultBGColor,50,80,"7");
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawCircleOutletBoxHorizontal(47, 56, TempRelay);
 
 
 pingSerial();
 break;
}
//----------------------------------------------Screen Code 3-------
case 2://Moon %, phase when code is fixed
{
  ReefAngel.LCD.DrawLargeText(COLOR_DARKOLIVEGREEN, COLOR_WHITE, 4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.Clear(COLOR_MAROON, 1,116, 132, 116);
ReefAngel.LCD.DrawHugeText(COLOR_TEAL, COLOR_WHITE, 8, 39,"Moon");
ReefAngel.LCD.DrawHugeText(COLOR_TEAL, COLOR_WHITE, 8, 62,"Phase:");
           ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),COLOR_TEAL, 95, 45,1);
             ReefAngel.LCD.DrawHugeText(COLOR_BLACK, COLOR_WHITE, 115, 39, "%");
             ReefAngel.LCD.DrawLargeText(0,255,11,85,MoonPhaseLabel());
           

  pingSerial();
break;
}
}
}
////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port5Bit | Port6Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port6 );

    ////// Place additional initialization code below here
   

    ////// Place additional initialization code above here

}
void loop()
{
    ReefAngel.ActinicLights( Port1 );
    ReefAngel.ActinicLights( Port2 );
    ReefAngel.DayLights( Port3 );
    ReefAngel.DayLights( Port4 );
    ReefAngel.Wavemaker1( Port5 );
    ReefAngel.StandardHeater( Port7 );
    ReefAngel.StandardFan( Port8 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.PWM.SetActinic( MoonPhase() );
    ////// Place your custom code below here
   

    ////// Place your custom code above here
      if (ReefAngel.Joystick.IsLeft())
{
ReefAngel.ClearScreen(DefaultBGColor);
ScreenID--;
}
if (ReefAngel.Joystick.IsRight())
{
ReefAngel.ClearScreen(DefaultBGColor);
ScreenID++;
}
    // This should always be the last line
    ReefAngel.Portal( "psyrob" );
    ReefAngel.ShowInterface();
}

Rob
Image

Posts: 11842
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Aug 18, 2013 10:04 pm
You missed this:
Code: Select all
void DrawCustomGraph()
{
}
Roberto.

Posts: 240
Joined: Thu Sep 01, 2011 8:44 pm
PostPosted: Mon Aug 19, 2013 9:43 am
Doh!!! Thanks Roberto... :)
Image

Return to My PDE/INO file

Who is online

Users browsing this forum: No registered users and 2 guests