mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Revision:
11:91d59b5ac026
Parent:
2:19d1dcef0c0e
Child:
13:9cecc8d66cc1
diff -r 70f329e007e6 -r 91d59b5ac026 Components/tsz124/tsz124_class.h
--- a/Components/tsz124/tsz124_class.h	Wed Apr 06 09:05:41 2016 +0000
+++ b/Components/tsz124/tsz124_class.h	Wed Apr 06 09:07:36 2016 +0000
@@ -142,14 +142,14 @@
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
 		AnalogIn   ain(A1);
-		return ain.read()*805.0*ADC_RANGE_12_BIT/1000.0;
+		return ((double)ain.read())*805.0*ADC_RANGE_12_BIT/1000.0;
 	}
 
 	virtual unsigned int GetCurrent(void)
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
 		AnalogIn   ain(A2);
-		return ain.read()*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
+		return ((double)ain.read())*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
 	}