View Single Post
  #10   Spotlight this post!  
Unread 24-02-2009, 00:53
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: AnalogModule->GetAverageValue() gives wrong results if polled too fast

We were never polling the analog input at a high rate. Is NI really sure that the semaphore works? If the problem is caused by asynchronous collision between two threads, one reading the battery voltage, and the other thread being the one we use to control the robot, how about moving the battery voltage check to the user code and then use a shared variable to let the driverstation.cpp code to fetch the battery voltage after the user code stores it. Does that fix the problem for you?

Eugene

Last edited by eugenebrooks : 24-02-2009 at 00:55.
Reply With Quote