diff --git a/MotorControl/low_level.c b/MotorControl/low_level.c index 14adaf6a..aa553f9d 100755 --- a/MotorControl/low_level.c +++ b/MotorControl/low_level.c @@ -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, diff --git a/README.md b/README.md index 5bcdc98e..e37e9292 100644 --- a/README.md +++ b/README.md @@ -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