Sets ticks directly for heater test
Diff: Heater.h
- Revision:
- 8:5da71ae16115
- Parent:
- 7:59ece353eea2
- Child:
- 9:405e86b02d63
- Child:
- 10:0e16d8430d66
diff -r 59ece353eea2 -r 5da71ae16115 Heater.h --- a/Heater.h Fri Jul 19 09:22:47 2019 +0000 +++ b/Heater.h Fri Jul 19 10:31:38 2019 +0000 @@ -10,8 +10,8 @@ #include "mbed.h" #include "ADS8568_ADC.h" -#define MEAS_DELAY 100 // measurement delay for ADC -#define N_ROLL_AVG 2 // rolling average for R values +#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 class Heater @@ -24,7 +24,7 @@ * @param drive, the motor drive * @param R_ref, the target value for R */ - Heater(int i_port, int v_port, PwmOut drive, float corr_grad, float corr_int, float R_ref = 1); + Heater(int i_port, int v_port, DigitalOut drive, float corr_grad, float corr_int, float R_ref = 1); //Public member functions @@ -50,8 +50,6 @@ void turn_on(); void turn_off(); - float check_D (); - @@ -65,7 +63,7 @@ int i_port; int v_port; - PwmOut drive; + DigitalOut drive; //Heater correlations give temperature for a given resistance (assume linear relationship) float corr_grad; @@ -73,4 +71,5 @@ }; -#endif \ No newline at end of file +#endif + \ No newline at end of file