JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Revision:
47:124bc7d77d5a
Parent:
46:efa9285bf105
Child:
48:a72a8624bf2d
--- a/square_app.cpp	Fri Dec 18 13:06:26 2015 +0000
+++ b/square_app.cpp	Fri Dec 18 13:19:37 2015 +0000
@@ -26,9 +26,8 @@
    if ( p < 0.5f ) {
        this->analogOut->write(0);
     } else { this->analogOut->write(this->amplitude/2.95f);} 
-   float frequence;
-   frequence = 50.0f;
-   if ( frequence > 50.0f ) {
+    
+    if ( this->frequence > 50.0f ) {
        this->analogOut->write(0);
     } else { this->analogOut->write(this->amplitude/2.95f);}
 }