Mode change option for Motor running

Dear all,

here i am trying to run a motor in manual and auto mode. When running in manual mode linear get direct supply and when running on auto , it should drive from micro controller.And how to add diode in order to avoid spark when running in manual mode.

Switch:http://www.colehersee.com/home/spst_spdt_dpst_dpdt

Data sheet of motor Driver attached below:

http://www.nex-robotics.com/images/down … e%20V2.pdf