Is the problem that the motor is just running in the wrong direction? The simple fix is to swap its wires coming from the speed controller.

The software fix is to negate the PID constants so that it computes a control value that goes in the other direction from what it's doing now.