View Single Post
  #6   Spotlight this post!  
Unread 05-02-2017, 21:27
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is online now
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,076
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: How to use FRC Events data to determine gear ability

Here is a possible alternative which avoids my above complaint. This would treat the reserve gear just like any other teleop gear. Let's call Brian's original pseudocode Option 1, and this pseudocode Option 2.

Code:
function matchTotalGears(match):
     if match.rotor4Engaged: return 13
     if match.rotor3Engaged: return 7
     if match.rotor2Engaged: return 3
     else: return 1

function matchAutoGears(match):
     if match.rotor2Auto: return 3 
     if match.rotor1Auto: return 1
     else: return 0

function matchTeleopGears(match):
     return matchTotalGears(match) - matchAutoGears(match)
Reply With Quote