View Single Post
  #1   Spotlight this post!  
Unread 09-01-2008, 03:33
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
oneShotFlags in Sensor?

Since I don't have an ifi robot controller at home so I'm experimenting with sensors on my Vex. I've downloaded the sensor test source code from the VexLabs web site. The code seems compatible with the FRC MPLAB code.

My question is, what are the oneShotFlags used for?

They are assigned values in the user_routines_sensor_test.c source code file. I was assuming they are output for use by the Dynamic Debug Tool.

The variable is defined as: bitid oneShotFlags

I found that bitid is a structure defined in ifi_default.h.

I searched for the text string "oneShotFlags" in all of the .c and .h files in my directory and only found the same user_routines_sensor_test.c file where the variable was defined.

I don't see where the variable oneShotFlags gets used other than in the Handle_Sensors function where it gets assigned values. I don't see how these values get assigned to txdata to even get sent back for display.

I'm not seeing any useful purpose for using the variables so maybe I'm missing something. Is this just sloppy code from the VexLabs site or what?


Vince