bugfix: correct casting of return value from adc as it was always overflowing the 8 bit result

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2024-10-29 01:11:09 +01:00
committed by Daniel Esteban
parent 76a4276b5d
commit d04e68bef8
+1 -1
View File
@@ -76,7 +76,7 @@ func (p ADCPin) Get() uint16 {
p.d.bus.Tx(p.d.Address, tx, rx)
// scale result to 16bit value like other ADCs
return uint16(rx[1] << 8)
return uint16(rx[1]) << 8
}
// Configure here just for interface compatibility.