diff --git a/App/BlinkPort.h b/App/BlinkPort.h index 3c8aad95..b6e88b7b 100644 --- a/App/BlinkPort.h +++ b/App/BlinkPort.h @@ -8,7 +8,7 @@ class BlinkPort { private: - int _tid; + uint _tid; public: OutputPort* Ports[0x10]; diff --git a/Config.cpp b/Config.cpp index 3c6b6632..b1bac6d0 100644 --- a/Config.cpp +++ b/Config.cpp @@ -2,12 +2,12 @@ //TConfig Config; -// 初始化,各字段为0 -void TConfig::Init() +// 初始化 +TConfig::TConfig() { // 实际内存大小,减去头部大小 - uint len = sizeof(this) - (int)&Length - (int)this; - memset(&Length, 0, len); + uint len = sizeof(this) - ((int)&Length - (int)this); + //memset(&Length, 0, len); Length = len; } diff --git a/Config.h b/Config.h index cb850e45..c8368be6 100644 --- a/Config.h +++ b/Config.h @@ -30,7 +30,7 @@ public: ushort SleepTime; // 睡眠时间。秒 // 初始化,各字段为0 - void Init(); + TConfig(); void LoadDefault(); };