Quote:
|
Originally Posted by Mark McLeod
The switch returns a value of 0(on) or 1(off)
In the tracker code this switch value is represented by rc_dig_in07
rc_dig_in07 is given another name (DESIRED_BEACON_TYPE) by tracker.h and that's what you'll see used in the tracker.c code.
The tracker code then checks rc_dig_in07 to see which of the two beacon types it is supposed to be looking for.
FIRST hasn't yet told us which sides of the field the two beacons are going to be on, but if you have your beacon switch you can just label them at the regional competition.
I like to think of the switch as red/blue alliance rather than beacon type-0/type-1.
|
I don't think they will be either red or blue alliance because there is a beacon on either side of the field. Which means one red alliance will go towards beacon 0 while the other red alliance will drive towards beacon 1. If I am wrong about this please let me know.
So for the switch we just need to jumper the first and third pins for beacon type 1 and leave them off for beacon type 0? I think we tried that and by default it was looking for beacon type 1 with no jumper. I had to hard code in beacon type 0 for it to look for that beacon.