Controlls of IHM01A1 by Joystick shield

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IHM01A1 by ST

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Tue Dec 01 13:54:37 2015 +0000
Parent:
12:9f4b9540ff3e
Child:
14:73823a4344be
Commit message:
+ Modified SoftStop() and HardStop() to not to disable the power bridge;; + Added SoftHiz() and HardHiz() to disable the power bridge.

Changed in this revision

Components/Interfaces/StepperMotor_class.h Show annotated file Show diff for this revision Revisions of this file
Components/l6474/l6474_class.cpp Show annotated file Show diff for this revision Revisions of this file
Components/l6474/l6474_class.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/Interfaces/StepperMotor_class.h	Fri Nov 27 11:25:21 2015 +0000
+++ b/Components/Interfaces/StepperMotor_class.h	Tue Dec 01 13:54:37 2015 +0000
@@ -221,20 +221,34 @@
     virtual void Move(direction_t direction, unsigned int steps) = 0;
 
     /**
-     * @brief  Stopping the motor.
+     * @brief  Stopping the motor through an immediate deceleration up to zero speed.
      * @param  None.
      * @retval None.
      */
     virtual void SoftStop(void) = 0;
 
     /**
-     * @brief  Stopping the motor and disabling the power bridge.
+     * @brief  Stopping the motor through an immediate infinite deceleration.
      * @param  None.
      * @retval None.
      */
     virtual void HardStop(void) = 0;
 
     /**
+     * @brief  Disabling the power bridge after performing a deceleration to zero.
+     * @param  None.
+     * @retval None.
+     */
+    virtual void SoftHiZ(void) = 0;
+
+    /**
+     * @brief  Disabling the power bridge immediately.
+     * @param  None.
+     * @retval None.
+     */
+    virtual void HardHiZ(void) = 0;
+
+    /**
      * @brief  Waiting while the motor is active.
      * @param  None.
      * @retval None.
--- a/Components/l6474/l6474_class.cpp	Fri Nov 27 11:25:21 2015 +0000
+++ b/Components/l6474/l6474_class.cpp	Tue Dec 01 13:54:37 2015 +0000
@@ -301,9 +301,6 @@
   /* Disable corresponding PWM */
   L6474_PwmStop();
 
-  /* Disable power stage */
-  L6474_CmdDisable();
-
   /* Set inactive state */
   devicePrm.motionState = INACTIVE;
   devicePrm.commandExecuted = NO_CMD;
--- a/Components/l6474/l6474_class.h	Fri Nov 27 11:25:21 2015 +0000
+++ b/Components/l6474/l6474_class.h	Tue Dec 01 13:54:37 2015 +0000
@@ -445,7 +445,7 @@
     }
 
     /**
-     * @brief  Stopping the motor.
+     * @brief  Stopping the motor through an immediate deceleration up to zero speed.
      * @param  None.
      * @retval None.
      */
@@ -455,7 +455,7 @@
     }
 
     /**
-     * @brief  Stopping the motor and disabling the power bridge.
+     * @brief  Stopping the motor through an immediate infinite deceleration.
      * @param  None.
      * @retval None.
      */
@@ -465,6 +465,28 @@
     }
 
     /**
+     * @brief  Disabling the power bridge after performing a deceleration to zero.
+     * @param  None.
+     * @retval None.
+     */
+    virtual void SoftHiZ(void)
+    {
+        L6474_SoftStop();
+        L6474_CmdDisable();
+    }
+
+    /**
+     * @brief  Disabling the power bridge immediately.
+     * @param  None.
+     * @retval None.
+     */
+    virtual void HardHiZ(void)
+    {
+        L6474_HardStop();
+        L6474_CmdDisable();
+    }
+
+    /**
      * @brief  Waiting while the motor is active.
      * @param  None.
      * @retval None.