closer to swerve?

main
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. // the WPILib BSD license file in the root directory of this project.
#include "cowlib/SwerveModule.h" #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 #pragma once
#include <rev/CANSparkMax.h>
class SwerveModule { class SwerveModule {
private: private:
rev::CANSparkMax driveMotor;
rev::CANSparkMax steerMotor;
public: public:
SwerveModule(int driveMotorId, int steerMotorId, int encoderId); SwerveModule(int driveMotorId, int steerMotorId, int encoderId);
}; };