Directly control motor current

So, my team is trying to get our code working well, but we need to control the motor current directly rather than using the velocityUnits and built-in PID loops. Is there a way to directly control the current being delivered to a motor?

Check out this post