Errors after upgrade...

Do you have a question on how to do something.
Ask in here.
Post Reply
sceia
Posts: 30
Joined: Mon Nov 14, 2011 8:06 pm

Errors after upgrade...

Post by sceia »

Ok so I upgraded to the new reefangel 0.9.2 software and updated the libraries as well as getting the new RAGen... I'm getting ready to install the pwnexpansion and dosers. When I try to compile my original file, tons of errors are being thrown... I tried uninstalling and reupdating. I know it's something easy, but I'm lost at the moment...

Code: Select all

In file included from LED_Setup.cpp:2:
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel_Globals/ReefAngel_Globals.h:29:22: error: WProgram.h: No such file or directory
In file included from LED_Setup.cpp:18:
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:27:21: error: Globals.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:28:64: error: InternalEEPROM.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:30:25: error: RA_NokiaLCD.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:31:20: error: RA_ATO.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:32:25: error: RA_Joystick.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:33:17: error: LED.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:34:27: error: RA_TempSensor.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:35:19: error: Relay.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:36:20: error: RA_PWM.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:37:19: error: Timer.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:38:20: error: Memory.h: No such file or directory
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:47:17: error: RF.h: No such file or directory
In file included from LED_Setup.cpp:18:
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:82: error: 'RA_NokiaLCD' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:83: error: 'RA_JoystickClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:84: error: 'LEDClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:86: error: 'RA_ATOHighClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:87: error: 'RA_ATOLowClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:88: error: 'RA_TempSensorClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:89: error: 'RelayClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:91: error: 'RA_PWMClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:100: error: 'RFClass' does not name a type
C:\Users\sceia\Documents\Arduino\libraries\ReefAngel/ReefAngel.h:118: error: 'TimerClass' does not name a type
LED_Setup.cpp: In function 'void setup()':
LED_Setup.pde:-1: error: 'class ReefAngelClass' has no member named 'Relay'
LED_Setup.pde:-1: error: 'class ReefAngelClass' has no member named 'Relay'
LED_Setup.cpp: In function 'void loop()':
LED_Setup.pde:-1: error: 'class ReefAngelClass' has no member named 'LCD'
LED_Setup.pde:-1: error: 'class ReefAngelClass' has no member named 'Relay'
LED_Setup.pde:-1: error: 'class ReefAngelClass' has no member named 'Relay'
symon_say
Posts: 118
Joined: Sun Oct 09, 2011 6:04 am
Location: Dominican Republic
Contact:

Re: Errors after upgrade...

Post by symon_say »

Didi you upgrade the reef angel installer??
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors after upgrade...

Post by rimai »

Some changes were made to the libraries and if you are using an older code, you will need to slightly restructure.
http://forum.reefangel.com/viewtopic.php?f=7&t=725
If you paste your entire code, I can help you with that.
Roberto.
sceia
Posts: 30
Joined: Mon Nov 14, 2011 8:06 pm

Re: Errors after upgrade...

Post by sceia »

rimai wrote:Some changes were made to the libraries and if you are using an older code, you will need to slightly restructure.
http://forum.reefangel.com/viewtopic.php?f=7&t=725
If you paste your entire code, I can help you with that.
Here ya go... I'm about to start tackling the pwm stuff... Buttoning up my build tonight. I have the pwmexpansion port... I'm using the inventronics dimmable drivers. Do I just wire each straight up to the pwmexpansion or should I use the analogue cable?

Scott.

Code: Select all

#include <ReefAngel_Features.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>


#define AutoTopOff          1 
#define Refuge              2 
#define MHLight             3 
#define Actinic             4 
#define WaveController      5 
#define Heater              6 
#define Fans                7 
#define Pumps               8 

#define NW1        1
#define NW2        2
#define NW3        3
#define Red        4
#define Green      5
#define Violet     6 
#define Blue       7
#define RB         8


#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 

#include <avr/pgmspace.h>
// Create the menu entries
prog_char menu1_label[] PROGMEM = "Feed Fish";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "ATO Clear";
prog_char menu4_label[] PROGMEM = "PH Calibration";
prog_char menu5_label[] PROGMEM = "Day LEDs";
prog_char menu6_label[] PROGMEM = "Actinic LEDs";
prog_char menu7_label[] PROGMEM = "Night LEDs";
prog_char menu8_label[] PROGMEM = "Refuge LEDs";
prog_char menu9_label[] PROGMEM = "100% Daylight LEDs";


