closer to swerve?

This commit is contained in:
Zynh0722 2024-03-27 16:14:40 -07:00
parent 8c5e00c912
commit 456316365e
2 changed files with 10 additions and 1 deletions

View file

@ -3,5 +3,9 @@
// the WPILib BSD license file in the root directory of this project.
#include "cowlib/SwerveModule.h"
#include "rev/CANSparkMax.h"
SwerveModule::SwerveModule(int driveMotorId, int steerMotorId, int encoderId) {}
SwerveModule::SwerveModule(int driveMotorId, int steerMotorId, int encoderId) {
this->driveMotor = new rev::CANSparkMax(
driveMotorId, rev::CANSparkMax::MotorType::kBrushless);
}

View file

@ -4,8 +4,13 @@
#pragma once
#include <rev/CANSparkMax.h>
class SwerveModule {
private:
rev::CANSparkMax driveMotor;
rev::CANSparkMax steerMotor;
public:
SwerveModule(int driveMotorId, int steerMotorId, int encoderId);
};