Cortex VEXnet Manual de Instruções Página 35

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 34
ROBOTC
ROBOTC Programming - Competition Templates 5
©
2011 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems
User Control Period
Placeyourusercontrolcodeinsidethistask.Duringtheusercontrolledperiod,therobotaccepts
commandsfromtheVEXnetJoysticks(VEXCortexbasedrobots)ortheRadioControlTransmitter(VEXPIC
basedrobots).Thissegmentofcodetypicallyexecutesimmediatelyaftertheautonomousperiodends.
TheUserControlCodePlaceholderForTesting();functionisonlyaplaceholderandshouldbe
removedonceyouplaceyourowncodeinsideofthewhile(true)loop.
task usercontrol()
{
while(true)
{
//Place user control code here
UserControlCodePlaceholderForTesting();
}
}
Whenprogrammingfortheusercontrolperiod,placeallcommandsinsideofthewhile(true)loop.Failing
todosowillresultinthecommandsonlyrunningonce,preventingyoufromremotelycontrollingyourrobot.
Theeldcontrolsystemdeterminesandcontrolsthemaximumlengthoftheusercontrolperiod.
Important Information - while(true) loop
ROBOTC Programming Competition Templates (cont.)
VEX ROBOTICS COMPETITION
Vista de página 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 94 95

Comentários a estes Manuais

Sem comentários