2022-12-02 18:40:14 +02:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <frc/DoubleSolenoid.h>
|
|
|
|
|
#include <frc/motorcontrol/PWMSparkMax.h>
|
|
|
|
|
|
|
|
|
|
#include "Constants.h"
|
|
|
|
|
|
|
|
|
|
class Intake {
|
|
|
|
|
public:
|
|
|
|
|
void Deploy();
|
|
|
|
|
void Retract();
|
|
|
|
|
void Activate(double speed);
|
|
|
|
|
bool IsDeployed() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
frc::PWMSparkMax m_motor{IntakeConstants::kMotorPort};
|
2025-02-25 19:07:01 -08:00
|
|
|
frc::DoubleSolenoid m_piston{0, frc::PneumaticsModuleType::CTREPCM,
|
2022-12-02 18:40:14 +02:00
|
|
|
IntakeConstants::kPistonFwdChannel,
|
|
|
|
|
IntakeConstants::kPistonRevChannel};
|
|
|
|
|
};
|