correct flag handling for group objects

This commit is contained in:
Thomas Kunze 2019-05-27 22:06:32 +02:00
parent 0628d88921
commit 5b31b24337
3 changed files with 12 additions and 12 deletions

View File

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

View File

@ -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.
*/

View File

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