Web Banner Compiling Error

Related to the development libraries, released by Curt Binder
Post Reply
uclamatthew
Posts: 6
Joined: Fri Mar 18, 2011 6:40 pm

Web Banner Compiling Error

Post by uclamatthew »

I used RAGen to create a new code set tonight and got the following error related to the Web Banner functionality:
RA_033011_1726.cpp: In function 'void setup()':
RA_033011_1726:58: error: 'class ReefAngelClass' has no member named 'LoadWebBanner'
RA_033011_1726.cpp: In function 'void loop()':
RA_033011_1726:85: error: 'class ReefAngelClass' has no member named 'WebBanner'


The line of code related to these errors was highlighted:
ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));

I'm using the latest Development Libraries (0.8.5.14) and RAGen (1.0.4).

Also, I confirmed it by generating the exact same code, but with the "Web Banner" unchecked. That compiled just fine.

Any ideas?
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Web Banner Compiling Error

Post by binder »

uclamatthew wrote:I used RAGen to create a new code set tonight and got the following error related to the Web Banner functionality:
RA_033011_1726.cpp: In function 'void setup()':
RA_033011_1726:58: error: 'class ReefAngelClass' has no member named 'LoadWebBanner'
RA_033011_1726.cpp: In function 'void loop()':
RA_033011_1726:85: error: 'class ReefAngelClass' has no member named 'WebBanner'


The line of code related to these errors was highlighted:
ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));

I'm using the latest Development Libraries (0.8.5.14) and RAGen (1.0.4).

Also, I confirmed it by generating the exact same code, but with the "Web Banner" unchecked. That compiled just fine.

Any ideas?
Yep, you need to have WIFI enabled on the controller. Since it's a WebBanner and the controller will be handling the uploading of your data to reefangel.com, you need to have the wifi module. To enable, open up RAGen and then under the Features tab, select WIFI OR you can open up your ReefAngel_Features/ReefAngel_Features.h file and add the following line to it:

Code: Select all

#define wifi
Either way will work, but if you have altered the PDE file and don't want to regenerate it, then the "fastest" way would be to edit the ReefAngel_Features file. This file is located in your "My Documents/Arduino/libraries/ReefAngel_Features/" folder. You can open up ReefAngel_Features.h with a text editor (notepad works fine). Add the above line after the last #define statement and above the '#endif // __REEFANGEL_FEATURES_H__' line. Save the file and then re-compile your PDE in arduino.

Curt
uclamatthew
Posts: 6
Joined: Fri Mar 18, 2011 6:40 pm

Re: Web Banner Compiling Error

Post by uclamatthew »

I'm pretty sure I had the Wifi box checked in RAGen. I tried recreating the pde making sure the boxed was checked, but got the same error.

I tried making that change by adding the line to the ReefAngel_Features.h file, but no luck.

Doing some poking around, the libraries that I've downloaded the ReefAngel_Features.h file had a lot of the #define statements commented out, including the Wifi. I tried uncommenting them all, but nothing changed.

I also poked around the ReefAngel.h file, since that was referenced in the error message, and that does not include a #include <ReefAngel_Features.h> line. Again, add that, no change.

I haven't made any other changes to the library files or pde files, and went ahead and reloaded the files to wipe any of the changes I made while poking around. Re-ran the pde to make sure and got the same error.

Any other ideas?
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Web Banner Compiling Error

Post by binder »

uclamatthew wrote:I'm pretty sure I had the Wifi box checked in RAGen. I tried recreating the pde making sure the boxed was checked, but got the same error.

I tried making that change by adding the line to the ReefAngel_Features.h file, but no luck.

Doing some poking around, the libraries that I've downloaded the ReefAngel_Features.h file had a lot of the #define statements commented out, including the Wifi. I tried uncommenting them all, but nothing changed.
If you have generated a PDE file with RAGen and your ReefAngel_Features.h file still has a lot of #define statements commented out, then you have RAGen and Arduino using the wrong folders. You have arduino using one set of libraries and RAGen referencing another libraries folder. The reason I say that is because RAGen re-writes a new ReefAngel_Features.h file on every generate. The outputted file only contains the define statements that are used. In fact, those define statements are at the very top part of your PDE file.

What you need to do is make sure that both arduino and ragen are using the same location.
Inside arduino, goto the File menu and select Preferences. Look at the folder for the Sketchbook location. Make sure that folder agrees with RAGen.
Inside ragen, goto the Edit menu and select Settings. Compare the Sketchbook location with the one inside arduino. Then look at the libraries folder and make sure that folder is located within the libraries folder of your Sketchbook folder.

Give those a try. I know for a fact that #define wifi must be uncommented to get LoadWebBanner and WebBanner to work inside the PDE files. I encountered the same errors when testing it.

