From 83c0bb528353609ff1f8db6b83d2f1b3fafe9548 Mon Sep 17 00:00:00 2001 From: Magnus Date: Fri, 2 Dec 2022 14:10:53 +0100 Subject: [PATCH] Added temp tests --- src/tempsensor.cpp | 3 --- src/tests/tests_tempsensor.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tempsensor.cpp b/src/tempsensor.cpp index 2edde3f..c1908f8 100644 --- a/src/tempsensor.cpp +++ b/src/tempsensor.cpp @@ -58,9 +58,6 @@ void TempSensor::setup() { #endif } -// -// Retrieving value from sensor, value is in Celcius -// float TempSensor::getValue(bool useGyro) { if (useGyro) { // When using the gyro temperature only the first read value will be diff --git a/src/tests/tests_tempsensor.cpp b/src/tests/tests_tempsensor.cpp index 67a7e0e..2efeee1 100644 --- a/src/tests/tests_tempsensor.cpp +++ b/src/tests/tests_tempsensor.cpp @@ -21,12 +21,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include #include test(temp_readSensor) { - Serial.println("Not implemented yet (temp_readSensor)"); + myTempSensor.setup(); + myTempSensor.getTempC(); + assertEqual( myTempSensor.isSensorAttached(), true ); } // EOF \ No newline at end of file