Heater files
Dependents: LEX-Demo-Firmware-Logging LEX-Demo-Firmware-Logging
Diff: Heater.cpp
- Revision:
- 21:085b53e06065
- Parent:
- 19:fccdd7127f94
diff -r e2a504521b46 -r 085b53e06065 Heater.cpp --- 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(); - } + }