Subject:
|
Re: Difficulty Activating Sensors in v0.2.4
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 6 Nov 2000 21:08:10 GMT
|
Viewed:
|
1256 times
|
| |
| |
Gary Mayer wrote:
> I'm using LegOS 0.2.4 on Windows 2000 (Cygwin solution).
>
> I receive errors when I try to compile any code that activates a sensor.
> I've looked at both old references and new as well as the old Dave Baum
> book. At first, I thought it may just be the rotation sensor but I tried it
> with the light sensor and get the same results. Therefore, I now expect the
> user. :-)
> In Dave Baum's first book he mentioned declaring passive senor too. I tried
> to be explicit with the touch sensor and got more errors. If I don't
> declare it and just use it, I'm OK.
>
> I include dsensor.h and use commands ( XXX: is the line number )
> 120: ds_active(&SENSOR_3);
> 121: ds_rotation_on(&SENSOR_3);
> 122: ds_rotation_set(&SENSOR_3, 0);
>
> The errors I receive for all three line numbers above are:
> parse error before `&'
> warning: type defaults to `int' in declaration of [`ds_active',
> ds_rotation_on', 'ds_rotation_set']
> conflicting types for [`ds_active', etc.]
> previous declaration of [`ds_active', etc.] (It also includes the line
> number in the header file -- 129, 163, 157 -- where it conflicts)
> warning: data definition has no type or storage class
Warnings tell, that lines 120,etc are the declaration part of the program and you just
redeclare ds_active and similiar functions. My advice is to look for a missing or redundant
brace before these lines.
--
Marek mbrudka@elka.pw.edu.pl
|
|
Message is in Reply To:
| | Difficulty Activating Sensors in v0.2.4
|
| I'm using LegOS 0.2.4 on Windows 2000 (Cygwin solution). I receive errors when I try to compile any code that activates a sensor. I've looked at both old references and new as well as the old Dave Baum book. At first, I thought it may just be the (...) (24 years ago, 6-Nov-00, to lugnet.robotics.rcx.legos)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|