Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
wet  / dry values were reversed
  • Loading branch information
MoJo2600 committed Sep 8, 2019
1 parent 17314b3 commit 775598d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/esp-soil-moisture-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void getSendMoisture(int batteryCharge) {
#endif

// Map the moisture to the min and max reading of the sensor
moisture = map(moisture, moistWetReadingAt3VSetting.get(), moistDryReadingAt3VSetting.get(), 100, 0); // Convert to 0 - 100%, 0=Dry, 100=Wet
moisture = map(moisture, moistDryReadingAt3VSetting.get(), moistWetReadingAt3VSetting.get(), 0, 100); // Convert to 0 - 100%, 0=Dry, 100=Wet

#ifdef DEBUG
Homie.getLogger() << "Moisture after mapping: " << moisture << endl;
Expand Down

0 comments on commit 775598d

Please sign in to comment.