/[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	2014/02/12 03:22:55	28
@@ -17,16 +17,25 @@
         
         
         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.CurrentTemp;
+            int scale = 5;
+            int s = (d_temp - e_temp) / scale;
+            int offset = 4;
+            int t = (d_temp + s) - offset;
+            return t;
+        }
 
-        public static readonly string WEATHER_URL = ""; // 60
-        public static readonly string THERMISTAT_DEVICE = ""; // 60
+        public static readonly string WEATHER_URL = "http://www.accuweather.com/en/us/chattanooga-tn/37421/current-weather/331086"; // 60
+        public static readonly string THERMISTAT_DEVICE = "AC_THERMOSTAT"; // 60
         public static readonly int MIN_TEMP = 0; // 60
         public static readonly int MAX_TEMP = 0; // 90
         public static readonly int DEFAULT_TEMP = 0; // 70
-        public static readonly string DEFAULT_MODE = ""; // cool
-        public static readonly string DEFAULT_FAN_SPEED = ""; // auto_fan
+        public static readonly string DEFAULT_MODE = "cool"; // cool
+        public static readonly string DEFAULT_FAN_SPEED = "auto_fan"; // auto_fan
 
         [Conditional("CONFIG_UNITTEST")]
         public static void UnitTest()
@@ -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