add writeMemory to facade, remove debug output from platform

This commit is contained in:
Thomas Kunze 2018-09-15 00:22:30 +02:00
parent 6334bfe3cb
commit dc362a79c3
5 changed files with 14 additions and 7 deletions

View File

@ -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);
}
}

View File

@ -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;
}

@ -1 +1 @@
Subproject commit f50f03ad6edaa73c6bc41496de696e1d7306b30b
Subproject commit fd2334a4af59e9cea5325d399afc639517a5d41a

View File

@ -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)

View File

@ -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);