mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixed C++ side of artf2604 in FRCSim - synchronized C++ codebases, updated examples.
Change-Id: I2fdc9deb4c8e249448dcbda4214fd900c2bc4ea8
This commit is contained in:
@@ -4,10 +4,10 @@ Collector::Collector() :
|
||||
Subsystem("Collector")
|
||||
{
|
||||
// Configure devices
|
||||
rollerMotor = new Victor(1, 6);
|
||||
ballDetector = new DigitalInput(1, 10);
|
||||
openDetector = new DigitalInput(1, 6);
|
||||
piston = new Solenoid(1, 1);
|
||||
rollerMotor = new Victor(6);
|
||||
ballDetector = new DigitalInput(10);
|
||||
openDetector = new DigitalInput(6);
|
||||
piston = new Solenoid(1);
|
||||
|
||||
// Put everything to the LiveWindow for testing.
|
||||
// XXX: LiveWindow::GetInstance()->AddActuator("Collector", "Roller Motor", (Victor) rollerMotor);
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
DriveTrain::DriveTrain() :
|
||||
Subsystem("DriveTrain") {
|
||||
// Configure drive motors
|
||||
frontLeftCIM = new Victor(1, 1);
|
||||
frontRightCIM = new Victor(1, 2);
|
||||
backLeftCIM = new Victor(1, 3);
|
||||
backRightCIM = new Victor(1, 4);
|
||||
frontLeftCIM = new Victor(1);
|
||||
frontRightCIM = new Victor(2);
|
||||
backLeftCIM = new Victor(3);
|
||||
backRightCIM = new Victor(4);
|
||||
// XXX: LiveWindow::GetInstance()->AddActuator("DriveTrain", "Front Left CIM", (Victor) frontLeftCIM);
|
||||
// XXX: LiveWindow::GetInstance()->AddActuator("DriveTrain", "Front Right CIM", (Victor) frontRightCIM);
|
||||
// XXX: LiveWindow::GetInstance()->AddActuator("DriveTrain", "Back Left CIM", (Victor) backLeftCIM);
|
||||
@@ -28,8 +28,8 @@ DriveTrain::DriveTrain() :
|
||||
drive->SetInvertedMotor(RobotDrive::kRearRightMotor, true);
|
||||
|
||||
// Configure encoders
|
||||
rightEncoder = new Encoder(1, 1, 1, 2, true, Encoder::k4X);
|
||||
leftEncoder = new Encoder(2, 5, 2, 6, false, Encoder::k4X);
|
||||
rightEncoder = new Encoder(1, 2, true, Encoder::k4X);
|
||||
leftEncoder = new Encoder(5, 6, false, Encoder::k4X); // TODO: Correct encoder module.
|
||||
rightEncoder->SetPIDSourceParameter(PIDSource::kDistance);
|
||||
leftEncoder->SetPIDSourceParameter(PIDSource::kDistance);
|
||||
|
||||
@@ -49,7 +49,7 @@ DriveTrain::DriveTrain() :
|
||||
LiveWindow::GetInstance()->AddSensor("DriveTrain", "Left Encoder", leftEncoder);
|
||||
|
||||
// Configure gyro
|
||||
gyro = new Gyro(1, 2);
|
||||
gyro = new Gyro(2);
|
||||
#ifdef REAL
|
||||
gyro->SetSensitivity(0.007); // TODO: Handle more gracefully?
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pneumatics::Pneumatics() :
|
||||
Subsystem("Pneumatics")
|
||||
{
|
||||
pressureSensor = new AnalogChannel(3);
|
||||
pressureSensor = new AnalogInput(3);
|
||||
#ifdef REAL
|
||||
compressor = new Compressor(uint8_t(1)); // TODO: (1, 14, 1, 8);
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
class Pneumatics: public Subsystem
|
||||
{
|
||||
private:
|
||||
AnalogChannel* pressureSensor;
|
||||
AnalogInput* pressureSensor;
|
||||
#ifdef REAL
|
||||
Compressor* compressor;
|
||||
#endif
|
||||
|
||||
@@ -4,12 +4,12 @@ Shooter::Shooter() :
|
||||
Subsystem("Shooter")
|
||||
{
|
||||
// Configure Devices
|
||||
hotGoalSensor = new DigitalInput(1, 3);
|
||||
piston1 = new DoubleSolenoid(1, 3, 4);
|
||||
piston2 = new DoubleSolenoid(1, 5, 6);
|
||||
hotGoalSensor = new DigitalInput(3);
|
||||
piston1 = new DoubleSolenoid(3, 4);
|
||||
piston2 = new DoubleSolenoid(5, 6);
|
||||
latchPiston = new Solenoid(1, 2);
|
||||
piston1ReedSwitchFront = new DigitalInput(1, 9);
|
||||
piston1ReedSwitchBack = new DigitalInput(1, 11);
|
||||
piston1ReedSwitchFront = new DigitalInput(9);
|
||||
piston1ReedSwitchBack = new DigitalInput(11);
|
||||
|
||||
// Put everything to the LiveWindow for testing.
|
||||
LiveWindow::GetInstance()->AddSensor("Shooter", "Hot Goal Sensor", hotGoalSensor);
|
||||
|
||||
Reference in New Issue
Block a user