Heater files
Dependents: LEX-Demo-Firmware-Logging LEX-Demo-Firmware-Logging
Diff: Heater.cpp
- Revision:
- 13:8629d78fd93b
- Parent:
- 11:785a0329f802
diff -r 785a0329f802 -r 8629d78fd93b Heater.cpp --- a/Heater.cpp Tue Jul 23 08:04:51 2019 +0000 +++ b/Heater.cpp Tue Jul 23 10:06:17 2019 +0000 @@ -19,7 +19,7 @@ -Heater::Heater(int i_port, int v_port, DigitalOut drive, float corr_grad, float corr_int, float R_ref) +Heater::Heater(int i_port, int v_port, PwmOut drive, float corr_grad, float corr_int, float R_ref) :R_ref(R_ref),i_port(i_port),v_port(v_port),drive(drive),corr_grad(corr_grad),corr_int(corr_int) {} float Heater::R_to_T(float R) {return R*corr_grad + corr_int;} @@ -57,7 +57,7 @@ //if (curr > 0) {R = (float)v/curr;} //Avoid dividing by 0 R = (float)v/curr; log_count++; - if (log_count > 0) + if (log_count > 200) { log_count = 0; output();