Heater files
Dependents: LEX-Demo-Firmware-Logging LEX-Demo-Firmware-Logging
Diff: Heater.h
- Revision:
- 16:cd837b230b09
- Parent:
- 15:e7838491c104
- Child:
- 17:0bfed0e96927
diff -r e7838491c104 -r cd837b230b09 Heater.h --- a/Heater.h Wed Jul 24 09:47:45 2019 +0000 +++ b/Heater.h Wed Jul 24 14:29:44 2019 +0000 @@ -13,7 +13,7 @@ #define MEAS_DELAY 80 // measurement delay for ADC #define WAIT_DELAY 5 // wait delay for ADC -#define N_ROLL_AVG 3 // rolling average for R values +#define N_ROLL_AVG 1 // rolling average for R values #define ALL_CH 15 //value of convst bus to read all chanels simultaneosly #define Kd 0.5f //proportional gain #define Ki 1.0f //Integrator gain @@ -28,7 +28,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, PwmOut * drive, float corr_grad, float corr_int, float R_ref = 1); //Public member functions @@ -71,8 +71,8 @@ int i_port; int v_port; - PwmOut drive; - + PwmOut * drive; + //Heater correlations give temperature for a given resistance (assume linear relationship) float corr_grad; float corr_int;