// Group the menu entries together
PROGMEM const char *menu_items[] = {
menu1_label, 
menu2_label, 
menu3_label,
menu4_label, 
menu5_label, 
menu6_label,
menu7_label, 
menu8_label,
menu9_label
};






void MenuEntry1() //"Feed Fish"
{
  ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
  ReefAngel.WaterChangeModeStart();
}

void MenuEntry3()
{
  ReefAngel.ATOClear();
  ReefAngel.DisplayMenuEntry("Clear ATO");
}

void MenuEntry4() 
{
  ReefAngel.SetupCalibratePH();
  ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry5() //"Day LEDs"
{
 /* ReefAngel.PWM.SetChannel(0,PWMSlope(9,0,17,0,15,100,60,15));
  ReefAngel.PWM.SetChannel(1,PWMSlope(9,0,17,0,15,60,60,15));
  ReefAngel.PWM.SetChannel(2,PWMSlope(9,30,16,30,15,100,60,15));
  ReefAngel.PWM.SetChannel(3,PWMSlope(9,30,16,30,15,100,90,15));
  ReefAngel.PWM.SetChannel(4,PWMSlope(9,0,17,0,15,75,30,15));
  ReefAngel.PWM.SetChannel(5,PWMSlope(11,0,14,0,15,30,20,15));
*/}

void MenuEntry6() //"Actinic LEDs"
{

}

void MenuEntry7() //"Night LEDs"
{
 
}

void MenuEntry8() //"Refuge LEDs"
{

}

void MenuEntry9() //"100% Daylight LEDs"
{

}


void setup() 
{ 
  //Init and custom menus
  ReefAngel.Init();  //Initialize controller
  ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

/*
AutoTopOff          1 
Refuge              2 
MHLight             3 
Actinic             4 
WaveController      5 
Heater              6 
Fans                7 
Pumps               8 
*/
    //Menu Modes 
    ReefAngel.FeedingModePorts = B10010000;
    ReefAngel.WaterChangePorts = B10010000;
  
  //Pumps and waves on
  ReefAngel.Relay.On(Pumps);  //Turn Sump/Skimmer on at startup
  ReefAngel.Relay.On(WaveController);  //Turn WaveController on at startup
}

void loop() 
{ 
  
  
  ReefAngel.LCD.SetContrast(60);  // Set contrast to 60
  ReefAngel.Relay.On(WaveController);
    

  
  //Top Off
  ReefAngel.StandardATO(AutoTopOff,500);  //Setup AutoTopOff as Auto Top-Off function with 500s timeout
  
  //Light Schedule  

  
  //Heating/Cooling
  ReefAngel.StandardHeater(Heater,778,782);  // Setup Heater to turn on at 77.8F and off at 78.2F 
  ReefAngel.StandardFan(Fans,780,790);  // Setup fans
  
  ReefAngel.ShowInterface();
  
  ReefAngel.Relay.Write();  // Make relay changes effective 
}
rufessor
Posts: 291
Joined: Tue Oct 25, 2011 7:39 am

Re: Errors after upgrade...

Post by rufessor »

You can fix a lot of the errors if you just look at the post Roberto suggested and change the names used in the
#include lines at the top....

Many of the files that used to be called ReefAngel_XXX.h are now either RA_XXX.h or something else entirely. Its super easy, if you do not know how to code, you could change those at least. The rest is probably only a few lines that require attention that I am sure Roberto will reply with fixes. At least you'll be 95% fixed if you just change names of the #include <file names edit in here>

There is a 1:1 listing of old names (which you are using) and new names (which you need to switch to) in the post Rimai referenced.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors after upgrade...

Post by rimai »

Yeap, just changing the headers up top should fix everything:

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 <ReefAngel.h>


#define AutoTopOff          1 
#define Refuge              2 
#define MHLight             3 
#define Actinic             4 
#define WaveController      5 
#define Heater              6 
#define Fans                7 
#define Pumps               8 

#define NW1        1
#define NW2        2
#define NW3        3
#define Red        4
#define Green      5
#define Violet     6 
#define Blue       7
#define RB         8


#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 

#include <avr/pgmspace.h>
// Create the menu entries
prog_char menu1_label[] PROGMEM = "Feed Fish";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "ATO Clear";
prog_char menu4_label[] PROGMEM = "PH Calibration";
prog_char menu5_label[] PROGMEM = "Day LEDs";
prog_char menu6_label[] PROGMEM = "Actinic LEDs";
prog_char menu7_label[] PROGMEM = "Night LEDs";
prog_char menu8_label[] PROGMEM = "Refuge LEDs";
prog_char menu9_label[] PROGMEM = "100% Daylight LEDs";


// Group the menu entries together
PROGMEM const char *menu_items[] = {
menu1_label, 
menu2_label, 
menu3_label,
menu4_label, 
menu5_label, 
menu6_label,
menu7_label, 
menu8_label,
menu9_label
};






void MenuEntry1() //"Feed Fish"
{
  ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
  ReefAngel.WaterChangeModeStart();
}

void MenuEntry3()
{
  ReefAngel.ATOClear();
  ReefAngel.DisplayMenuEntry("Clear ATO");
}

void MenuEntry4() 
{
  ReefAngel.SetupCalibratePH();
  ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry5() //"Day LEDs"
{
/* ReefAngel.PWM.SetChannel(0,PWMSlope(9,0,17,0,15,100,60,15));
  ReefAngel.PWM.SetChannel(1,PWMSlope(9,0,17,0,15,60,60,15));
  ReefAngel.PWM.SetChannel(2,PWMSlope(9,30,16,30,15,100,60,15));
  ReefAngel.PWM.SetChannel(3,PWMSlope(9,30,16,30,15,100,90,15));
  ReefAngel.PWM.SetChannel(4,PWMSlope(9,0,17,0,15,75,30,15));
  ReefAngel.PWM.SetChannel(5,PWMSlope(11,0,14,0,15,30,20,15));
*/}

void MenuEntry6() //"Actinic LEDs"
{

}

void MenuEntry7() //"Night LEDs"
{

}

void MenuEntry8() //"Refuge LEDs"
{

}

void MenuEntry9() //"100% Daylight LEDs"
{

}


void setup() 
{ 
  //Init and custom menus
  ReefAngel.Init();  //Initialize controller
  ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

/*
AutoTopOff          1 
Refuge              2 
MHLight             3 
Actinic             4 
WaveController      5 
Heater              6 
Fans                7 
Pumps               8 
*/
    //Menu Modes 
    ReefAngel.FeedingModePorts = B10010000;
    ReefAngel.WaterChangePorts = B10010000;
  
  //Pumps and waves on
  ReefAngel.Relay.On(Pumps);  //Turn Sump/Skimmer on at startup
  ReefAngel.Relay.On(WaveController);  //Turn WaveController on at startup
}

void loop() 
{ 
  
  
  ReefAngel.LCD.SetContrast(60);  // Set contrast to 60
  ReefAngel.Relay.On(WaveController);
    

  
  //Top Off
  ReefAngel.StandardATO(AutoTopOff,500);  //Setup AutoTopOff as Auto Top-Off function with 500s timeout
  
  //Light Schedule  

  
  //Heating/Cooling
  ReefAngel.StandardHeater(Heater,778,782);  // Setup Heater to turn on at 77.8F and off at 78.2F 
  ReefAngel.StandardFan(Fans,780,790);  // Setup fans
  
  ReefAngel.ShowInterface();
  
  ReefAngel.Relay.Write();  // Make relay changes effective 
}

Roberto.
sceia
Posts: 30
Joined: Mon Nov 14, 2011 8:06 pm

Re: Errors after upgrade...

Post by sceia »

Yea, I guess that's what happens when you wake up at 3am cause you can't sleep and want to program...lol... It did fix most errors... But I still have one...

Code: Select all

ledsetup.cpp: In function 'void setup()':
ledsetup:135: error: 'class ReefAngelClass' has no member named 'InitMenu'
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors after upgrade...

Post by rimai »

Open RAGen
Go to features tab
Check Custom Menu and uncheck Simple Menu
Save
Roberto.
Post Reply