Ryusuke Ihashi / A3921_2p

Files at this revision

API Documentation at this revision

Comitter:
Ryu_25_MIC_512
Date:
Tue Apr 05 16:56:25 2022 +0000
Parent:
2:918eefae7a4e
Commit message:
update code

Changed in this revision

A3921_2p.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/A3921_2p.cpp	Thu Jul 15 14:33:02 2021 +0000
+++ b/A3921_2p.cpp	Tue Apr 05 16:56:25 2022 +0000
@@ -51,7 +51,7 @@
     if(t > period)t = period;       //周期を超えないように制限
     else if(t < -period)t = -period;//周期を超えないように制限
     
-    duty = int(1000.0 * (t/period));//Duty比を計算
+    duty = int(1000.0f * (t/period));//Duty比を計算
     
     if(t < 0.0f){                   //マイナスだったらfalse
         sign = false;