Errors when compiling with dev branch

Related to the development libraries, released by Curt Binder
Post Reply
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Errors when compiling with dev branch

Post by sbidny »

I have tried pulling down the dev branch, and I am seeing the following compiler errors, which prevent me from even attempting an upload:

In file included from sketch_nov23a.cpp:31:
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:305: error: a brace-enclosed initializer is not allowed here before '{' token
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:368: error: ISO C++ forbids initialization of member 'ParamArrayByte'
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:368: error: making 'ParamArrayByte' static
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:368: error: invalid in-class initialization of static data member of non-integral type 'unsigned char* [94]'
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:370: error: a brace-enclosed initializer is not allowed here before '{' token
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:401: error: ISO C++ forbids initialization of member 'ParamArrayInt'
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:401: error: making 'ParamArrayInt' static
/Users/sbidny/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:401: error: invalid in-class initialization of static data member of non-integral type 'int* [19]'
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Reef Angel Web Wizard

Post by rimai »

Sorry, is this for the web wizard or you are trying to use the Arduino IDE?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Reef Angel Web Wizard

Post by sbidny »

The IDE. Trying to use cloud WiFi and upload using the Bluetooth adapter via the IDE.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

You may need to use the new Arduino IDE.
I can't remember if the old one compiles dev branch.
http://forum.reefangel.com/viewtopic.php?f=7&t=6790
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

It seems you may have broken this out from the original thread. Not sure it’s going to make as much sense without the original context.

Some of us are trying to use cloud WiFi but still want to upload using the Bluetooth adapter. The web wizard doesn’t support the Bluetooth adapter. And the IDE doesn’t support cloud WiFi, due to older libraries.

Therefore, someone suggested we pull down the dev branch (which is what the web wizard is using for whatever reason) into the IDE and then use the Bluetooth adapter. That’s when I saw the compiler errors.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

I’ll give that a shot...
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

And now, after using IDE 1.8.6, I'm getting...

/var/folders/3m/3bb43tld2fj36jzpj5p4ry780000gs/T//cc1YIvJ2.ltrans2.ltrans.o: In function `main':
cc1YIvJ2.ltrans2.o:(.text.startup+0xef4): undefined reference to `ReefAngelClass::CloudPortal()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Reef Angel Plus Controller.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

Are you sure you are using the dev branch and it is placed in the correct place?
https://github.com/reefangel/Libraries/archive/dev.zip
This path is very strange: /var/folders/3m/3bb43tld2fj36jzpj5p4ry780000gs/T//cc1YIvJ2.ltrans2.ltrans.o:
Looks like a linux machine.
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

OS X. I believe I am using the latest dev branch and have placed it in the correct location. Will try again.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

No luck. If I remove the line ReefAngel.CloudPortal(); from the function void loop() it compiles.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

Can you send me a screen shot of File->Preferences window of your Arduino IDE?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

is the sketchbook location where you placed the dev branch?
Can you send me a screenshot of your folder structure?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Yes, it’s the location where I put the dev libraries. Here’s the structure:

/Users/sbidny/Documents/Arduino 1.8.6/libraries/

I will grab a screenshot when I get a chance as well.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

It's definitely picking up the dev libraries, FWIW, since the call to ReefAngel.StandardHeater1() is working. The older libraries did not support this call. I believe they required ReefAngel.StandardHeater().
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Screenshot of folder structure:

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

Light bulb turned on.
I think you are also missing the updated features file.
https://github.com/reefangel/FeaturesAndUpdateFiles
Update the files on your folder /Users/sbidny/Documents/Arduino 1.8.6/libraries/update
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

That seemed to do it. I am now able to compile. Will try to upload using the Bluetooth adapter when I get home tonight. Thanks!
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

I was able to upload using the Bluetooth adapter. However, I am now seeing tons of trailing random characters on the display. Seems as if it’s using uninitialized character buffers for strings.

Could it be that the prior version automatically initialized allocated buffers and that the new version requires an explicit initialization?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

Is it the plus or star board?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Plus
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

Can you post your code?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Just playing around right now, so there's not much to it. Basically, all it's doing is setting the 0-10v ports to 100%.

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 <PAR.h>
#include <ReefAngel.h>

void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.AddStandardMenu();  // Add Standard Menu
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen
}

void loop()
{
    ReefAngel.PWM.SetDaylight(100);
    ReefAngel.PWM.SetActinic(100);

    ReefAngel.Portal("sbidny");
    ReefAngel.CloudPortal();
    ReefAngel.DDNS("reef"); // Your DDNS is sbidny-reef.myreefangel.com
    // This should always be the last line
    ReefAngel.ShowInterface();
}

sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

FYI, when I upload the same (minus the ReefAngel.CloudPortal() call) via Arduino 1.0.1, I don't see the same issue with trailing characters.

I'll try uploading using 1.8.6 without the CloudPortal() call.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

Same issue.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Errors when compiling with dev branch

Post by rimai »

I wonder if this is a MacOSX issue only.
I'm not able to replicate.
lnevo, can you report if you have this issue?
Roberto.
sbidny
Posts: 123
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614

Re: Errors when compiling with dev branch

Post by sbidny »

I’ll try to get it going from Windows and see if the problem persists.
Post Reply