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 / 2272
    Re: multiplexor and legOS —Michael Ash
   (...) Don't ask me for a cite, but I seem to remember something about msleep only having 20ms granularity. If that's the case, your msleep(10) is either not sleeping at all or is sleeping 20ms, either one of which could cause problems. I'd suggest (...) (22 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)
   
        Re: multiplexor and legOS —Mark Falco
     (...) Thanks, I'd suspected that msleep might not be very accurate but never considered that it's true granularity could be so large. I did a quick test with my current configuration and when I asked msleep to sleep for 12ms it slept for 20. This (...) (22 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)
    
         Re: multiplexor and legOS —Robert Templeton
     (...) I don't know about this 20ms granularity and how delay() is going to be any better. Here's the code for each function: //! delay execution allowing other tasks to run. /*! \param msec sleep duration in milliseconds \return number of (...) (22 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)
    
         Re: multiplexor and legOS —Mark Falco
       (...) I agree about the cause for the msleep granularity, I'd seen the same stuff in tm and assumed that would cause the problem. Sorry my last note was a little unclear, I tried msleep and delay but am now using my own function which seems to (...) (22 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Robert Templeton
      (...) Not bad. But as you say, still vulnerable to the task switching problem. (...) Instead of resorting to that, maybe there is a way to freeze task switching during critical operations. When I owned and programmed the AmigaOS (don't laugh :), (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
       (...) It looks like the semaphore task_sm should prevent another task from being scheduled if I hold it for the length of the train. I've now tried this as well as incresing the timeslice to 100ms. It looks better but still is not consistent. Since (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
      Since I'm now fairly sure that i've got the timing taken care of I'm wondering if the power cycling that ds_handler does is somehow causing the problem? I thought I might take control of this stuff in my test code. I assume if I set the sensor for (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
      Ok, my last port didn't make much sense let me try that again. for an active sensor ds_handler will periodically power the sensor off to read the value. The standard firmware does this to but at a different interval. I'm wondering if this is part of (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
      Still no luck in getting the mux working properly. I tried making use of the code for turning sensors on and off but later realized that the ds_handler code would still be turning the sensor off as part of its normal operation. I think I'm going to (...) (22 years ago, 7-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
      I'm happy to report that after writing the multiplexor driver at the kernel level it's working! I'll post a patch soon once I've got it cleaned up a little bit. It looks like the problem was with the legOS power/read cycle in ds_handler. Once I took (...) (22 years ago, 10-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Robert Templeton
       (...) Sort of. Try Sourceforge ((URL) is on the "Patches" page (just click on the "Submit New" link). Great Job!! I am looking forward to be able to use the multiplexer finally! I've successfully added the "priority interrupt" patch to legOS 0.2.5 (...) (22 years ago, 10-Feb-02, to lugnet.robotics.rcx.legos)
      
           multiplexor patch posted —Mark Falco
       I've posted the multiplexor patch under the patches secetion of the legOS project at sourceforge. (URL) you can't follow that link just go to (URL) then follow the patches link and look for the multiplexor patch. If you improve upon it post the (...) (22 years ago, 10-Feb-02, to lugnet.robotics.rcx.legos)
     
          Re: multiplexor and legOS —Mark Falco
      I'm not sure if anyone is trying out my multiplexor patch, but thought I'd let you all know that I posted a new version which works better and solves some problems in the earlier revision. The patch is available in the legOS patch section on (...) (22 years ago, 17-Feb-02, to lugnet.robotics.rcx.legos)
    
         Re: multiplexor and legOS —Michael Ash
     (...) Most people's legOS kernels will be compiled so msleep uses wait_event. I haven't looked at the code, but my understanding of how wait_event works is that whenever that thread becomes eligible to execute, your even function is called. (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
    
         Re: multiplexor and legOS —Robert Templeton
     (...) Actually, something like this has been documented and done by Pedersen, Christensen, Rasmussen ("Prioritized Interrupts in LegOS"). They actually document the problem of sensor misses related to task management, significantly reducing the (...) (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
    
         Re: multiplexor and legOS —Michael Obenland
     (...) I'm just checking this thing out. You can look at: (URL) more information. Unfortunately, I got the .ps description file but not the source code patch file. A mail asking for it is on it's way ;) Mike (22 years ago, 5-Feb-02, to lugnet.robotics.rcx.legos)
   
        Re: multiplexor and legOS —Albert Huang
   #include <sys/time.h> void systime_set_timeslice (unsigned char slice); include/sys/time.h:43-45: #ifdef CONF_TM #define TM_DEFAULT_SLICE 20 file://!< default multitasking timeslice #endif hope that helps, Albert "Michael J Ash" (...) (22 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)
 

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