mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Moved C++ comments from source files to headers (#1111)
Also sorted functions in C++ sources to match order in related headers.
This commit is contained in:
committed by
Peter Johnson
parent
d9971a705a
commit
8c680a26f8
@@ -40,17 +40,10 @@ DriveTrain::DriveTrain() : frc::Subsystem("DriveTrain") {
|
||||
AddChild("Gyro", m_gyro);
|
||||
}
|
||||
|
||||
/**
|
||||
* When no other command is running let the operator drive around
|
||||
* using the PS3 joystick.
|
||||
*/
|
||||
void DriveTrain::InitDefaultCommand() {
|
||||
SetDefaultCommand(new TankDriveWithJoystick());
|
||||
}
|
||||
|
||||
/**
|
||||
* The log method puts interesting information to the SmartDashboard.
|
||||
*/
|
||||
void DriveTrain::Log() {
|
||||
frc::SmartDashboard::PutNumber("Left Distance", m_leftEncoder.GetDistance());
|
||||
frc::SmartDashboard::PutNumber("Right Distance",
|
||||
|
||||
@@ -13,24 +13,16 @@ Pneumatics::Pneumatics() : frc::Subsystem("Pneumatics") {
|
||||
AddChild("Pressure Sensor", m_pressureSensor);
|
||||
}
|
||||
|
||||
/**
|
||||
* No default command
|
||||
*/
|
||||
void Pneumatics::InitDefaultCommand() {}
|
||||
void Pneumatics::InitDefaultCommand() {
|
||||
// No default command
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the compressor going. The compressor automatically starts and stops as
|
||||
* it goes above and below maximum pressure.
|
||||
*/
|
||||
void Pneumatics::Start() {
|
||||
#ifndef SIMULATION
|
||||
m_compressor.Start();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether or not the system is fully pressurized.
|
||||
*/
|
||||
bool Pneumatics::IsPressurized() {
|
||||
#ifndef SIMULATION
|
||||
return kMaxPressure <= m_pressureSensor.GetVoltage();
|
||||
@@ -39,9 +31,6 @@ bool Pneumatics::IsPressurized() {
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts the pressure on the SmartDashboard.
|
||||
*/
|
||||
void Pneumatics::WritePressure() {
|
||||
frc::SmartDashboard::PutNumber("Pressure", m_pressureSensor.GetVoltage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user