Compare commits
1 Commits
e50eea2c6b
...
8837368a14
Author | SHA1 | Date | |
---|---|---|---|
8837368a14 |
@ -94,6 +94,9 @@ int ads1115_read_conversation_result(const struct ads1115_dev *ads1115,
|
||||
return res;
|
||||
}
|
||||
result->raw = buffer[0] << 8 | buffer[1];
|
||||
if(result->raw & 0x8000) {
|
||||
result->raw = 0;
|
||||
}
|
||||
result->voltage = result->raw * VPS;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user