Heater for threaded program
Dependents: LEX_Threaded_Programming
Diff: Heater.h
- Revision:
- 9:405e86b02d63
- Parent:
- 8:5da71ae16115
diff -r 5da71ae16115 -r 405e86b02d63 Heater.h --- a/Heater.h Fri Jul 19 10:31:38 2019 +0000 +++ b/Heater.h Fri Jul 19 14:27:26 2019 +0000 @@ -13,6 +13,7 @@ #define MEAS_DELAY 500 // measurement delay for ADC #define N_ROLL_AVG 10 // rolling average for R values #define ALL_CH 15 //value of convst bus to read all chanels simultaneosly +#define Gain 47*10^-6 class Heater { @@ -24,7 +25,7 @@ * @param drive, the motor drive * @param R_ref, the target value for R */ - Heater(int i_port, int v_port, DigitalOut drive, float corr_grad, float corr_int, float R_ref = 1); + Heater(int i_port, int v_port, PwmOut drive, float corr_grad, float corr_int, float R_ref = 1); //Public member functions @@ -50,6 +51,7 @@ void turn_on(); void turn_off(); + PwmOut drive; @@ -63,7 +65,6 @@ int i_port; int v_port; - DigitalOut drive; //Heater correlations give temperature for a given resistance (assume linear relationship) float corr_grad;