mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 14:01:20 +00:00 
			
		
		
		
	Instruments: Add millisecond MeasurementType and conversion
Allows for reporting times in milliseconds as used with the acmecape instrument.
This commit is contained in:
		| @@ -76,11 +76,19 @@ _measurement_types = [ | ||||
|     MeasurementType('time', 'seconds', | ||||
|         conversions={ | ||||
|             'time_us': lambda x: x * 1000000, | ||||
|             'time_ms': lambda x: x * 1000, | ||||
|         } | ||||
|     ), | ||||
|     MeasurementType('time_us', 'microseconds', | ||||
|         conversions={ | ||||
|             'time': lambda x: x / 1000000, | ||||
|             'time_ms': lambda x: x / 1000, | ||||
|         } | ||||
|     ), | ||||
|     MeasurementType('time_ms', 'milliseconds', | ||||
|         conversions={ | ||||
|             'time': lambda x: x / 1000, | ||||
|             'time_us': lambda x: x * 1000, | ||||
|         } | ||||
|     ), | ||||
|     MeasurementType('temperature', 'degrees'), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user