Page 1 of 1
error: 'CurrentRelayState' was not declared in this scope
Posted: Fri Aug 19, 2011 7:53 pm
by serhiyi
I just got my controller today and playing with code. I'm using RAGen to see how that works (trying to see what WiFi module and other settings can do for me).
I generated code and trying to load it. I got this error and can't pass over it:
Code: Select all
C:\Users\S\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp: In member function 'void ReefAngelClass::ShowInterface()':
C:\Users\S\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp:1464: error: 'CurrentRelayState' was not declared in this scope
C:\Users\S\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp:1501: error: 'CurrentRelayState' was not declared in this scope
Am I missing something?
Thanks.
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Fri Aug 19, 2011 7:59 pm
by rimai
I think you just found a bug
To overcome this, just make sure not to use the "Save Relay State" on the Features tab.
Then just generate the code again.
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Fri Aug 19, 2011 8:15 pm
by serhiyi
It still shows this error. What I did.
1. Opened REGen
2. Used defaults in "Features" and add WiFi
- RAgen1.png (41.5 KiB) Viewed 5113 times
3. Used defaults in "PDE"
- RAgen2.png (51.24 KiB) Viewed 5113 times
4. Used defualts in "Internal Memory"
- RAgen3.png (51.5 KiB) Viewed 5113 times
5. Switched back to "PDE" and clicked Generate
6. Opened PDE file in Arduino (Reef Angel Controller)
Code: Select all
// Autogenerated file by RAGen (v1.0.4.92), (08/19/2011 23:01)
// RA_081911_2301.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define wifi
#define StandardLightSetup
*/
#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>
void setup()
{
ReefAngel.Init(); //Initialize controller
// Ports that are always on
ReefAngel.Relay.On(Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
Still got error
C:\Users\Sergey\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp: In member function 'void ReefAngelClass::ShowInterface()':
C:\Users\Sergey\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp
error: 'CurrentRelayState' was not declared in this scope
C:\Users\Sergey\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp
error: 'CurrentRelayState' was not declared in this scope
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Fri Aug 19, 2011 8:20 pm
by serhiyi
Tried with "Save Relay State" selected with same result
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Fri Aug 19, 2011 8:42 pm
by serhiyi
Looks like I fixed it.
I extracted all library files from RAGen installation and replaced files that I had before. Looks like this resolved the issue.
Sorry for false alarm.
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Fri Aug 19, 2011 8:43 pm
by rimai
Make sure the libraries folder in RAGen is setup correctly.
Go to menu Edit->Settings and look at the libraries folder and make sure it points to "Documents\Arduino\libraries"
Re: error: 'CurrentRelayState' was not declared in this scop
Posted: Sat Aug 20, 2011 6:11 pm
by binder
Good you got things fixed. There was an error when you enable the SaveRelayState feature.
The error has been fixed in the upcoming .17 release and SaveRelayState will now compile properly. I have not currently tested the feature but should work as expected.
curt