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 / *2259 (-100)
  Re: Incorrect result
 
(...) Yes, this is what happens when one is used to just making everything long and not considering overflows. Even worse was that I was doing the math on the computer's calculator, but not looking at the intermediate result, just typing in the (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Incorrect result
 
(...) 256 * 128 = 32768, one higher as the biggest positive integer value. The cast to long would help, but your cast is too late. I have not tested, but I think rc += ( (long)b->magnitude * (long)TA_costable[...] ) >> 7; will help. Try output in (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  RE: Incorrect result
 
<snipped code> (...) Robert, this is a classic problem with ranges of singed numbers in C rx = (long)(a->magnitude * TA_costable[a->direction]) >> 7; I don't have an RCX in frot of me, but I think you need to cast a->magnitude to long before the (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Incorrect result
 
This problem, unlike the other, is definitely not a result of my eyes/brain being tired or something. I thoroughly displayed every value before and after evaluation and the result is ***WRONG***. Here is the code and the values: typedef struct { int (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  RE: true tcp/ip on the RCX
 
Hi :) Just out of curiosity, check this thread from Jan/2000: (URL) mc. (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: true tcp/ip on the RCX
 
(...) <snip> (...) <snip> Yeah, I've got a server farm of 3 million RCXs. Each hosts errrrr... 1 page. ;-) Great job Olaf! Steve Martin IndyLUG (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: true tcp/ip on the RCX
 
"Olaf" <christ_o@gmx.de> schrieb im Newsbeitrag news:Gqo0BH.E9t@lugnet.com... (...) calls (...) <---snip----> Hi Olaf, i think it´s the wrong way to blow up the legOS kernel with a ip-stack, because you lost valuable RCX memory to legOS (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: true tcp/ip on the RCX
 
<Mr Burn's> Excellent!!! I've seen some neat ideas but, this one takes the cake hands down.... Especially that it also appeared on www.slashdot.org makes it even more impressive.. Bravo to you.. Can't wait to see the webpage.. Wayne (...) (23 years ago, 30-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: true tcp/ip on the RCX
 
I will be axiously awaiting the web page too! This has many fun/useless possibilities! Email it to me or post it on this thread if you can. thanks nate www.nullgel.com (23 years ago, 29-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: true tcp/ip on the RCX
 
plz email me the url when u get it running thx -p (...) (23 years ago, 29-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Strange behavior
 
In lugnet.robotics.rcx.legos, Robert Templeton writes: Nothing like talking to yourself :), but I did finally find the problem and it is in the code. It isn't always what's there, but what's not. Here's the offending section: (...) Instead of (...) (23 years ago, 29-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: LNP Routing daemon with tcp/ip for RCX/legOS, Cybermaster/NQC
 
Hello NG, if you are interessted : there is a newer version of lnpoi available. there was a bug in the cybermaster-driver. refer to (URL) (23 years ago, 29-Jan-02, to lugnet.robotics.rcx.legos)
 
  true tcp/ip on the RCX
 
I ve got the very first and only tcp/ip enabled RCX in my room, cool, eh ? I will make a webpage at the end of the week to make the very first (rudimentary, but working) version available to the public. Right now, the tcp/ip stack is compiled into (...) (23 years ago, 28-Jan-02, to lugnet.robotics.rcx.legos) ! 
 
  Strange behavior
 
This code was working last night, but I removed some superfluous functions copied with the set (such as moveBackward() and pivotRight()) since they were not being used. All of a sudden, the robot turns okay, but never moves forward. It just sits (...) (23 years ago, 28-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: newbie
 
Hi Paula, While NQC is a nice place to start, you might want to consider LEJOS which, like legOS has its own firmware but it uses Java instead of C. It can do much more than NQC, and is quite bug free. Find out more at (URL) luck. (...) (23 years ago, 25-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: libm, windows
 
(...) No chance to get this running under legOS. You can do some float math like addition or multiplication but no trigonometric functions. Look in legOS/lib/float to see what can be done with the legOS floating point library. Mike (23 years ago, 24-Jan-02, to lugnet.robotics.rcx.legos)
 
  libm, windows
 
has anyone had success with using libm in windows? I have legOS programs written from a solaris machine that compile fine and work when downloaded to the RCX, but I have not been able to compile them on a windows machine due to linking problems. The (...) (23 years ago, 24-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) In the post you replied to saying "static doesn't matter", the proposal was: private: static int runWrapper(...) ; I then replied to your post, etc. Anyway, let's not degenerate into he-said-she-said. We're really just talking past each other (...) (23 years ago, 22-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) In fact, neither of these suggestions will work with the code as it stands, because the runWrapper() function tries to call the Run() function, which is a non-static member function. You could pass a pointer to the class instance (this) in the (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) Unless you define a function as a member function, there is no this parameter at all. In the example given, it was not a member function at all (nor should it be). I believe you are thinking of a static member function vs. a non-static member (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  RE: newbie
 
If you decide to use LegOS you won't be needing nor will you have the chance to use NQC because a RCX with LegOS loaded won't understand nor respond to any standard firmware commands. Check (if you didn't already) the side links at: (URL) From: (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  RE: newbie
 
so if i decide to use LegOS I don't need NQC, right? as I understood, de LegOS itself it's complete to be used alone.... (...) programs on RCX. (...) LEGO (...) could call (...) LEGO (...) standard LEGO (...) for (...) run some (...) don't (...) -- (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  RE: newbie
 
LegOS is an operation system ( a firmware replacement in itself) It's like a mini UNIX system, that will run true C compiled programs on RCX. NQC on the other hand, all it does is translate a NQC program into LEGO pCode that will be *interpreted* by (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  newbie
 
Hi everybody, I'm starting to use Lego products and I'm having problems to undrestand a few things. For example, I want to use NQC and I don't understand why the LegOS needs a C cross-compiler... or by having LegOS I don't need NQC? -- Paula Berger (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) Static DOES matter; it declares the method as being a "class" method, rather than a normal instance method. I believe there is no implicit 'this' parameter and therefore it can be treated like a normal function. Of course, it can't be linked (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) No, static doesn't matter but it is possible the calling conventions of C and C++ might be different (I don't know of a platform where that is the case for a an extern function), so you might need to specify C linkage, as in: extern "C" int (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) Haven't done any C++ for a while, but IIRC you just need to declare runWrapper as static, ie: private: static int runWrapper(...) ; HTH ROSCO (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
(...) Advantage: Less memory used (each thread needs a block of memory in the kernel, I'm at work & can't remember the struct name off hand). In the case under discussion, this doesn't make much difference, but in a large project, memory use can (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Still having problems with helloworld.c
 
John, Where is the source for makelx ?? I am having this same problem. Thanks JohnG (...) (23 years ago, 20-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: LNP Routing daemon with tcp/ip for RCX/legOS, Cybermaster/NQC
 
Sources for the LNPoI Router are available now. You find it at (URL) . Bye (23 years ago, 20-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: More on threads
 
(...) I recall that legOS's priority model is pretty rigid. If a thread with a higher priority never yields, threads with lower priority will never get any time. When I write legOS programs, I generally just have everything run at PRIO_NORMAL. That (...) (23 years ago, 19-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: More on threads
 
(...) Digging through tm.c gave me the impression, that main will indeed get no time slice. So I wrote another test program: ---...--- #include <conio.h> #include <unistd.h> pid_t worker; int work_task(int argc, char *argv[]); int main() { int i; i (...) (23 years ago, 19-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: More on threads
 
(...) ability to terminate but to run in an endless loop. But This is not true of an embedded system though which will have to run 'forever'. (...) priority of NORMAL+4. So, the (...) any time slice at all. NO time slice or just a very small chunk (...) (23 years ago, 19-Jan-02, to lugnet.robotics.rcx.legos)
 
  More on threads
 
(...) Of course you are right. I think it is a bad programming style not to give your program the ability to terminate but to run in an endless loop. But what is the penalty for this bad style? I've done some investigations and here are the results: (...) (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: thread class for legOS
 
(...) IRC, every method in C++ has an implicit parameter wich is the object itself; that's why you can't cast it. Try the following (does someone have a nicer solution?): Put runWrapper() outside the class: int runWrapper(int, char **th) { (...) (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  thread class for legOS
 
I write a Thread class for LegOs with a simple interface like in Java or CommonC++. I'm using LegOs 0.2.4. Below are my work till yet. The problem is in the Method Start(). The line is marked with !!. The error message is at the end of the file. I (...) (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: LNP Routing daemon with tcp/ip for RCX/legOS, Cybermaster/NQC
 
"Freddy" <mail-nowak@web.de> schrieb im Newsbeitrag news:GpzyB6.Kpt@lugnet.com... (...) A C++ class to build client application without knowing the LNPoI protocol is available for Windows and Linux now. (URL) (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
(...) I would strongly suggest changing this to while(1) msleep(bignumber);. Otherwise you're hogging the processor doing nothing important, which could do bad things to any compute-intensive tasks you may have going. It'll also use slightly less (...) (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
Hi Ross (...) you (...) What are the advantages and disadvantages of this method as opposed to the one I used? mike (23 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
(...) Note also since bumper_task() is an infinite loop, and you never use pid1, you could save one thread by doing this: int main(int argc, char *argv[]) { pid2 = execi (&left_task, 0, NULL, PRIO_NORMAL+2, DEFAULT_STACK_SIZE); pid3 = execi (...) (23 years ago, 17-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
;-) That worked a treat, thanks Michael. (thanks for the other little corrections in the code too). mike (...) Mike, (...) your subroutines and then you leave main()! Leaving main means (...) memory is freed. The following will do the job: (...) (...) (23 years ago, 17-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
Hi Mike, your problem is not because of an error in legOS. But what you do is that you start your subroutines and then you leave main()! Leaving main means that all your allocated memory is freed. The following will do the job: ---...--- cut here (...) (23 years ago, 17-Jan-02, to lugnet.robotics.rcx.legos)
 
  IRC
 
Anyone who is a regular user of IRC can join my channel #LegoMindstorms (on dalnet). Coma and chat or give/recieve assistance. If you join you are welcome to Ops because anyone in here will know more about Mindstorms than me as i know almost (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)  
 
  Re: threads
 
Albert (...) yea, I see what you are getting at. I am sure that I was hitting the bumper while the threads were still alive, but I will check again. I think this also points out some of the dangers of just dumping in some poorly thought out dummy (...) (23 years ago, 17-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
(...) As pointed by Albert Huang, you cannot call kill() with an "invalid" pid. Actually, the comment above kill() in tm.c says: //! kill a process /*! \param pid must be valid process ID, or undefined behaviour will result! The function updates (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads
 
two of your threads terminate shortly after being started (...) as far as I know, legOS provides no functionality for determining whether or not a thread is alive or not. You need to keep track of this yourself (e.g. using a variable/flag that gets (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads - bug in the firmware?
 
Hi again I have now totally stripped down my code to a minimum and I am still having problems with the code hanging up. I can see nowhere where there can be a fault. I am a long way from being an expert, but is it possible there is a bug in the (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Cygwin problems
 
Ben I recommend you read the Howto from the sourceforge docs section, or even better buy the Extreme Mindstorms book (Extreme Mindstorms; D. Baum, M. Gasperi, R. Hempel, L. Villa; Apress; ISBN: 1893115844 ) . Both give a good explanation of legOS. (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Cygwin problems
 
Hi all, i am having problems with cygwin. It doesnt help that i dont know what all these linux commands mean but i will explain my problems now. I have intstalled all the software to my system ok and the linux emulator seems to work fine(i can use (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads
 
Thanks Albert (...) still (...) How do I check this? There are no other tasks that can kill threads apart from this one. I also checked process IDs after creation and before killing. Best regards, mike (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads
 
some suggestions: 1) random_delay = random()/1000000; LegOS uses 16 bit integers, meaning the largest value an integer can have is something like 65535. The above statement is meaningless 2) (...) If you kill a thread, make sure it's still a valid (...) (23 years ago, 15-Jan-02, to lugnet.robotics.rcx.legos)
 
  LNP Routing daemon with tcp/ip for RCX/legOS, Cybermaster/NQC
 
Dear NG, i try to develop a LNP routing daemon (LNPoI - Lego Network Protocol over Internet)and i think this peace of software can be also usefull to other people using legOS, RCX and Cybermasters (!). For now it´s only available as a binarie file (...) (23 years ago, 15-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: threads
 
Hi again, I'm now totally stuck with this problem. I've spent all day at it, stepping through the code line by line with key presses. I've marked the point that the code appears to hang in left_control_task (). Someone please help, please. Thanks (...) (23 years ago, 15-Jan-02, to lugnet.robotics.rcx.legos)
 
  threads
 
Hi, I'm struggling to get threads working (in a simple motor speed matching program), the code just keeps hanging up. I've isolated the problem to when I restart the threads after killing them if a bumper is hit in the bumper_task() function. The (...) (23 years ago, 14-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Measuring robot turn angle
 
Wanted to thank everybody for replies. I ended up attaching an 80-tooth gear to the rear axle (wheels are on the front set) after extending the axle. The rotation sensor is mounted on the chassis outside with an 8-tooth gear meshing to the other (...) (23 years ago, 13-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Dave Chen's Function List
 
(...) Message 1001, in case anyone was wondering. Better yet: (URL) been looking for something like this as well, so thanks for pointing me in that direction. Is there a more recent version? -- David Schilling (23 years ago, 13-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Configuring LegOS with USB tower under Win2K.
 
Hi Aaron, Thanks for your quick reply. Thank you for the USB fix. I have also done as you suggested and altered the path under #NT - I forgot the drive letter should have been specified //x where x is the drive, C:, D: etc. I have now eliminated (...) (23 years ago, 10-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Configuring LegOS with USB tower under Win2K.
 
Thanks for your interest Dave. The source for the USB tower Win2k patch is located at anonymous ftp://134.29.51.4 I can also give you one hint to get you going on configuring legos for cygwin. The most problems I have had are with the (...) (23 years ago, 10-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Measuring robot turn angle
 
(...) Another option would be to connect a single rotation sensor directly to the motor that turns your robot. (you may wish to gear it down) You could not detect the distance forward or backward (from the other motor), but you could calculate the (...) (23 years ago, 10-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Measuring robot turn angle
 
(...) I have done this, although not with a differential. My solution used a rotation sensor on each axel, and good navigation can be done with that. Since you can guarantee that both axels turn the same amount, a single rotation sensor should be (...) (23 years ago, 10-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Measuring robot turn angle
 
(...) Robert, I have been playing with this problem a bit. Another approach is to power each tread with a separate motor, use a differential assembly to add the shaft rotation from both sides and use a rotation sensor to 'control' to a zero (...) (23 years ago, 10-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: USB, Windows, legOS
 
Hi Don and Aaron, Any chance of sending me the patches for the USB Tower to work under Cygwin. I may be able to help get the patches working. I have some experience with Win95/98/2K. Dave W. (...) (23 years ago, 9-Jan-02, to lugnet.robotics.rcx.legos)
 
  Measuring robot turn angle
 
The drive system in my robot is an adder-subtractor (see (URL) which uses two differentials in order to get equalized forward/reverse drive while allowing turning and pivoting (turning in place). For navigational purposes, the robot should be able (...) (23 years ago, 9-Jan-02, to lugnet.robotics.rcx.legos)
 
  Configuring LegOS with USB tower under Win2K.
 
Hi Everyone, Does anyone have any info. on setting up and using the new USB tower with Cygwin and the H8 cross-compiler for LegOS under Win2K. These are the instructions I am currently following :- (URL) would also be very grateful for any more (...) (23 years ago, 9-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Linux driver for USB Tower
 
Have a look at: (URL) I'm not involved! (...) (23 years ago, 9-Jan-02, to lugnet.robotics.rcx.legos)
 
  Linux driver for USB Tower
 
Hi all, is anybody developing a Linux driver for the USB Tower shipped with Mindstorms 2.0. Stewart (23 years ago, 8-Jan-02, to lugnet.robotics.rcx.legos)
 
  Driving R/C servos and interrupt latencies
 
Hi, I finally succeeded in driving up to 7 R/C servos from the RCX using a shift register and a re-triggerable monostable (for synchronization) all driven from the FTOA output line (senor B, AC coupled into a transistor) . This involved switching (...) (23 years ago, 6-Jan-02, to lugnet.robotics.rcx.legos)
 
  Dave Chen's Function List
 
Dave Chen's Function List (Published on lugnet.robotics.rcx.legos on April 16 2000) Very useful!! Thks. Regards -- CarlosLuis Rendón M. Network Manager (23 years ago, 4-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: VC++6 and LegOS
 
Definitely it works. Thanks steve. Regards. -- CarlosLuis Rendón M. Network Manager "Steve Hassenplug" <steveh@mailcode.com> escribió en el mensaje news:GpBrn5.6nL@lugnet.com... (...) arguments' (...) (23 years ago, 2-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: VC++6 and LegOS
 
I have my Visual Studio set up so I can make programs, download programs, and download firmware all from the 'tools' menu in VS (VC++). So far, the only thing I'm not set up for is editing the 'makefile' file. Under 'Tools>Customize...' select the (...) (23 years ago, 2-Jan-02, to lugnet.robotics.rcx.legos)
 
  remote control using PIC16F877
 
Hello everyone. I've just developed a remote control for the RCX using the PIC16F877. It's very useful due to the fact that it does not need a computer, but still needs the ir tower (the serial one, sorry I'll try to adapt the project tu use the new (...) (23 years ago, 2-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: Unable to compile helloworld.c
 
I've got 2 be honest: I'm new in LegOS, but I've had a similar problem. I decided to create a new project (inside de /demo dir) and I couldn't compile at the beginning, but I edited the file .depend and I copied the last section (the one for rover) (...) (23 years ago, 2-Jan-02, to lugnet.robotics.rcx.legos)
 
  VC++6 and LegOS
 
Hi, I'd like 2 know if there's a way to integrate VC++ 6 and LegOS, not 4 debugging, but for use VC as editor (very good as editor) and then just compile inside the IDE??? -- CarlosLuis Rendón M. Network Manager (23 years ago, 2-Jan-02, to lugnet.robotics.rcx.legos)
 
  Re: LNPD: communication between clients
 
(...) Great, thank you very much. Btw, didn't you diff in reverse order (I grabbed version 1.2.4.2)? The lines to add begin with "-"... Eric (23 years ago, 31-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: LNPD: communication between clients
 
In adding LNP support to EmuLegOS I needed this feature in the lnpd. If you grab EmuLegos there is a patch for lnpd that will add the feature you are looking for. The patch has nothing to do with EmuLegOS so you can apply it without setting up the (...) (23 years ago, 30-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: host address
 
(...) Do you have a patch? (...) I'm writing a compiler (automaton model of the robot to C). With dynamic addresses, it could manage an "addresses pool", and simply add a call to change the address when the program starts... On the other hand, if (...) (23 years ago, 30-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: host address
 
Eric, see the thread started by Zhengrong Zhang on 11/5/01 about this. short: we can't find any compelling reason to hardcode the address. I'm not sure about Zhengrong, but I've modified my copy of LegOS to support "dynamic" addresses (i.e. can (...) (23 years ago, 30-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
Hi Steve, (...) Yes. Actually, I am working on a robot that finds a path trough a maze. After solving the maze, a second program can run through the maze with the informations from the first program. (I will do this with shared mem). Both programs (...) (23 years ago, 28-Dec-01, to lugnet.robotics.rcx.legos)
 
  LNPD: communication between clients
 
It seems that when a client of lnpd sends data to the IR tower, these are not sent to the other clients connected to the daemon. Unfortunately, I really need this feature... So I tried to call "deliver_packet(tx_buffer, tx_end-tx_buffer);" in (...) (23 years ago, 28-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
(...) Yes, I'm sure I can. And I think it would be 'safer' that way. But Mike's idea about functions sounds interesting. I don't really have any idea about how I would use that in a real program, but it sure sounds interesting. Steve (23 years ago, 27-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
I think this is what you want, but I am still learning. :) int inc (int&); int dec (int&); int (*pFunc) (int); //pointer to a function that accepts/returns an int if (add) { pFunc = inc; } else { pFunc = dec; } int a = pFunc(10); So, if add is true, (...) (23 years ago, 27-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
(...) ooohh. I like that idea. So I can write one program with all my functions and my other programs can just include a couple function calls. Again, in my VB world, I don't mess with pointers. When you have a minute, can you type up a sample (...) (23 years ago, 27-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
(...) Yes. That is the only thing you have to do. You can store whatever you want. (...) Exactly. If you know you what you do, nothing bad can happen. BTW., this scheme can be extended to something like a shared library. If you store pointers to (...) (23 years ago, 27-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: How to make shared memory....not
 
(...) Thanks, Michael. This appears to be exactly what I'm looking for. I assume if I want to store more values, I can just change the 'shared' struct, right? (add l, m, n...) When you say 'multitasking problems', you're talking about storing & (...) (23 years ago, 27-Dec-01, to lugnet.robotics.rcx.legos)
 
  How to make shared memory....not
 
(...) You ask for it, you get it. BUT: It works, sort of. It will not survive any multitasking problems. Shared memory has to be handled by the OS, not by a user program. I split your problem to 3 programs. Program 1 allocates the memory and prints (...) (23 years ago, 22-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: USB, Windows, legOS
 
I tried the patch and still get the error "Error 6 GetCommState". Anyone know what this error means and what I can do to correct it? I would really like to get legOS running. (...) (23 years ago, 21-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: Storing Data
 
(...) It was suggested by some of my 'c++' co-workers that this was the case (shared memory was available). However, I don't deal with that in my Visual Basic world. They also suggested there were 'unused' memory blocks in LegOS where data could be (...) (23 years ago, 21-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: Storing Data
 
(...) As there is no memory management, any memory not on the stack is by definition shared between any threads. Concurrency control is up to you however. John A. Tamplin jat@jaet.org 770/436-5387 HOME 4116 Manson Ave 770/431-9459 FAX Smyrna, GA (...) (23 years ago, 21-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: Storing Data
 
(...) What you request is shared memory and shared memory is not a part of legOS. My way to simulate shared mem is to put the two (or more) tasks into one legOS program. Each task is started as a thread by an execi() call, triggered by the user via (...) (23 years ago, 21-Dec-01, to lugnet.robotics.rcx.legos)
 
  LNP: host address
 
Is there a reason to "hardcode" the host address using a define (LNP_HOSTADDR)? Things would be easier for me if I could change the address at run time (when calling lnp_init). Is it safe to replace the defines by a variable? Eric (23 years ago, 21-Dec-01, to lugnet.robotics.rcx.legos)
 
  Proximity
 
Next question: Does any one have a proximity routne (code) I can review (steal) using LegOS, a light sensor, and the IR port? I've used the NQC stuff, but now I've moved up to LegOS. I haven't been able to find the right commands for the IR port. (...) (23 years ago, 20-Dec-01, to lugnet.robotics.rcx.legos)
 
  Storing Data
 
When using LegOS (a most excellent creation, btw) is it possible to store a value and use it in different programs? Actually, I'm sure it is, but how would someone do it? I want to have one program to configure my light sensor, and use those values (...) (23 years ago, 20-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: Serial Port (IR Tower) communication procedures with LegOs
 
If you mean standard firmware message, I think you should use my remote control patch for legOS025, you can find them at (URL) luck! Zhengrong (...) (23 years ago, 19-Dec-01, to lugnet.robotics, lugnet.robotics.rcx.legos)
 
  Re: How to get interval of time
 
(...) correct? Yep, that's how I do it & it seems to work. ROSCO (23 years ago, 18-Dec-01, to lugnet.robotics.rcx.legos)
 
  How to get interval of time
 
In NQC, I can use ClearTimer(0) and Timer(0) to get interval of time, how can I do it in legOS? I used t1 = sys_time, then t2 = sys_time, so interval = t2 - t1, is it correct? Zhengrong (23 years ago, 18-Dec-01, to lugnet.robotics.rcx.legos)
 
  USB, Windows, legOS
 
Attention everyone trying or have gotten the USB IR tower to work under windows running legOS. I have some patches from at certain Jin Sato that are supposed to allow one to upload programs and the legOS kernel via the USB IR tower. First off I am (...) (23 years ago, 7-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: legOS on Mac OS X
 
(...) If I remember correctly, the tty devices will block in open() until they see some handshake (perhaps DCD) from the other side, while cu devices open right away and ignore handshake. I'd suggest taking a look at the code that initializes the (...) (23 years ago, 4-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: legOS on Mac OS X
 
(...) 8?) Only suggestion I have here is the Darwin developer mailing list(s). Or even the doco with their version may explain how to build a cross-compiler. They may have removed support, though unlikely if configure accepted the h8 target. They (...) (23 years ago, 3-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: legOS on Mac OS X
 
(...) Dave, first thank you for NQC and its Mac support. If only its collegues weren't such a headache! I am using a serial tower with a Keyspan adapter and the setup works great for NQC following your readme file. I had been wondering though, (...) (23 years ago, 3-Dec-01, to lugnet.robotics.rcx.legos)
 
  Re: legOS on Mac OS X
 
(...) I was able to get NQC working with the USB tower under Mac OS X pretty easily. IMHO, support for an application to directly access USB devices is pretty good. If anyone is trying this, feel free to grab the OSX/USB code I wrote for NQC (...) (23 years ago, 3-Dec-01, to lugnet.robotics.rcx.legos)


Next Page:  5 more | 10 more | 20 more | 100 more

Redisplay Messages:  All | Compact

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