VEX2 Functions IFI Competition Control

From ROBOTC API Guide
Revision as of 16:07, 30 April 2012 by Bfeher (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
CORTEXFunctions and Variables → IFI Competition Control


Color Key
Function:
Variable:


bIfiAutonomousMode

const bool bIfiAutonomousMode
(bool) Boolean variable to indicate whether robot is currently in autonomous or competition mode. In autonomous mode, the robot can be freely "controlled" by software whether or not the robot's RF channel to base transmitter (VEX) is operational.In competition mode, the robot software is configured for a two phase robot competition: an initial autonomous operation phase where joystick values are masked followed by a 'user control' phase where the robot is controlled by the base station joysticks.
bIfiAutonomousMode = false;  // competition mode
bIfiAutonomousMode = true;   // autonomous mode


nVexRCReceiveState

const TVexReceiverState nVexRCReceiveState
(TVexReceiverState) Numeric value containing the current state of the FR transmitter channel.
if(nVexRCReceiveState == vrNoXmiters) // the transmitters are powered off!!
{
  motor[rightMotor] = 0;
  motor[leftMotor]  = 0; 
}