Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
gary.thom@afulki.com  
#1 Posted : Friday, April 10, 2015 3:31:30 AM(UTC)
Afulki

Rank: Member

Groups: Registered
Joined: 4/8/2015(UTC)
Posts: 10

Thanks: 2 times
I moved this from the other forum as I think it's a bug.

I created a very simple agent:

Agent

When I tried to update the communications code, i got the following error:

Error

Here is the log:
Quote:

Using library Wire in folder: c:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire

c:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10603 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -Ic:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -Ic:\Program Files\Arduino\hardware\arduino\avr\variants\standard -Ic:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire C:\Users\ADMINI~1\AppData\Local\Temp\build6320548971441157446.tmp\ArduinoCompile.cpp -o C:\Users\ADMINI~1\AppData\Local\Temp\build6320548971441157446.tmp\ArduinoCompile.cpp.o
ArduinoCompile.ino: In function 'void SendInputs5()':
ArduinoCompile.ino:181:36: error: 'string0' was not declared in this scope
Error compiling.

And the code lines from the INO file:

Code:

void SendInputs5()
{
  Serial.print("UPD:5");
  Serial.print(":");  Serial.print(f[1]);
  Serial.print(":");  Serial.print(string0);
  Serial.print("\n");
}
gary.thom@afulki.com  
#2 Posted : Friday, April 10, 2015 3:51:26 AM(UTC)
Afulki

Rank: Member

Groups: Registered
Joined: 4/8/2015(UTC)
Posts: 10

Thanks: 2 times
Update

If I assign the output in the setup code the error goes away:

assign

However is I declare a byte array in the declaration block, the error returns:

Error

Changing byte to unsigned fixes the error:

Error
EmbrioAdmin  
#3 Posted : Friday, April 10, 2015 5:38:25 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Thanks for the details, sounds easy to track down.
Afulki  
#4 Posted : Tuesday, April 14, 2015 3:44:16 AM(UTC)
Afulki

Rank: Member

Groups: Registered
Joined: 4/8/2015(UTC)
Posts: 10

Thanks: 2 times
BTW I just found that passing a size to the array appears to work:

UserPostedImage
EmbrioAdmin  
#5 Posted : Wednesday, April 15, 2015 12:49:07 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Thanks again for the detailed info, this one is fixed, will be in the next release.
thanks 1 user thanked EmbrioAdmin for this useful post.
Afulki on 4/16/2015(UTC)
Afulki  
#6 Posted : Thursday, April 16, 2015 3:45:21 AM(UTC)
Afulki

Rank: Member

Groups: Registered
Joined: 4/8/2015(UTC)
Posts: 10

Thanks: 2 times
excellent, thank you.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error