ROBOTC.net forums
http://www.robotc.net/forums/

3rd Party Driver Compile Errors
http://www.robotc.net/forums/viewtopic.php?f=52&t=3814
Page 1 of 1

Author:  kfilar [ Fri Dec 02, 2011 1:29 am ]
Post subject:  3rd Party Driver Compile Errors

We're trying to use the HiTechnic Angle Sensor and we can't get our program to compile. More fundamentally, we can't even get the Angle Sensor Test program to compile, so we presume there's something really basic we don't have configured correctly. We used many sensors successfully last year in FTC (version 2.x).

We are using RobotC v. 3.04
HTANG-driver.h v. 0.2
common.h v. 0.16

the common.h file is in the same directory as the driver file, and the directory is in the list of directory locations (user includes) in the detailed preferences.

We get these errors repeated about a couple dozen times when we try to compile HTANG-test1.c :

*Warning*:Invalid '=' operation for types 'tByteArray' and 'short'
**Error**:Array specifier invalid for variable 'HTANG_I2CRequest'

And these errors a few times:

*Warning*:Invalid '=' operation for types 'long' and 'tByteArray'
**Error**:Array specifier invalid for variable 'HTANG_I2CReply'

The errors start on these lines of the driver file:

HTANG_I2CRequest[0] = 2; // Message size
HTANG_I2CRequest[1] = HTANG_I2C_ADDR; // I2C Address
HTANG_I2CRequest[2] = HTANG_OFFSET + HTANG_ANG2; // Start Current angle

Any help would be greatly appreciated...

Thanks,

Author:  mightor [ Fri Dec 02, 2011 4:31 am ]
Post subject:  Re: 3rd Party Driver Compile Errors

I am not sure where these errors are coming from but it seems to work just fine here. I will investigate and get back to you.

- Xander

Author:  kfilar [ Fri Dec 02, 2011 5:37 pm ]
Post subject:  Re: 3rd Party Driver Compile Errors

Hold on, don't investigate right now. I may have solved it. It looks like we actually kept the older drivers from last year and mixed them in with the newer drivers from this year. common.h was actually version 0.14, and your tByteArray is defined a little differently in 0.16. It seemed to compile fine. Going to test it now.

Author:  mightor [ Fri Dec 02, 2011 5:41 pm ]
Post subject:  Re: 3rd Party Driver Compile Errors

Glad to hear it :) Always use the latest version of my driver suite. Incidentally, I am very close to releasing a new version with some additional sensors :)

- Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/