Heater for threaded program

Dependents:   LEX_Threaded_Programming

Revision:
22:085b53e06065
Parent:
19:fccdd7127f94
--- a/Heater.cpp	Tue Aug 06 12:46:10 2019 +0000
+++ b/Heater.cpp	Tue Aug 06 14:13:40 2019 +0000
@@ -29,7 +29,7 @@
 void Heater::output()const
 {
     //Prints the current state to the terminal
-    pc.printf("%d,%f,%f,%f,%f,%f\n",timer.read_ms(),R_ref,R,error,error_integrated,drive->read());
+    pc.printf("%d,%f,%f,%f,%f,%f\n",log_count,R_ref,R,error,error_integrated,drive->read());
 }
 
 void Heater::read()
@@ -74,11 +74,7 @@
     
     //Output the error every LOG_LIM reads
     log_count++;
-    if (log_count >= LOG_LIM)
-    {
-    log_count = 0;
-    output();
-    }
+
 }