mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	(Prepare for devel) Fix: Do NOT Send when Updating KO Failed on Value Conversion - Change Signature of all Set-Methods
This commit is contained in:
		
							parent
							
								
									7280cd0e53
								
							
						
					
					
						commit
						8e2facbb9d
					
				| @ -534,7 +534,15 @@ namespace Knx | ||||
|             // convert new value to given dtp
 | ||||
|             uint8_t newData[_dataLength]; | ||||
|             memset(newData, 0, _dataLength); | ||||
| 
 | ||||
|             const bool encodingDone = true; // TODO FIXME for devel! value.encode needs success indicator
 | ||||
|             value.encode(newData); | ||||
|             if (!encodingDone) | ||||
|             { | ||||
|                 // value conversion to DPT failed
 | ||||
|                 // do NOT update the value of the KO!
 | ||||
|                 return false; | ||||
|             } | ||||
| 
 | ||||
|             // check for change in converted value / update value on change only
 | ||||
|             const bool dataChanged = memcmp(_data, newData, _dataLength); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user