grovevdiv: Function's return value is input for another function, so it should be the same type

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Stefan Andritoiu 2015-09-22 15:33:24 +03:00 committed by Mihai Tudor Panu
parent a427d6ebe5
commit 7ffe895374
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ unsigned int GroveVDiv::value(unsigned int samples)
return (sum / samples);
}
float GroveVDiv::computedValue(uint8_t gain, uint16_t val, int vref, int res)
float GroveVDiv::computedValue(uint8_t gain, unsigned int val, int vref, int res)
{
return ((float(gain) * float(val) * float(vref) / float(res)) / 1000.0);

View File

@ -89,7 +89,7 @@ namespace upm {
*
* @return Measured voltage
*/
float computedValue(uint8_t gain, uint16_t val, int vref=GROVEVDIV_VREF,
float computedValue(uint8_t gain, unsigned int val, int vref=GROVEVDIV_VREF,
int res=GROVEVDIV_ADC_RES);
private: