瀏覽代碼

Перенёс байт конфигурации декодирования симовлов в define

Vladimir N. Shilov 9 年之前
父節點
當前提交
366abed223
共有 1 個文件被更改,包括 25 次插入23 次删除
  1. 25 23
      include/configuration.h

+ 25 - 23
include/configuration.h

@@ -21,34 +21,36 @@
 #define DHT_PIN 2
 
 // MAX7219
-#define PIN_DIN		14
-#define PIN_CLK		13
-#define PIN_LOAD	12
-#define MAX7219_DIGITS	8
+#define PIN_DIN                 14
+#define PIN_CLK                 13
+#define PIN_LOAD                12
+#define MAX7219_DIGITS          8
+#define MAX7219_DIG_MASK        0x7B
+// ^^ reverse of -- 11011 110 -- без BCD декодирования 2, 7
 
 #define CLOCK_CONFIG_FILE ".clock.conf" // leading point for security reasons :)
 
 struct ClockConfig
 {
-  ClockConfig ()
-  {
-    AddTZ = 2;
-    LightTrhLow = 341;
-    LightTrhHigh = 683;
-    BrightnessLow = 1;
-    BrightnessMiddle = 7;
-    BrightnessHigh = 15;
-  }
-
-  String NetworkSSID;
-  String NetworkPassword;
-
-  float AddTZ; // TimeZone - local time offset
-  uint16_t LightTrhLow; // Low Light level
-  uint16_t LightTrhHigh; // High Light level
-  int8_t BrightnessLow; // Low LED brightness level
-  int8_t BrightnessMiddle; // Middle LED brightness level
-  int8_t BrightnessHigh; // High LED brightness level
+    ClockConfig ()
+    {
+        AddTZ = 2;
+        LightTrhLow = 341;
+        LightTrhHigh = 683;
+        BrightnessLow = 1;
+        BrightnessMiddle = 7;
+        BrightnessHigh = 15;
+    }
+
+    String NetworkSSID;
+    String NetworkPassword;
+
+    float AddTZ; // TimeZone - local time offset
+    uint16_t LightTrhLow; // Low Light level
+    uint16_t LightTrhHigh; // High Light level
+    int8_t BrightnessLow; // Low LED brightness level
+    int8_t BrightnessMiddle; // Middle LED brightness level
+    int8_t BrightnessHigh; // High LED brightness level
 };
 
 ClockConfig