mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-19 14:08:38 +08:00
fix board voltage version being ignored
This commit is contained in:
@@ -167,10 +167,12 @@
|
||||
#define CURRENT_MEAS_PERIOD ((float)(2*TIM_1_8_PERIOD_CLOCKS)/(float)TIM_1_8_CLOCK_HZ)
|
||||
#define CURRENT_MEAS_HZ (TIM_1_8_CLOCK_HZ/(2*TIM_1_8_PERIOD_CLOCKS))
|
||||
|
||||
#ifdef HW_VERSION_HIGH_VOLTAGE
|
||||
#if HW_VERSION_VOLTAGE == 48
|
||||
#define VBUS_S_DIVIDER_RATIO 19.0f
|
||||
#else
|
||||
#elif HW_VERSION_VOLTAGE == 24
|
||||
#define VBUS_S_DIVIDER_RATIO 11.0f
|
||||
#else
|
||||
#error "unknown board voltage"
|
||||
#endif
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
Reference in New Issue
Block a user