mcp4131: fixed reading pot value from mcp4151

Discovered and fixed by Hubert H. Thanks!
See issue #48
This commit is contained in:
ole00 2024-01-28 21:06:53 +00:00
parent de1d601992
commit 2b1b34f48c

View File

@ -92,7 +92,7 @@ static uint16_t mcp4131_reg(uint8_t address, uint16_t value, uint8_t read_reg)
}
if (mcp4151_detected && address == ADDR_WIPER && read_reg) {
value >>= 1; //divide the wiper value by 2
r >>= 1; //divide the wiper value by 2
}
//disable IC