JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Revision:
45:e03bac876518
Parent:
44:913bd7824dae
Child:
48:a72a8624bf2d
--- a/constant_app.cpp	Thu Dec 17 16:37:43 2015 +0000
+++ b/constant_app.cpp	Fri Dec 18 11:43:11 2015 +0000
@@ -2,14 +2,19 @@
 
 ConstantApp::ConstantApp(Serial* serial) : App("Constant Voltage", serial) {
     this->analogOut = new AnalogOut (PA_4);
-    this->amplitude = 3.0f;
+    this->amplitude = 2.95f;
 }
 
 void ConstantApp::start()
 {
     App::start();
-    this->analogOut->write(this->amplitude/3.0f);
+    this->analogOut->write(this->amplitude/2.95f);
     this->timer.start();
+
+}
+
+void ConstantApp::run()
+{
     float amplitude;
     amplitude = 2.95;
     if ( amplitude > 2.95f ) {
@@ -18,11 +23,6 @@
 
 }
 
-void ConstantApp::run()
-{
-   
-}
-
 void ConstantApp::stop()
 {
     App::stop();