diff --git a/src/knx/bau_systemB.cpp b/src/knx/bau_systemB.cpp index 8fee035..6438e2f 100644 --- a/src/knx/bau_systemB.cpp +++ b/src/knx/bau_systemB.cpp @@ -48,16 +48,16 @@ void BauSystemB::sendNextGroupTelegram() if (flag != ReadRequest && flag != WriteRequest) continue; - if(!go.communicationEnable() || ! go.transmitEnable()) + if (!go.communicationEnable()) continue; - if (flag == WriteRequest) + if (flag == WriteRequest && go.transmitEnable()) { uint8_t* data = go.valueRef(); _appLayer.groupValueWriteRequest(AckRequested, asap, go.priority(), NetworkLayerParameter, data, go.sizeInTelegram()); } - else + else if (flag == ReadRequest) { _appLayer.groupValueReadRequest(AckRequested, asap, go.priority(), NetworkLayerParameter); } @@ -265,6 +265,10 @@ void BauSystemB::groupValueReadLocalConfirm(AckType ack, uint16_t asap, Priority void BauSystemB::groupValueReadIndication(uint16_t asap, Priority priority, HopCountType hopType) { GroupObject& go = _groupObjTable.get(asap); + + if (!go.communicationEnable() || !go.readEnable()) + return; + uint8_t* data = go.valueRef(); _appLayer.groupValueReadResponse(AckRequested, asap, priority, hopType, data, go.sizeInTelegram()); } diff --git a/src/knx/table_object.h b/src/knx/table_object.h index 1a35395..d30fb70 100644 --- a/src/knx/table_object.h +++ b/src/knx/table_object.h @@ -29,7 +29,7 @@ public: virtual uint8_t* restore(uint8_t* buffer); protected: /** - * This method is called before the interface object enters a new ::Loadstate. + * This method is called before the interface object enters a new ::LoadState. * If there is a error changing the state newState should be set to ::LS_ERROR and errorCode() * to a reason for the failure. */ diff --git a/src/knx_facade.h b/src/knx_facade.h index c8b79c9..46515c9 100644 --- a/src/knx_facade.h +++ b/src/knx_facade.h @@ -30,11 +30,10 @@ public: * returns HIGH if led is active on HIGH, LOW otherwise */ uint32_t ledPinActiveOn(); - /** - * To adapt the output to hardware. - * - * @param ledPinActiveOn = "0" or "low" --> GPIO--LED--RESISTOR--VDD (for example NODE MCU) - * @param ledPinActiveOn = "1" or "high" --> GPIO--RESISTOR--LED--GND (for example WeMos D1 R2) + /** + * Sets if the programming led is active on HIGH or LOW. + * + * Set to HIGH for GPIO--RESISTOR--LED--GND or to LOW for GPIO--LED--RESISTOR--VDD */ void ledPinActiveOn(uint32_t value); uint32_t ledPin(); @@ -63,9 +62,6 @@ private: uint32_t _ledPinActiveOn = LOW; uint32_t _ledPin = LED_BUILTIN; uint32_t _buttonPin = 0; -#ifdef USE_STATES - Ticker _ticker; -#endif saveRestoreCallback _saveCallback = 0; saveRestoreCallback _restoreCallback = 0;