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 / 1742
1741  |  1743
Subject: 
Re: kernel hacking in lnp.c (problem)
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 1 Mar 2001 21:54:30 GMT
Viewed: 
1442 times
  
In lugnet.robotics.rcx.legos, Bernardo Dal Seno writes:
Kenneth Johansen <kennethj@stud.cs.uit.no> writes:


in /kernel/lnp.c
there is a function called lnp_receive_packet.
here im trying to insert a function that will display whatever came in
the data field when lnp_receive_packet was called.
(interested in seeing everything, including headers,etc)
i have made it so that it will only display the data when i press the
view button.

anyways it compiles fine and i get it to download to the RCX, but when i
try to download another "user" program to the rcx
i always get "error deleting program"

so.heh...i guess im missing something pretty obvous here, but i cant
seem to figgure it out.

Posting your code would help a lot :-).  lnp_receive_packet() is called
after the integrity layer has verified the checksum from an interrupt
handler.  So your code should be short e never call functions that wait or
may cause a task switch.  dll uses LNP to download programs, and when it
doesn't get reply from RCX it complaines with the "error deteleting
program".

Probably your code doesn't allow data to pass to higher levels of LNP
(that's what my crystal ball says, sometimes it's right :-).

The best way to do this kind of thing is to save the info you want to display
in a variable or something, set a flag saying somethings there, and let another
task display the data & reset the flag.

You can see a simple implementation of this in remote.c, included in the remote
patch on sourceforge.

ROSCO



Message is in Reply To:
  Re: kernel hacking in lnp.c (problem)
 
(...) Posting your code would help a lot :-). lnp_receive_packet() is called after the integrity layer has verified the checksum from an interrupt handler. So your code should be short e never call functions that wait or may cause a task switch. dll (...) (24 years ago, 1-Mar-01, to lugnet.robotics.rcx.legos)

3 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