Stm32Workshop fork commit

Dependencies:   BufferedSerial X_NUCLEO_IHM01A1 mbed

Fork of Stepper_Matlab_Control by Arkadi Rafalovich

Files at this revision

API Documentation at this revision

Comitter:
STM32Workshop
Date:
Mon Jul 25 13:29:26 2016 +0000
Parent:
2:20308d48e34d
Commit message:
Fixes due to library update

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jul 25 09:21:34 2016 +0000
+++ b/main.cpp	Mon Jul 25 13:29:26 2016 +0000
@@ -52,8 +52,8 @@
 // Stepper Variables:
 #define STEPS2ROTATION 3200.0f // 200 steps rotation 16 microsteps
 /* Initialization parameters. */
-// not sure if it acctually uses it
-L6474_InitTypeDef init =
+/* Initialization parameters of the motor connected to the expansion board. */
+L6474_Init_t init =
 {
     50,                              /* Acceleration rate in step/s2. Range: (0..+inf). */
     50,                              /* Deceleration rate in step/s2. Range: (0..+inf). */
@@ -142,7 +142,7 @@
     // Disabling motor
     StepperMotor->Disable();
     /* Changing step mode. */
-    StepperMotor->SetStepMode(STEP_MODE_1_16);
+    StepperMotor->SetStepMode((StepperMotor::step_mode_t) STEP_MODE_1_16);
     /* Increasing the torque regulation current to 500mA. */
     StepperMotor->SetParameter(L6474_TVAL, 500);