diff --git a/examples/knx-bme680/knx-bme680.ino b/examples/knx-bme680/knx-bme680.ino index 4dbcadc..cf26b2f 100644 --- a/examples/knx-bme680/knx-bme680.ino +++ b/examples/knx-bme680/knx-bme680.ino @@ -1,6 +1,8 @@ #include #include +#ifdef ARDUINO_ARCH_ESP8266 #include +#endif // create named references for easy access to group objects @@ -44,8 +46,10 @@ void setup(void) delay(5000); Serial.println("start"); + #ifdef ARDUINO_ARCH_ESP8266 WiFiManager wifiManager; wifiManager.autoConnect("knx-bme680"); + #endif // read adress table, association table, groupobject table and parameters from eeprom knx.readMemory(); diff --git a/src/knx/dptconvert.cpp b/src/knx/dptconvert.cpp index 8e745e5..8b55c61 100644 --- a/src/knx/dptconvert.cpp +++ b/src/knx/dptconvert.cpp @@ -743,7 +743,7 @@ int busValueToDateTime(const uint8_t* payload, int payload_length, const Dpt& da if (bitFromPayload(payload, 53)) return false; - value = (unsigned8FromPayload(payload, 3) >> 5) & 0x07; + value.ucharValue((unsigned8FromPayload(payload, 3) >> 5) & 0x07); return true; } case 2: @@ -837,10 +837,10 @@ int busValueToVersion(const uint8_t* payload, int payload_length, const Dpt& dat switch (datatype.index) { case 0: - value = (unsigned8FromPayload(payload, 0) >> 3) & 0x1F; + value.ucharValue((unsigned8FromPayload(payload, 0) >> 3) & 0x1F); return true; case 1: - value = (unsigned16FromPayload(payload, 0) >> 6) & 0x1F; + value.ushortValue((unsigned16FromPayload(payload, 0) >> 6) & 0x1F); return true; case 2: value.ucharValue(unsigned8FromPayload(payload, 1) & 0x3F); diff --git a/visualstudio/knx.sln b/visualstudio/knx.sln index f756ece..fcb91da 100644 --- a/visualstudio/knx.sln +++ b/visualstudio/knx.sln @@ -43,7 +43,6 @@ Global EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|Arduino Genuino Zero (Native USB Port).ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) - {58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|Arduino Genuino Zero (Native USB Port).Build.0 = Debug|Arduino Genuino Zero (Native USB Port) {58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|Mixed.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) {58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|NodeMCU_1 0_(ESP-12E_Module).ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) {58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|VisualGDB.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) @@ -86,7 +85,8 @@ Global {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|Mixed.Build.0 = Debug|Arduino Genuino Zero (Native USB Port) {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|NodeMCU_1 0_(ESP-12E_Module).ActiveCfg = Debug|NodeMCU_1 0_(ESP-12E_Module) {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|NodeMCU_1 0_(ESP-12E_Module).Build.0 = Debug|NodeMCU_1 0_(ESP-12E_Module) - {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|VisualGDB.ActiveCfg = Debug|NodeMCU_1 0_(ESP-12E_Module) + {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|VisualGDB.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) + {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|VisualGDB.Build.0 = Debug|Arduino Genuino Zero (Native USB Port) {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|x64.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) {6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|x86.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port) {6165CD6A-91A4-49FA-977A-48F22086CA8E}.MinSizeRel|Arduino Genuino Zero (Native USB Port).ActiveCfg = Release|Arduino Genuino Zero (Native USB Port)