From e6427f1d27fb04c47ff8ed3fd255d66d92578a60 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Mon, 3 May 2021 22:02:51 +1000 Subject: [PATCH] Fix tip disconnection sense value oops --- source/Core/BSP/MHP30/BSP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/BSP/MHP30/BSP.cpp b/source/Core/BSP/MHP30/BSP.cpp index ae04372e..75db6074 100644 --- a/source/Core/BSP/MHP30/BSP.cpp +++ b/source/Core/BSP/MHP30/BSP.cpp @@ -379,7 +379,7 @@ bool isTipDisconnected() { * plate_sensor_res = ((adc5_value_PD1_set - adc5_value_PD1_cleared) / (adc5_value_PD1_cleared + 4096 - adc5_value_PD1_set)) * 1000.0; * */ - bool tipDisconnected = getADC(2) > 4090; + bool tipDisconnected = getADC(2) > (4090*8); // We have to handle here that this ^ will trip while measuring the gain resistor if (xTaskGetTickCount() - lastMeas < (TICKS_100MS * 2 + (TICKS_100MS / 2))) {