diff --git a/src/ads1115.c b/src/ads1115.c index 762be90..9b12188 100644 --- a/src/ads1115.c +++ b/src/ads1115.c @@ -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;