To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1506
1505  |  1507
Subject: 
Re: Difficulty Activating Sensors in v0.2.4
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 6 Nov 2000 20:21:54 GMT
Viewed: 
1273 times
  
On Mon, 6 Nov 2000, Gary Mayer wrote:
I'm using LegOS 0.2.4 on Windows 2000 (Cygwin solution).

Which Cygwin solution? i.e., what version of gcc? (to check, run gcc
--version)

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

Any thoughts and/or suggestions?

All that code looks perfectly fine to me. In fact, it looks like it
matches line by line that I compiled yesterday with no problem. Could you
post the entire file somewhere or mail it to me so I can look at it and
test it out on my system? Thanks...
Luis

-----------------------------------------------------------------------

    "It's clear to us that Microsoft isn't the competition anymore.
                       They are our environment."
        WordPerfect manager, talking about Word

-----------------------------------------------------------------------



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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR