Skip to content

Commit 0b6b2d6

Browse files
committed
RTL433, support for PCR800 rain sensor in inches
1 parent 1d05ce7 commit 0b6b2d6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hardware/Rtl433.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,17 @@ bool CRtl433::ParseLine(const std::vector<std::string> &headers, const char *lin
259259

260260
if (FindField(data, "rain_total"))
261261
{
262+
bool bInInches = false;
263+
if (FindField(data, "model"))
264+
{
265+
bInInches = data["model"].find("PCR800") != std::string::npos;
266+
}
262267
rain = (float)atof(data["rain_total"].c_str());
268+
if (bInInches)
269+
{
270+
//convert to mm
271+
rain *= 25.4f;
272+
}
263273
haveRain = true;
264274
}
265275

0 commit comments

Comments
 (0)