Cortex VEXnet Manuál s instrukcemi Strana 35

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 95
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 94 95

Komentáře k této Příručce

Žádné komentáře