Also, how did you go about installing the latest libraries, ragen and arduino? Did you use the installer provided by Roberto for Arduino and then the installer provided by me for ragen and dev libraries (https://github.com/curtbinder/RAGen/downloads) ?

curt
uclamatthew
Posts: 6
Joined: Fri Mar 18, 2011 6:40 pm

Re: Web Banner Compiling Error

Post by uclamatthew »

Thanks Curt. I re-installed everything in the same location and it works great.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web Banner Compiling Error

Post by rimai »

Hi Curt,
I'm seeing increasing number of people getting this error and being confused on the wifi checkmark on the first tab and web banner stuff.
I think if we make it so it becomes an auto-check on wifi if any wifi related function is selected within RAGen, that would avoid these errors.
What do you think?
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Web Banner Compiling Error

Post by binder »

rimai wrote: I think if we make it so it becomes an auto-check on wifi if any wifi related function is selected within RAGen, that would avoid these errors.
What do you think?
I agree. This would happen if a user selects "Web Banner" under the logging section. That's the only thing that's wifi related on my app currently.

curt
Migs
Posts: 3
Joined: Sun May 29, 2011 2:20 am

Re: Web Banner Compiling Error

Post by Migs »

Hell Roberto and Curt,

I am new to Reef Angel and I have the same problem stated above.

ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));

RA_052911_1118.cpp: In function 'void setup()':
RA_052911_1118:62: error: 'class ReefAngelClass' has no member named 'LoadWebBanner'
RA_052911_1118.cpp: In function 'void loop()':
RA_052911_1118:92: error: 'class ReefAngelClass' has no member named 'WebBanner'
Error repainting line range {0,19}:
java.lang.ArrayIndexOutOfBoundsException: -1793
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:132)
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:89)
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:67)
at processing.app.syntax.SyntaxUtilities.paintSyntaxLine(Unknown Source)
at processing.app.syntax.TextAreaPainter.paintSyntaxLine(Unknown Source)
at processing.app.syntax.TextAreaPainter.paintLine(Unknown Source)
at processing.app.syntax.TextAreaPainter.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


I have followed the instructions above, RAGEN and Arduino use the same libraries in My Documents\Arduino. I have re-installed both programs but I still get the same error. I followed the web banner tutorial but it lead me to the current situation. When I uncheck the web banner option I can compile the code without any problems. I have downloaded curtbinder-ReefAngel-v0.8.5.14-0-ge85e4e5 library and I have had the same result, while wifi and web logging are checked I got an error but while unchecked no problem.

I would appreciate your input.

Migs
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Web Banner Compiling Error

Post by binder »

Migs wrote:I have followed the instructions above, RAGEN and Arduino use the same libraries in My Documents\Arduino. I have re-installed both programs but I still get the same error. I followed the web banner tutorial but it lead me to the current situation. When I uncheck the web banner option I can compile the code without any problems. I have downloaded curtbinder-ReefAngel-v0.8.5.14-0-ge85e4e5 library and I have had the same result, while wifi and web logging are checked I got an error but while unchecked no problem.
Since you say that if Web Banner is unchecked you can get the code to compile that is a good start. When you check Web Banner on the PDE page, you must also check WIFI on the Features page. If you do not check WIFI, then those 2 functions you are getting errors about will not be available. Currently RAGen does not automatically select WIFI when you choose Web Banner, that is something you must manually select.

For those of you who like pictures: :D
When you select this:
PDE page with Web Banner selected
PDE page with Web Banner selected
pde.png (22.2 KiB) Viewed 8398 times
You must also select this:
Features page with Wifi selected
Features page with Wifi selected
features.png (16.26 KiB) Viewed 8398 times
Doing this should fix the problem.

If this does not fix the problem, please attach your PDE file that is generating the errors AND attach your ReefAngel_Features.h file (from your libraries/ReefAngel_Features/ folder).


curt
Migs
Posts: 3
Joined: Sun May 29, 2011 2:20 am

Re: Web Banner Compiling Error

Post by Migs »

Hello Curt,

I had both of them checked when I tried, after a few hours I have finally been able to get around this issue. This is what worked for me:

1. Uninstall Arduino - Reef Angel Controller Software
2. Uninstall RA Gen
3. Reinstall Arduino - Reef Angel Controller Software
4. Run Reef Angel Libraries Update Utility
5. Download Latest Libraries and Convert to Development Libraries
6. Reinstall RA Gen *Without Libraries*
7. Make sure both Programs use the same Libraries
8. Tailor the PDE and Feature according to personal needs
9. Generate code and Compile using Arduino Reef Angel Controller Software

I am not sure what the issue, perhaps libraries were not organized or were conflicting with one another.

Migs
Image
Post Reply