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 / 323
322  |  324
Subject: 
Re: is IR considered broken?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 16 Jul 1999 05:27:25 GMT
Viewed: 
1284 times
  
Mark Falco  <falcom@dialogic.com> wrote:
4. If others have working code that uses IR, can you post it?

I have working IR code, but it does not work with LegOS.  It works with
that "custom, as-yet-unreleased version of Librcx" I mention every so
often.  It probably wouldn't take much to port it to LegOS.  Changes would
be:

- modify hook to get a function called once every ms
- modify hooks that establish txi, tei, rxi, eri handlers
- add a cleanup function

The code supports datagrams; framing, complements, and error detection are
included.  I have another version which does not use complements which I
believe I used to test the supposition that the complements are not really
needed, back when that discussion was going on.  The interface looks like
this:

   /* Encodes and sends buf over the IR link */
   /* Returns 0 on error or if IR port is busy */
   extern int serial_send (void *buf, unsigned int len);

   /* Receives a message into buf, if one is ready */
   /* Returns 0 on error or if no message ready */
   extern int serial_recv (void *buf, unsigned int len);

As far as I know, it transmits as reliably as it receives, but I could be
wrong about that.  There is currently no support for asynchronous
notification of send complete or receive ready, but it would not be hard to
add callbacks to support this.

I can post the code if anybody is interested.


On a side note, I thought somebody got LegOS's IR code to work with a small
modification to remove the busy wait during transmit.  Search the past
messages at lugnet to see if that is really the case.


-Kekoa



Message has 1 Reply:
  Re: is IR considered broken?
 
Yes I would be interested in seeing the libRcx implementation of the IR functions. thanks, Mark (...) (25 years ago, 16-Jul-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  is IR considered broken?
 
The precompiled tm-and-ir, kinda works for me. It is pretty good at receiving data, but the transmitted message often has garbage. When I compile it myself using the latest legOS snapshot, it always transmits garbage, others seem to have seen the (...) (25 years ago, 12-Jul-99, to lugnet.robotics.rcx.legos)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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