From f301d3cac404dd1f31adf6ebe7c96ae2b48a4f00 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Sun, 10 Dec 2017 16:16:35 -0800 Subject: [PATCH] change HW version to v3.4 --- Firmware/Inc/main.h | 2 +- Firmware/MotorControl/commands.cpp | 8 ++++---- Firmware/MotorControl/low_level.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Firmware/Inc/main.h b/Firmware/Inc/main.h index 911d81fe..ef2b2734 100644 --- a/Firmware/Inc/main.h +++ b/Firmware/Inc/main.h @@ -53,7 +53,7 @@ /* USER CODE BEGIN Includes */ #define HW_VERSION_MAJOR 3 -#define HW_VERSION_MINOR 3 +#define HW_VERSION_MINOR 4 #if HW_VERSION_MAJOR == 3 && HW_VERSION_MINOR == 1 \ || HW_VERSION_MAJOR == 3 && HW_VERSION_MINOR == 2 diff --git a/Firmware/MotorControl/commands.cpp b/Firmware/MotorControl/commands.cpp index 77febe2c..54031438 100644 --- a/Firmware/MotorControl/commands.cpp +++ b/Firmware/MotorControl/commands.cpp @@ -108,8 +108,8 @@ const Endpoint endpoints[] = { Endpoint::make_property("calibration_current", &motors[0].calibration_current), Endpoint::make_property("phase_inductance", const_cast(&motors[0].phase_inductance)), Endpoint::make_property("phase_resistance", const_cast(&motors[0].phase_resistance)), - Endpoint::make_property("current_meas.phB", const_cast(&motors[0].current_meas.phB)), - Endpoint::make_property("current_meas.phC", const_cast(&motors[0].current_meas.phC)), + Endpoint::make_property("current_meas_phB", const_cast(&motors[0].current_meas.phB)), + Endpoint::make_property("current_meas_phC", const_cast(&motors[0].current_meas.phC)), Endpoint::make_property("DC_calib.phB", &motors[0].DC_calib.phB), Endpoint::make_property("DC_calib.phC", &motors[0].DC_calib.phC), Endpoint::make_property("shunt_conductance", &motors[0].shunt_conductance), @@ -161,8 +161,8 @@ const Endpoint endpoints[] = { Endpoint::make_property("calibration_current", &motors[1].calibration_current), Endpoint::make_property("phase_inductance", const_cast(&motors[1].phase_inductance)), Endpoint::make_property("phase_resistance", const_cast(&motors[1].phase_resistance)), - Endpoint::make_property("current_meas.phB", const_cast(&motors[1].current_meas.phB)), - Endpoint::make_property("current_meas.phC", const_cast(&motors[1].current_meas.phC)), + Endpoint::make_property("current_meas_phB", const_cast(&motors[1].current_meas.phB)), + Endpoint::make_property("current_meas_phC", const_cast(&motors[1].current_meas.phC)), Endpoint::make_property("DC_calib.phB", &motors[1].DC_calib.phB), Endpoint::make_property("DC_calib.phC", &motors[1].DC_calib.phC), Endpoint::make_property("shunt_conductance", &motors[1].shunt_conductance), diff --git a/Firmware/MotorControl/low_level.c b/Firmware/MotorControl/low_level.c index 06e3e1ad..3f906834 100644 --- a/Firmware/MotorControl/low_level.c +++ b/Firmware/MotorControl/low_level.c @@ -636,8 +636,8 @@ void pwm_trig_adc_cb(ADC_HandleTypeDef* hadc, bool injected) { // TODO check Ibeta balance to verify good motor connection bool measure_phase_resistance(Motor_t* motor, float test_current, float max_voltage) { - static const float kI = 10.0f; //[(V/s)/A] - static const int num_test_cycles = 3.0f / CURRENT_MEAS_PERIOD; // Test runs for 3s + static const float kI = 10.0f; // [(V/s)/A] + static const int num_test_cycles = 3.0f / CURRENT_MEAS_PERIOD; // Test runs for 3s float test_voltage = 0.0f; for (int i = 0; i < num_test_cycles; ++i) { osEvent evt = osSignalWait(M_SIGNAL_PH_CURRENT_MEAS, PH_CURRENT_MEAS_TIMEOUT);