JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Revision:
38:8d1e47006b2c
Parent:
37:83b729ea17d4
Child:
40:ca1789c40924
--- a/square_app.cpp	Thu Dec 17 13:52:37 2015 +0000
+++ b/square_app.cpp	Thu Dec 17 13:59:46 2015 +0000
@@ -17,9 +17,9 @@
 {
    float p;
    p = (20.0f*timer.read())-floor(20.0f*timer.read());
-   if ( p < 0.5) {
+   if ( p < 0.5f ) {
        this->analogOut->write(0);
-    } else { this->analogOut->write(this->amplitude/3.0);} 
+    } else { this->analogOut->write(this->amplitude/3.0f);} 
 }
 
 void SquareApp::stop()