DeepSpace  2019
Leg Class Reference

#include <Leg.h>

Inheritance diagram for Leg:

Public Member Functions

 Leg (void)
 Construct a new Leg object. More...
 
void InitDefaultCommand () override
 Who uses this? You dont need to. More...
 
void MoveLeg (double Speed)
 Move climb leg up or down. More...
 
bool AtTop (void)
 Returns whether the legs are at the top most position. More...
 
bool AtMiddle (void)
 Returns whether the legs are at the middle position. More...
 
bool AtBottom (void)
 Returns whether the legs are at the bottom most position. More...
 

Private Attributes

can::WPI_TalonSRX * pLegMotor
 Pointer for the climb leg motor Works off a winch system to pull up and down But is used like a talon motor. More...
 
frc::DigitalInput * pTopHall
 Sensor for when the leg is as far up as it can go If this sensor is tripped, the legs are above the wheels and it is now safe to drive. More...
 
frc::DigitalInput * pMiddleHall
 Sensor for when the leg is at the middle position If this sensor is tripped, the robot is above the low raised platform. More...
 
frc::DigitalInput * pBottomHall
 Sensor for when the leg is as far down as it can go If this sensor is tripped, the robot is above the highest platform. More...
 

Detailed Description

Definition at line 10 of file Leg.h.

Constructor & Destructor Documentation

◆ Leg()

Leg::Leg ( void  )

Construct a new Leg object.

Definition at line 3 of file Leg.cpp.

Member Function Documentation

◆ AtBottom()

bool Leg::AtBottom ( void  )

Returns whether the legs are at the bottom most position.

Returns
true Sensor is tripped, we are at the bottom
false Sensor is not tripped, we are not at the bottom

Definition at line 42 of file Leg.cpp.

◆ AtMiddle()

bool Leg::AtMiddle ( void  )

Returns whether the legs are at the middle position.

Returns
true Sensor is tripped, we are at the middle
false Sensor is not tripped, we are not at the middle

Definition at line 37 of file Leg.cpp.

◆ AtTop()

bool Leg::AtTop ( void  )

Returns whether the legs are at the top most position.

Returns
true Sensor is tripped, we are at the top
false Sensor is not tripped, we are not at the top

Definition at line 32 of file Leg.cpp.

◆ InitDefaultCommand()

void Leg::InitDefaultCommand ( )
override

Who uses this? You dont need to.

Definition at line 18 of file Leg.cpp.

◆ MoveLeg()

void Leg::MoveLeg ( double  Speed)

Move climb leg up or down.

Parameters
Speedrange:(-1.00, 1.00) where 1.00 or 100% is upwards

Definition at line 23 of file Leg.cpp.

Member Data Documentation

◆ pBottomHall

frc::DigitalInput* Leg::pBottomHall
private

Sensor for when the leg is as far down as it can go If this sensor is tripped, the robot is above the highest platform.

Remarks
When moving the leg down, stop when this gets tripped

Definition at line 78 of file Leg.h.

◆ pLegMotor

can::WPI_TalonSRX* Leg::pLegMotor
private

Pointer for the climb leg motor Works off a winch system to pull up and down But is used like a talon motor.

Definition at line 57 of file Leg.h.

◆ pMiddleHall

frc::DigitalInput* Leg::pMiddleHall
private

Sensor for when the leg is at the middle position If this sensor is tripped, the robot is above the low raised platform.

Definition at line 71 of file Leg.h.

◆ pTopHall

frc::DigitalInput* Leg::pTopHall
private

Sensor for when the leg is as far up as it can go If this sensor is tripped, the legs are above the wheels and it is now safe to drive.

Remarks
When moving the leg up, stop when this gets tripped

Definition at line 65 of file Leg.h.


The documentation for this class was generated from the following files: