Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
IterativeRobot.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2008. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5
/*----------------------------------------------------------------------------*/
6
7
#ifndef ROBOT_ITERATIVE_H_
8
#define ROBOT_ITERATIVE_H_
9
10
#include "Timer.h"
11
#include "RobotBase.h"
12
41
class
IterativeRobot
:
public
RobotBase
{
42
public
:
43
/*
44
* The default period for the periodic function calls (seconds)
45
* Setting the period to 0.0 will cause the periodic functions to follow
46
* the Driver Station packet rate of about 50Hz.
47
*/
48
static
const
double
kDefaultPeriod = 0.0;
49
50
virtual
void
StartCompetition
();
51
52
virtual
void
RobotInit
();
53
virtual
void
DisabledInit
();
54
virtual
void
AutonomousInit
();
55
virtual
void
TeleopInit
();
56
virtual
void
TestInit
();
57
58
virtual
void
DisabledPeriodic
();
59
virtual
void
AutonomousPeriodic
();
60
virtual
void
TeleopPeriodic
();
61
virtual
void
TestPeriodic
();
62
63
void
SetPeriod
(
double
period);
64
double
GetPeriod
();
65
double
GetLoopsPerSec
();
66
67
protected
:
68
virtual
~IterativeRobot
();
69
IterativeRobot
();
70
71
private
:
72
bool
NextPeriodReady();
73
74
bool
m_disabledInitialized;
75
bool
m_autonomousInitialized;
76
bool
m_teleopInitialized;
77
bool
m_testInitialized;
78
double
m_period;
79
Timer
m_mainLoopTimer;
80
};
81
82
#endif
83
Generated on Tue Feb 5 2013 00:55:09 for WPILibC++ by
1.8.1.2
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.