Swapped max and min for analog mapping

This commit is contained in:
Ollo 2022-03-06 14:05:54 +01:00
parent 868d3d912e
commit 9a172c269e

View File

@ -138,7 +138,7 @@ public:
case CAPACITIVE_FREQUENCY: case CAPACITIVE_FREQUENCY:
return mapf(mMoisture_raw.getMedian(), MOIST_SENSOR_MAX_FRQ, MOIST_SENSOR_MIN_FRQ, 0, 100); return mapf(mMoisture_raw.getMedian(), MOIST_SENSOR_MAX_FRQ, MOIST_SENSOR_MIN_FRQ, 0, 100);
case ANALOG_RESISTANCE_PROBE: 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: case SHT20:
return mMoisture_raw.getMedian(); return mMoisture_raw.getMedian();
} }