[wpimath] Add DCMotor functions for Kraken X60 and Neo Vortex (#5759)

This commit is contained in:
Jordan McMichael
2023-10-15 00:52:01 -04:00
committed by GitHub
parent fd427f6c82
commit 896772c750
2 changed files with 61 additions and 0 deletions

View File

@@ -211,6 +211,31 @@ class WPILIB_DLLEXPORT DCMotor {
// From https://www.pololu.com/product/1520/specs
return DCMotor(4.5_V, 0.1765_Nm, 1.25_A, 0.13_A, 150_rpm, numMotors);
}
/**
* Return a gearbox of Kraken X60 brushless motors.
*/
static constexpr DCMotor KrakenX60(int numMotors = 1) {
// From https://store.ctr-electronics.com/announcing-kraken-x60/
return DCMotor(12_V, 7.09_Nm, 366_A, 2_A, 6000_rpm, numMotors);
}
/**
* Return a gearbox of Kraken X60 brushless motors with FOC (Field-Oriented
* Control) enabled.
*/
static constexpr DCMotor KrakenX60FOC(int numMotors = 1) {
// From https://store.ctr-electronics.com/announcing-kraken-x60/
return DCMotor(12_V, 9.37_Nm, 483_A, 2_A, 5800_rpm, numMotors);
}
/**
* Return a gearbox of Neo Vortex brushless motors.
*/
static constexpr DCMotor NeoVortex(int numMotors = 1) {
// From https://www.revrobotics.com/next-generation-spark-neo/
return DCMotor(12_V, 3.60_Nm, 211_A, 3.615_A, 6784_rpm, numMotors);
}
};
} // namespace frc