Dependencies:   IAP

Revision:
4:4060309b9cc0
Parent:
2:59ac9df97701
Child:
8:1db19b529b22
--- a/SoftPWM/SoftPWM.cpp	Thu Feb 13 16:07:07 2014 +0000
+++ b/SoftPWM/SoftPWM.cpp	Tue Oct 14 08:15:03 2014 +0000
@@ -16,16 +16,16 @@
 
 float SoftPWM::read()
 {
-    if ( width <= 0.0 ) return 0.0;
-    if ( width > 1.0 )  return 1.0;
+    if ( width <= 0.0f ) return 0.0;
+    if ( width > 1.0f )  return 1.0;
     return width / interval;    
 }
 
 void SoftPWM::write(float duty)
 {
     width = interval * duty;
-    if ( duty <= 0.0 ) width =  0.0;
-    if ( duty > 1.0 )  width =  interval;
+    if ( duty <= 0.0f ) width =  0.0;
+    if ( duty > 1.0f )  width =  interval;
 }
 
 void SoftPWM::start()
@@ -64,7 +64,7 @@
 void SoftPWM::pulsewidth(float _width)
 {
     width = _width;
-   if ( width < 0.0 ) width = 0.0;
+   if ( width < 0.0f ) width = 0.0;
 }
 
 void SoftPWM::pulsewidth_ms(int _width)