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 / 229
228  |  230
Subject: 
Re: Blocking IR
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 14 Jun 1999 08:38:40 GMT
Viewed: 
1188 times
  
Great, I'll try this out tonight.


Many Thanks,

Phil.


In lugnet.robotics.rcx.legos, Kekoa Proudfoot writes:
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 is in Reply To:
  Re: Blocking IR
 
(...) 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 (...) (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
    

Custom Search

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