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
Commands
PIDCommand.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2011. 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 __PID_COMMAND_H__
8
#define __PID_COMMAND_H__
9
10
#include "Commands/Command.h"
11
#include "PIDSource.h"
12
#include "PIDOutput.h"
13
14
class
PIDController
;
15
16
class
PIDCommand
:
public
Command
,
public
PIDOutput
,
public
PIDSource
17
{
18
public
:
19
PIDCommand
(
const
char
*name,
double
p,
double
i,
double
d);
20
PIDCommand
(
const
char
*name,
double
p,
double
i,
double
d,
double
period);
21
PIDCommand
(
const
char
*name,
double
p,
double
i,
double
d,
double
f,
double
perioid);
22
PIDCommand
(
double
p,
double
i,
double
d);
23
PIDCommand
(
double
p,
double
i,
double
d,
double
period);
24
PIDCommand
(
double
p,
double
i,
double
d,
double
f,
double
period);
25
virtual
~
PIDCommand
();
26
27
void
SetSetpointRelative(
double
deltaSetpoint);
28
29
// PIDOutput interface
30
virtual
void
PIDWrite(
float
output);
31
32
// PIDSource interface
33
virtual
double
PIDGet();
34
protected
:
35
PIDController
*GetPIDController();
36
virtual
void
_Initialize();
37
virtual
void
_Interrupted();
38
virtual
void
_End();
39
void
SetSetpoint(
double
setpoint);
40
double
GetSetpoint();
41
double
GetPosition();
42
43
virtual
double
ReturnPIDInput() = 0;
44
virtual
void
UsePIDOutput(
double
output) = 0;
45
46
private
:
48
PIDController
*m_controller;
49
50
public
:
51
virtual
void
InitTable
(
ITable
* table);
52
virtual
std::string
GetSmartDashboardType
();
53
};
54
55
#endif
56
ITable
Definition:
ITable.h:26
PIDCommand::InitTable
virtual void InitTable(ITable *table)
Definition:
PIDCommand.cpp:103
PIDCommand::GetSmartDashboardType
virtual std::string GetSmartDashboardType()
Definition:
PIDCommand.cpp:100
Command
Definition:
Command.h:43
PIDSource
Definition:
PIDSource.h:15
PIDController
Definition:
PIDController.h:26
PIDCommand
Definition:
PIDCommand.h:16
PIDOutput
Definition:
PIDOutput.h:18
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.