mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
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:
parent
a427d6ebe5
commit
7ffe895374
@ -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);
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user