Use BCDMotor_class.h instead of motor_class.h

Dependencies:   X_NUCLEO_IHM04A1 mbed

Fork of HelloWorld_IHM04A1 by ST Expansion SW Team

Revision:
5:1585f7f83cce
Parent:
1:4d9b9123d9e1
diff -r dae3d62ad7b4 -r 1585f7f83cce main.cpp
--- a/main.cpp	Tue May 17 12:56:07 2016 +0000
+++ b/main.cpp	Tue Jun 14 12:14:45 2016 +0000
@@ -112,7 +112,7 @@
   /* Code to be customised */
   /************************/
   /* Get the state of bridge A */
-  uint16_t bridgeState  = motor->CmdGetStatus(0);
+  uint16_t bridgeState  = motor->GetBridgeStatus(0);
   
   if (bridgeState == 0) 
   {
@@ -126,7 +126,7 @@
   }
   
   /* Get the state of bridge B */
-  bridgeState  = motor->CmdGetStatus(1);
+  bridgeState  = motor->GetBridgeStatus(1);
   
   if (bridgeState == 0) 
   {
@@ -212,46 +212,46 @@
         {
             printf("Run motor 0 at 20%% of the maximum speed\n");
             /* Set speed of motor 0 to 20% */
-            motor->SetMaxSpeed(0,20);
+            motor->SetSpeed(0,20);
             /* start motor 0 */
-            motor->Run(0, FORWARD);
+            motor->Run(0, BDCMotor::FWD);
         }
 
         if (gStep > 1)
         {
             printf("Run motor 1 at 30%% of the maximum speed\n");
             /* Set speed of motor 1 to 30 % */
-            motor->SetMaxSpeed(1,30);
+            motor->SetSpeed(1,30);
             /* start motor 1 */
-            motor->Run(1, FORWARD);
+            motor->Run(1, BDCMotor::FWD);
         }
 
         if (gStep > 2)
         {
             printf("Run motor 2 at 40%% of the maximum speed\n");
             /* Set speed of motor 2 to 40 % */
-            motor->SetMaxSpeed(2,40);
+            motor->SetSpeed(2,40);
             /* start motor 2 */
-            motor->Run(2, FORWARD);
+            motor->Run(2, BDCMotor::FWD);
         }
 
         if (gStep > 3)
         {
             printf("Run motor 3 at 50%% of the maximum speed\n");
             /* Set speed of motor 3 to 50 % */
-            motor->SetMaxSpeed(3,50);
+            motor->SetSpeed(3,50);
             /* start motor 3 */
-            motor->Run(3, FORWARD);      
+            motor->Run(3, BDCMotor::FWD);      
         }
 
         if (gStep > 0)
         {
             wait_ms(1000);
         
-            motor->CmdHardHiZ(0);   
-            motor->CmdHardHiZ(1);   
-            motor->CmdHardHiZ(2);   
-            motor->CmdHardHiZ(3);
+            motor->HardHiZ(0);   
+            motor->HardHiZ(1);   
+            motor->HardHiZ(2);   
+            motor->HardHiZ(3);
             
             wait_ms(1000);
         }