mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	correct flag handling for group objects
This commit is contained in:
		
							parent
							
								
									0628d88921
								
							
						
					
					
						commit
						5b31b24337
					
				| @ -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()); | ||||
| } | ||||
|  | ||||
| @ -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. | ||||
|      */ | ||||
|  | ||||
| @ -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; | ||||
|      | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user