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
SafePWM.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 __SAFE_PWM__
8
#define __SAFE_PWM__
9
10
#include "MotorSafety.h"
11
#include "PWM.h"
12
13
class
MotorSafetyHelper
;
14
22
class
SafePWM
:
public
PWM
,
public
MotorSafety
23
{
24
public
:
25
explicit
SafePWM
(uint32_t channel);
26
SafePWM
(uint8_t moduleNumber, uint32_t channel);
27
~
SafePWM
();
28
29
void
SetExpiration(
float
timeout);
30
float
GetExpiration
();
31
bool
IsAlive
();
32
void
StopMotor
();
33
bool
IsSafetyEnabled
();
34
void
SetSafetyEnabled
(
bool
enabled);
35
void
GetDescription(
char
*desc);
36
37
virtual
void
SetSpeed
(
float
speed);
38
private
:
39
void
InitSafePWM();
40
MotorSafetyHelper
*m_safetyHelper;
41
};
42
43
#endif
SafePWM::SetSafetyEnabled
void SetSafetyEnabled(bool enabled)
Definition:
SafePWM.cpp:87
SafePWM::IsSafetyEnabled
bool IsSafetyEnabled()
Definition:
SafePWM.cpp:96
PWM
Definition:
PWM.h:32
SafePWM::SetSpeed
virtual void SetSpeed(float speed)
Definition:
SafePWM.cpp:112
SafePWM::IsAlive
bool IsAlive()
Definition:
SafePWM.cpp:67
SafePWM::GetExpiration
float GetExpiration()
Definition:
SafePWM.cpp:57
MotorSafety
Definition:
MotorSafety.h:11
SafePWM::StopMotor
void StopMotor()
Definition:
SafePWM.cpp:77
SafePWM::SafePWM
SafePWM(uint32_t channel)
Definition:
SafePWM.cpp:24
SafePWM
Definition:
SafePWM.h:22
MotorSafetyHelper
Definition:
MotorSafetyHelper.h:16
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.