motor controller test code