closer to swerve?
This commit is contained in:
parent
8c5e00c912
commit
456316365e
2 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||||
|
}
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue