CrossTheRoadElec / Phoenix-Releases

Release repository for Phoenix-Framework and Phoenix-Tuner
76 stars 7 forks source link

SwerveModule: open loop mode with FOC #74

Closed jonahsnider closed 5 months ago

jonahsnider commented 5 months ago

The SwerveModule class has no way to use FOC in an open loop control mode. There is FOC and non-FOC for closed loop, but the only option for open loop is non-FOC.

DriveRequestType should have a OpenLoopVoltageFOC option added

bhall-ctre commented 5 months ago

Since OpenLoopVoltage uses a VoltageOut request with the default EnableFOC value of true, FOC is already enabled. The firmware just ignores it if the device is unlicensed.

jonahsnider commented 5 months ago

Ah, my mistake, I didn't realize the specific VoltageOut constructor the SwerveModule uses sets FOC to enabled. Sorry for missing that!