Heater for threaded program

Dependents:   LEX_Threaded_Programming_V3

Revision:
42:166d9bc7675e
Parent:
35:5acf01897ed6
Child:
45:5f588512529b
--- a/Heater.h	Mon Oct 14 14:15:51 2019 +0000
+++ b/Heater.h	Thu Oct 17 10:29:13 2019 +0000
@@ -36,10 +36,11 @@
    //Getters and setters
     void Set_ref(float R);
     void Set_D(float D);
-    int Get_D() const;
+    float Get_D() const;
     int Get_i() const;
     int Get_v() const;
     float Get_R() const;
+    float Get_R_avg();
     float Get_R_ref() const;
     float Get_error() const;
     float Get_error_integrated() const;
@@ -50,6 +51,9 @@
     int curr;               //Latest current reading from ADC
     int v;                  //Latest voltage reading from ADC
     float R;                //Latest resistance calculated from ADC current and voltage
+    float R_avg;            //Average resitance since last log event
+    float R_acc;            //Accumulated sum of resistance vaules since last log event
+    int n_acc;              //Number of resistance measurements since last log event
     float R_ref;            //Current referance for resistance
     float error;            //R_ref - R
     float error_integrated; //Integrated error