Skip to content

Commit

Permalink
Update soil_vwc_sensor_task.cpp
Browse files Browse the repository at this point in the history
Fix reverted bug
  • Loading branch information
digitecomg committed Oct 25, 2024
1 parent 94f8b9c commit a11b8b7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ float SoilVWCSensorTask::getSoilVWC(float adc_value, float adc_voltage_min, floa

if ((value < (adc_voltage_min + SOIL_VWC_ERROR_VOLTAGE_MIN)) || (value > (adc_voltage_max + SOIL_VWC_ERROR_VOLTAGE_MAX)))
{
*adc_overflow = true;
// Activate flag only with sensor is a real connected to ADC
if(value > SOIL_VWC_VOLTAGE_ABSENT) *adc_overflow = true;
value = UINT16_MAX;
}
else
Expand Down

0 comments on commit a11b8b7

Please sign in to comment.