diff --git a/examples/knx-esp-demo/knx-esp-demo.ino b/examples/knx-esp-demo/knx-esp-demo.ino index 20de32f..b7ae38c 100644 --- a/examples/knx-esp-demo/knx-esp-demo.ino +++ b/examples/knx-esp-demo/knx-esp-demo.ino @@ -34,18 +34,18 @@ void measureTemp() currentValue *= 100 * 100; // write new value to groupobject - goCurrent.objectWriteFloat(currentValue); + goCurrent.objectWriteFloatDpt9(currentValue); if (currentValue > maxValue) { maxValue = currentValue; - goMax.objectWriteFloat(maxValue); + goMax.objectWriteFloatDpt9(maxValue); } if (currentValue < minValue) { minValue = currentValue; - goMin.objectWriteFloat(minValue); + goMin.objectWriteFloatDpt9(minValue); } } diff --git a/src/esp_platform.cpp b/src/esp_platform.cpp index 0e14a56..017ff11 100644 --- a/src/esp_platform.cpp +++ b/src/esp_platform.cpp @@ -76,7 +76,7 @@ void EspPlatform::closeMultiCast() bool EspPlatform::sendBytes(uint8_t * buffer, uint16_t len) { - printHex("<- ",buffer, len); + //printHex("<- ",buffer, len); int result = 0; result = _udp.beginPacketMulticast(_mulitcastAddr, _mulitcastPort, WiFi.localIP()); result = _udp.write(buffer, len); @@ -97,7 +97,7 @@ int EspPlatform::readBytes(uint8_t * buffer, uint16_t maxLen) } _udp.read(buffer, len); - printHex("-> ", buffer, len); + //printHex("-> ", buffer, len); return len; } diff --git a/src/knx b/src/knx index f50f03a..fd2334a 160000 --- a/src/knx +++ b/src/knx @@ -1 +1 @@ -Subproject commit f50f03ad6edaa73c6bc41496de696e1d7306b30b +Subproject commit fd2334a4af59e9cea5325d399afc639517a5d41a diff --git a/src/knx_facade.cpp b/src/knx_facade.cpp index 898f31f..0c4956a 100644 --- a/src/knx_facade.cpp +++ b/src/knx_facade.cpp @@ -9,6 +9,7 @@ KnxFacade knx; KnxFacade::KnxFacade() : _bau(_platform) { manufacturerId(0xfa); + _bau.addSaveRestore(this); } bool KnxFacade::enabled() @@ -61,6 +62,11 @@ void KnxFacade::readMemory() _bau.readMemory(); } +void KnxFacade::writeMemory() +{ + _bau.writeMemory(); +} + void KnxFacade::loop() { if (currentState) @@ -108,7 +114,7 @@ void KnxFacade::start() pinMode(_buttonPin, INPUT); attachInterrupt(_buttonPin, buttonDown, FALLING); - + switchToSate(noWifiState); checkStates(); _ticker.attach_ms(100, doLed); diff --git a/src/knx_facade.h b/src/knx_facade.h index 435873c..19fb3bc 100644 --- a/src/knx_facade.h +++ b/src/knx_facade.h @@ -21,6 +21,7 @@ public: uint32_t buttonPin(); void buttonPin(uint32_t value); void readMemory(); + void writeMemory(); void loop(); void knxLoop(); void registerGroupObjects(GroupObject* groupObjects, uint16_t count);