mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	fix coredump
This commit is contained in:
		
							parent
							
								
									24834d0f51
								
							
						
					
					
						commit
						c5bf61a44f
					
				| @ -25,8 +25,10 @@ void measureTemp() | |||||||
|     lastsend = now; |     lastsend = now; | ||||||
|     int r = rand(); |     int r = rand(); | ||||||
|     double currentValue = (r * 1.0) / (RAND_MAX * 1.0); |     double currentValue = (r * 1.0) / (RAND_MAX * 1.0); | ||||||
|     currentValue *= (670433.28 + 273); |     currentValue *= 100; | ||||||
|     currentValue -= 273; |     currentValue -= 50; | ||||||
|  |     //    currentValue *= (670433.28 + 273);
 | ||||||
|  |     //    currentValue -= 273;
 | ||||||
|     println(currentValue); |     println(currentValue); | ||||||
|     CURR.value(currentValue); |     CURR.value(currentValue); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -31,9 +31,10 @@ void Platform::freeMemory(uint8_t* ptr) | |||||||
| 
 | 
 | ||||||
| Platform::Platform() | Platform::Platform() | ||||||
| { | { | ||||||
|     // allocate memory to have a memory reference, substract a bit 
 |     // allocate memory to have a memory reference, substract a bit
 | ||||||
|     _memoryReference = (uint8_t*)malloc(1)  - 1024; |     _memoryReference = (uint8_t*)malloc(1); | ||||||
|     free(_memoryReference); |     free(_memoryReference); | ||||||
| 	print("MemRef: "); |     _memoryReference -= 1024; | ||||||
|  |     print("MemRef: "); | ||||||
| 	println((long unsigned int)_memoryReference, HEX); | 	println((long unsigned int)_memoryReference, HEX); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user