Fix #191 by initializing the platform pointer in all KnxFacade constructors

This commit is contained in:
Simon Billemont 2022-04-13 21:02:25 +02:00
parent b0153de97f
commit adc05cfaf7
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
// the ESP32's secondary UART and late-bind the ISR function in setup().
Esp32Platform knxPlatform(&Serial2);
Bau07B0 knxBau(knxPlatform);
KnxFacade<Esp32Platform, Bau07B0> knx(knxBau);
KnxFacade<Esp32Platform, Bau07B0> knx(&knxPlatform, knxBau);
ICACHE_RAM_ATTR void myButtonPressed()
{

View File

@ -71,7 +71,7 @@ template <class P, class B> class KnxFacade : private SaveRestore
_bau.addSaveRestore(this);
}
KnxFacade(B& bau) : _bau(bau)
KnxFacade(P* platformPtr, B& bau) : _platformPtr(platformPtr), _bau(bau)
{
manufacturerId(0xfa);
bauNumber(platform().uniqueSerialNumber());