|
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
|
|
|
|