Made power switching automatic for both pwm and moto.