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
Servo.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 SERVO_H
8
#define SERVO_H
9
10
#include "SafePWM.h"
11
#include "SpeedController.h"
12
19
class
Servo
:
public
SafePWM
20
{
21
public
:
22
explicit
Servo
(uint32_t channel);
23
Servo
(uint8_t moduleNumber, uint32_t channel);
24
virtual
~
Servo
();
25
void
Set
(
float
value);
26
void
SetOffline
();
27
float
Get
();
28
void
SetAngle
(
float
angle);
29
float
GetAngle
();
30
static
float
GetMaxAngle() {
return
kMaxServoAngle; };
31
static
float
GetMinAngle() {
return
kMinServoAngle; };
32
33
void
ValueChanged
(
ITable
* source,
const
std::string& key,
EntryValue
value,
bool
isNew);
34
void
UpdateTable
();
35
void
StartLiveWindowMode
();
36
void
StopLiveWindowMode
();
37
std::string
GetSmartDashboardType
();
38
void
InitTable
(
ITable
*subTable);
39
ITable
*
GetTable
();
40
41
ITable
*m_table;
42
43
private
:
44
void
InitServo();
45
float
GetServoAngleRange() {
return
kMaxServoAngle - kMinServoAngle;}
46
47
static
constexpr
float
kMaxServoAngle = 170.0;
48
static
constexpr
float
kMinServoAngle = 0.0;
49
};
50
51
#endif
52
Servo::Servo
Servo(uint32_t channel)
Definition:
Servo.cpp:37
ITable
Definition:
ITable.h:26
Servo::ValueChanged
void ValueChanged(ITable *source, const std::string &key, EntryValue value, bool isNew)
Definition:
Servo.cpp:126
Servo::StopLiveWindowMode
void StopLiveWindowMode()
Definition:
Servo.cpp:142
Servo::InitTable
void InitTable(ITable *subTable)
Definition:
Servo.cpp:152
Servo::SetAngle
void SetAngle(float angle)
Definition:
Servo.cpp:101
Servo::Set
void Set(float value)
Definition:
Servo.cpp:64
Servo::GetTable
ITable * GetTable()
Definition:
Servo.cpp:157
Servo::SetOffline
void SetOffline()
Definition:
Servo.cpp:74
Servo::StartLiveWindowMode
void StartLiveWindowMode()
Definition:
Servo.cpp:136
Servo
Definition:
Servo.h:19
Servo::Get
float Get()
Definition:
Servo.cpp:85
Servo::UpdateTable
void UpdateTable()
Definition:
Servo.cpp:130
SafePWM
Definition:
SafePWM.h:22
Servo::GetSmartDashboardType
std::string GetSmartDashboardType()
Definition:
Servo.cpp:148
Servo::GetAngle
float GetAngle()
Definition:
Servo.cpp:121
EntryValue
Definition:
ITable.h:13
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.