From 2389e26e3be1b0dcc215d43886d6eb5a68182d12 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Sat, 29 Apr 2017 01:44:37 -0700 Subject: [PATCH] fix both motor MOE required --- MotorControl/low_level.c | 7 +++++++ ODriveFirmware.launch | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MotorControl/low_level.c b/MotorControl/low_level.c index b64c81c6..f2b17d2a 100755 --- a/MotorControl/low_level.c +++ b/MotorControl/low_level.c @@ -1214,6 +1214,13 @@ void motor_thread(void const * argument) { motor->thread_ready = true; #ifdef STANDALONE_MODE + //Only run tests on M0 for now + if (motor == &motors[1]) { + // TODO: figure out why M1 MOE must be enabled to run M0 correctly + __HAL_TIM_MOE_ENABLE(motor->motor_timer); + FOC_voltage_loop(motor, 0.0f, 0.0f); + } + motor->do_calibration = true; motor->enable_control = true; #endif diff --git a/ODriveFirmware.launch b/ODriveFirmware.launch index 2c8a0727..6aee50df 100644 --- a/ODriveFirmware.launch +++ b/ODriveFirmware.launch @@ -57,6 +57,6 @@ - +