Heater for threaded program

Dependents:   LEX_Threaded_Programming

Revision:
25:09a315a59956
Parent:
24:6debc2fb9ff3
Child:
26:f6c98b05ee85
--- a/Heater.h	Thu Aug 15 10:34:55 2019 +0000
+++ b/Heater.h	Mon Aug 19 07:55:38 2019 +0000
@@ -38,33 +38,28 @@
                  * @param * corr_int, the intercept of the linear relationship between resistance and temperature
                  * @param R_ref (default value 1), optional parameter sets the target value for R                 
         **/         
-        Heater(const int i_port, const int v_port, FastPWM * drive, FastPWM * guard, const float corr_grad, const float corr_int, float R_ref = 1);
+        Heater(const int i_port, const int v_port, FastPWM * drive, FastPWM * guard, const float corr_grad, const float corr_int, float R_ref = 0);
         
         //Public member functions
 
         void read();            //Updates the resistance and error values for the heater
-        void hold(const int hold_time);  //Holds R_ref for hold_time miliseconds
+        void update();  //Holds R_ref for hold_time miliseconds
         void ramp_R(const int ramp_time, const float R_final, const float R_start);   //Ramps for ramp_time miliseconds from R_start to R_final
-        void ramp_T(const int ramp_time, const float T_final, const float T_start);   //Same as above but with T (T is in degrees celcius)
         void output() const;  //Prints the current state of the heater
         void turn_on();     //Turns the heater on
         void turn_off();    //Turns the heater off
         
                 
-        //Linear conversions between temperature and resistance. Note that temperature is always in celcius
-        float R_to_T(const float R) const;
-        float T_to_R(const float T) const;
+
 
         
         
         //Getters and setters
-        void Set_T_ref(float T);
-        void Set_R_ref(float R);
+        void Set_ref(float R);
         void Set_D(float D);
         int Get_i() const;
         int Get_v() const;
         float Get_R() const;
-        float Get_T() const;
         
         
 
@@ -90,6 +85,7 @@
         //Heater correlations give temperature for a given resistance (assume linear relationship)
         const float corr_grad;
         const float corr_int;
+        int log_count;
       
 };