mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-21 15:34:33 +08:00
change HW version to v3.4
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -108,8 +108,8 @@ const Endpoint endpoints[] = {
|
||||
Endpoint::make_property("calibration_current", &motors[0].calibration_current),
|
||||
Endpoint::make_property("phase_inductance", const_cast<const float*>(&motors[0].phase_inductance)),
|
||||
Endpoint::make_property("phase_resistance", const_cast<const float*>(&motors[0].phase_resistance)),
|
||||
Endpoint::make_property("current_meas.phB", const_cast<const float*>(&motors[0].current_meas.phB)),
|
||||
Endpoint::make_property("current_meas.phC", const_cast<const float*>(&motors[0].current_meas.phC)),
|
||||
Endpoint::make_property("current_meas_phB", const_cast<const float*>(&motors[0].current_meas.phB)),
|
||||
Endpoint::make_property("current_meas_phC", const_cast<const float*>(&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<const float*>(&motors[1].phase_inductance)),
|
||||
Endpoint::make_property("phase_resistance", const_cast<const float*>(&motors[1].phase_resistance)),
|
||||
Endpoint::make_property("current_meas.phB", const_cast<const float*>(&motors[1].current_meas.phB)),
|
||||
Endpoint::make_property("current_meas.phC", const_cast<const float*>(&motors[1].current_meas.phC)),
|
||||
Endpoint::make_property("current_meas_phB", const_cast<const float*>(&motors[1].current_meas.phB)),
|
||||
Endpoint::make_property("current_meas_phC", const_cast<const float*>(&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),
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user