/[ThermoControl]/trunk/libThermoControl/Configuration.cs
ViewVC logotype

Diff of /trunk/libThermoControl/Configuration.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libThermoControl/Configuration.cs	2013/11/13 03:08:55	25
+++ trunk/libThermoControl/Configuration.cs	2013/11/13 03:39:04	26
@@ -17,8 +17,17 @@
         
         
         public static int CurrentTemp { get { return ReadTemp(); } set { WriteTemp(value); } }
-
         public static int ExternalTemp { get { return GetExternalTemp(); } }
+        public static int GetTemperatureAdjustment()
+        {
+            int e_temp = Configuration.ExternalTemp;
+            int d_temp = Configuration.DEFAULT_TEMP;
+            int scale = 5;
+            int s = (d_temp - e_temp) / scale;
+            int offset = 2;
+            int t = (d_temp + s) - offset;
+            return t;
+        }
 
         public static readonly string WEATHER_URL = ""; // 60
         public static readonly string THERMISTAT_DEVICE = ""; // 60
@@ -128,7 +137,7 @@
                             int k = Convert.ToInt32(t.Tag);
                             temp = k;
                         }
-                        catch (Exception ex)
+                        catch (Exception)
                         {
                             temp = 0;
                         }

 

  ViewVC Help
Powered by ViewVC 1.1.22