From 03c7c1d43cab6abb28d20c8d3bf92bc8aea81ea7 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Thu, 10 May 2018 14:48:48 -0700 Subject: [PATCH] restore default config values --- Firmware/MotorControl/encoder.hpp | 2 +- Firmware/MotorControl/motor.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firmware/MotorControl/encoder.hpp b/Firmware/MotorControl/encoder.hpp index 34fc14d7..60299dca 100644 --- a/Firmware/MotorControl/encoder.hpp +++ b/Firmware/MotorControl/encoder.hpp @@ -30,7 +30,7 @@ public: // In this case the encoder will enter ready // state as soon as the index is found. float idx_search_speed = 10.0f; // [rad/s electrical] - int32_t cpr = 72; //(2048 * 4); // Default resolution of CUI-AMT102 encoder, + int32_t cpr = (2048 * 4); // Default resolution of CUI-AMT102 encoder, int32_t offset = 0; // If pre_calibrated is true, this is copied into encoder.offset_ once // index search succeeds float offset_float = 0.0f; // Sub-count phase alignment offset diff --git a/Firmware/MotorControl/motor.hpp b/Firmware/MotorControl/motor.hpp index 182817d0..961c05ce 100644 --- a/Firmware/MotorControl/motor.hpp +++ b/Firmware/MotorControl/motor.hpp @@ -37,9 +37,9 @@ typedef struct { // example: current_lim and calibration_current will instead determine the maximum voltage applied to the motor. typedef struct { bool pre_calibrated = false; // can be set to true to indicate that all values here are valid - int32_t pole_pairs = 12; - float calibration_current = 6.0f; // [A] - float resistance_calib_max_voltage = 2.0f; // [V] - You may need to increase this if this voltage isn't sufficient to drive calibration_current through the motor. + int32_t pole_pairs = 7; + float calibration_current = 10.0f; // [A] + float resistance_calib_max_voltage = 1.0f; // [V] - You may need to increase this if this voltage isn't sufficient to drive calibration_current through the motor. float phase_inductance = 0.0f; // to be set by measure_phase_inductance float phase_resistance = 0.0f; // to be set by measure_phase_resistance int32_t direction = 1; // 1 or -1 @@ -48,7 +48,7 @@ typedef struct { // Read out max_allowed_current to see max supported value for current_lim. // You can change DRV8301_ShuntAmpGain to get a different range. // float current_lim = 75.0f; //[A] - float current_lim = 6.0f; //[A] + float current_lim = 10.0f; //[A] } MotorConfig_t; class Motor {