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 / 2979
    Polling sensor values with wait_event —Thomas Gysi
   Hello all, Is it true that the wakeup function is only checked once every timeslice and only for the process that has the highest priority and is at the front of the priority chain? For example, a process k is waiting on the wakeup function y wich (...) (22 years ago, 26-Nov-02, to lugnet.robotics.rcx.legos)
   
        Re: Polling sensor values with wait_event —Joseph Woolley
   Thomas, You are mostly correct. However, keep in mind that tasks with the same priority get checked in turn. The first task in the priority chain does not get undo precedence over the others in the same priority level. Example: Tasks A, B and C all (...) (22 years ago, 27-Nov-02, to lugnet.robotics.rcx.legos)
   
        Re: Polling sensor values with wait_event —Thomas Gysi
   Hi Joe, Thanks for your reply, I guess that is the solution to use in this case. I'll still just get values every 20ms. By changing the timeslice I could have this go a bit faster though. Thomas (22 years ago, 27-Nov-02, to lugnet.robotics.rcx.legos)
   
        Re: Polling sensor values with wait_event —Joseph Woolley
   Thomas, I had a thought about this situation. You could write a function that sets a flag when the event is triggered, do nothing otherwise. You could call this function from within each of the tasks you write (at a somewhat high frequency ... say (...) (22 years ago, 28-Nov-02, to lugnet.robotics.rcx.legos)
 

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