From a0eab26e5f1c443ddce71eb34d04b873e2951765 Mon Sep 17 00:00:00 2001 From: caternuson Date: Fri, 2 Feb 2024 08:12:00 -0800 Subject: [PATCH] fix doc string and millivolts --- Adafruit_ADS1X15.cpp | 2 +- examples/continuous/continuous.ino | 2 +- examples/nonblocking/nonblocking.ino | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Adafruit_ADS1X15.cpp b/Adafruit_ADS1X15.cpp index 80a89a3..50ea4e4 100644 --- a/Adafruit_ADS1X15.cpp +++ b/Adafruit_ADS1X15.cpp @@ -276,7 +276,7 @@ int16_t Adafruit_ADS1X15::getLastConversionResults() { /**************************************************************************/ /*! - @brief Returns true if conversion is complete, false otherwise. + @brief Compute volts for the given raw counts. @param counts the ADC reading in raw counts diff --git a/examples/continuous/continuous.ino b/examples/continuous/continuous.ino index ee60140..1d8007d 100644 --- a/examples/continuous/continuous.ino +++ b/examples/continuous/continuous.ino @@ -61,7 +61,7 @@ void loop(void) int16_t results = ads.getLastConversionResults(); - Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)); Serial.println("mV)"); + Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)/1000); Serial.println("mV)"); new_data = false; diff --git a/examples/nonblocking/nonblocking.ino b/examples/nonblocking/nonblocking.ino index 9d6416d..fb3d4dc 100644 --- a/examples/nonblocking/nonblocking.ino +++ b/examples/nonblocking/nonblocking.ino @@ -42,7 +42,7 @@ void loop(void) int16_t results = ads.getLastConversionResults(); - Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)); Serial.println("mV)"); + Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)/1000); Serial.println("mV)"); // Start another conversion. ads.startADCReading(ADS1X15_REG_CONFIG_MUX_DIFF_0_1, /*continuous=*/false);