Default brake R depends on board voltage due to how ODrive Robotics bundle included resistors

This commit is contained in:
Oskar Weigl
2018-06-08 21:46:04 -07:00
parent e52dc0732a
commit f3c91cef02
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
"USE_HAL_DRIVER",
"HW_VERSION_MAJOR=3",
"HW_VERSION_MINOR=5",
"HW_VERSION_VOLTAGE=48",
"HW_VERSION_VOLTAGE=24",
"__weak=\"__attribute__((weak))\"",
"__packed=\"__attribute__((__packed__))\"",
"__GNUC__"
+4
View File
@@ -60,7 +60,11 @@ struct BoardConfig_t {
bool enable_uart = true;
bool enable_i2c_instead_of_can = false;
bool enable_ascii_protocol_on_usb = true;
#if HW_VERSION_MAJOR == 3 && HW_VERSION_MINOR >= 5 && HW_VERSION_VOLTAGE >= 48
float brake_resistance = 2.0f; // [ohm]
#else
float brake_resistance = 0.47f; // [ohm]
#endif
float dc_bus_undervoltage_trip_level = 8.0f; //<! [V] minimum voltage below which the motor stops operating
float dc_bus_overvoltage_trip_level = 1.08f * HW_VERSION_VOLTAGE; //<! [V] maximum voltage above which the motor stops operating.
//<! This protects against cases in which the power supply fails to dissipate