added mods for hardware and software pwm capability

this is a small mod to allow the choice between software and hardware pwm the current system of pwm works to a degree however the current rise isn't linear with respect to the pwm value , the hardware pwm runs at a higher frequency than the soft pwm so the current rise is a lot more linear , this also seems to make the pid loops more stable, even with terribly chosen  P I D values