From d54d4479ac2ccce3681e20e0e364d4423760c42c Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Mon, 27 Aug 2018 16:09:07 -0700 Subject: [PATCH] update max inductance check to 2500uH --- CHANGELOG.md | 1 + Firmware/MotorControl/motor.cpp | 2 +- Firmware/MotorControl/motor.hpp | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e64319be..a7b7fc42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Please add a note of your changes below this heading if you make a Pull Request. ### Changed * We now enforce encoder offset calibration must happen after index is found (if using index) * Renaming of the velocity estimate `pll_vel` -> `vel_estimate`. +* Hardcoded maximum inductance now 2500 uH. ### Fixed * Once you got an axis error `ERROR_INVALID_STATE` you could never clear it diff --git a/Firmware/MotorControl/motor.cpp b/Firmware/MotorControl/motor.cpp index d8e4764b..56817ee8 100644 --- a/Firmware/MotorControl/motor.cpp +++ b/Firmware/MotorControl/motor.cpp @@ -241,7 +241,7 @@ bool Motor::measure_phase_inductance(float voltage_low, float voltage_high) { config_.phase_inductance = L; // TODO arbitrary values set for now - if (L < 1e-6f || L > 500e-6f) + if (L < 1e-6f || L > 2500e-6f) return set_error(ERROR_PHASE_INDUCTANCE_OUT_OF_RANGE), false; return true; } diff --git a/Firmware/MotorControl/motor.hpp b/Firmware/MotorControl/motor.hpp index ae2cd870..07820726 100644 --- a/Firmware/MotorControl/motor.hpp +++ b/Firmware/MotorControl/motor.hpp @@ -44,7 +44,6 @@ typedef struct { float phase_resistance = 0.0f; // to be set by measure_phase_resistance int32_t direction = 1; // 1 or -1 Motor_type_t motor_type = MOTOR_TYPE_HIGH_CURRENT; - // Read out max_allowed_current to see max supported value for current_lim. // float current_lim = 70.0f; //[A] float current_lim = 10.0f; //[A]