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 / 226
225  |  227
Subject: 
Re: Blocking IR
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 10 Jun 1999 18:12:13 GMT
Viewed: 
1219 times
  
Kekoa Proudfoot <kekoa@pixel.Stanford.EDU> wrote:

Do you mean dir_write?  This is a problem with LegOS only.  If you want
non-blocking writes, comment out (in version 0.1.7 at least):

    while(dir_tx_state==TX_ACTIVE)
        ;                               // FIXME: scheduler integration
    if(dir_tx_state==TX_OK)
        return len;                     // successful xmit
    return -1;                          // default is error

And replace with:

    return len;

I forgot to mention.  At the top of dir_write, you probably want to add:

    if (dir_tx_state == TX_ACTIVE)
        return -1;

Or something to that effect, so you don't transmit a second message while
a first is still transmitting, and so you have a way of querying the
whether or not the last transmission is still in flight (by sending a NULL
message).

Mind you, I haven't implemented any of this specifically, I am just drawing
parallels between what LegOS implements and what I have implemented in an
as-yet-unreleased future version of Librcx.

-Kekoa



Message has 2 Replies:
  Re: Blocking IR
 
Great, I'll try this out tonight. Many Thanks, Phil. (...) (25 years ago, 14-Jun-99, to lugnet.robotics.rcx.legos)
  Re: Blocking IR
 
Here is some code for IR detection, with the help from Kekoa. However it doesn't work. I know the hardware is all working because if I run minicom and then run this programme and point the RCX at the lego tower junk appears on the screen. If I take (...) (25 years ago, 15-Jun-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Blocking IR
 
(...) Do you mean dir_write? This is a problem with LegOS only. If you want non-blocking writes, comment out (in version 0.1.7 at least): while(dir_tx_state==TX_ACTIVE) ; // FIXME: scheduler integration if(dir_tx_state==TX_OK) return len; // (...) (25 years ago, 10-Jun-99, to lugnet.robotics.rcx.legos)

12 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