From 9a172c269e215484ae8877b4dfd970c437c2f0b7 Mon Sep 17 00:00:00 2001 From: Ollo Date: Sun, 6 Mar 2022 14:05:54 +0100 Subject: [PATCH] Swapped max and min for analog mapping --- esp32/include/PlantCtrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/include/PlantCtrl.h b/esp32/include/PlantCtrl.h index ad928f7..f052a47 100644 --- a/esp32/include/PlantCtrl.h +++ b/esp32/include/PlantCtrl.h @@ -138,7 +138,7 @@ public: case CAPACITIVE_FREQUENCY: return mapf(mMoisture_raw.getMedian(), MOIST_SENSOR_MAX_FRQ, MOIST_SENSOR_MIN_FRQ, 0, 100); case ANALOG_RESISTANCE_PROBE: - return mapf(mMoisture_raw.getMedian(), ANALOG_SENSOR_MAX_MV, ANALOG_SENSOR_MIN_MV, 0, 100); + return mapf(mMoisture_raw.getMedian(), ANALOG_SENSOR_MIN_MV, ANALOG_SENSOR_MAX_MV, 0, 100); case SHT20: return mMoisture_raw.getMedian(); }