Fix indentation.
Output PWM based on input direction.