Motacon_20200317

Revision:
7:fb9e3b508237
Parent:
6:959e725b6be9
--- a/BLDCmotorDriver.h	Sat Mar 14 00:56:54 2020 +0000
+++ b/BLDCmotorDriver.h	Tue Mar 17 05:11:00 2020 +0000
@@ -6,6 +6,7 @@
         BLDCmotorDriver(PinName GH_A, PinName GL_A, PinName GH_B, PinName GL_B, PinName GH_C, PinName GL_C, PinName h1, PinName h2, PinName h3, PinName Fault);    
         void configure(float sampleTime, float switchingFrequency, float rampUpSlope, float rampDownSlope);
         void setDutyCycle(float dutyCycle);
+        void setDirection(float direction); //方向決定スイッチ
         void coast();
         float getDutyCycle();
         int getSector();
@@ -20,6 +21,7 @@
         RateLimiter rl;
         Ticker ticker;
         float switchingPeriod, dutyCycle, tempDutyCycle, sampleTime;
+        int direction;
         void commutation();
         int currentSector, _currentSector, previousSector, difference;
         DigitalOut Fault;