From 46f651cccb15a6a27e044c8afb0eca2e1334e8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Thu, 16 Mar 2017 12:36:09 +0100 Subject: [PATCH] Fix self.pin when specifying lpin for readTemp() (#1865) --- lua_modules/ds18b20/ds18b20.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua_modules/ds18b20/ds18b20.lua b/lua_modules/ds18b20/ds18b20.lua index dddd9dee..90c21510 100644 --- a/lua_modules/ds18b20/ds18b20.lua +++ b/lua_modules/ds18b20/ds18b20.lua @@ -29,10 +29,10 @@ return({ end, readTemp = function(self, cb, lpin) + if lpin then self.pin = lpin end local pin = self.pin self.cb = cb self.temp={} - if lpin then pin = lpin end ow.setup(pin) self.sens={}