mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 14:38:18 +08:00
update README
This commit is contained in:
@@ -45,7 +45,7 @@ static float elec_rad_per_enc = POLE_PAIRS * 2 * M_PI * (1.0f / (float)ENCODER_C
|
||||
// TODO: For nice encapsulation, consider not having the motor objects public
|
||||
Motor_t motors[] = {
|
||||
{ // M0
|
||||
.control_mode = CTRL_MODE_POSITION_CONTROL,
|
||||
.control_mode = CTRL_MODE_POSITION_CONTROL, //see: Motor_control_mode_t
|
||||
.enable_step_dir = false, //auto enabled after calibration
|
||||
.counts_per_step = 2.0f,
|
||||
.error = ERROR_NO_ERROR,
|
||||
@@ -108,7 +108,7 @@ Motor_t motors[] = {
|
||||
.timing_log = {0}
|
||||
},
|
||||
{ // M1
|
||||
.control_mode = CTRL_MODE_POSITION_CONTROL,
|
||||
.control_mode = CTRL_MODE_POSITION_CONTROL, //see: Motor_control_mode_t
|
||||
.enable_step_dir = false, //auto enabled after calibration
|
||||
.counts_per_step = 2.0f,
|
||||
.error = ERROR_NO_ERROR,
|
||||
|
||||
@@ -54,6 +54,10 @@ An upcoming feature will enable automatic tuning. Until then, here is a rough tu
|
||||
* Back down `pos_gain` until you do not have overshoot anymore.
|
||||
* The integrator is not easily tuned, nor is it strictly required. Tune at your own discression.
|
||||
|
||||
### Optional parameters
|
||||
By default both motors are enabled, and the default control mode is position control.
|
||||
If you want a different mode, you can change `.control_mode`. To disable a motor, set `.enable_control` and `.do_calibration` to false.
|
||||
|
||||
## Compiling and downloading firmware
|
||||
|
||||
### Getting a programmer
|
||||
|
||||
Reference in New Issue
Block a user