Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
8cc66192
Commit
8cc66192
authored
Jan 31, 2015
by
HuangRui
Browse files
The read function returns an incorrect temperature. Fixed #149.
parent
f45e6fec
Changes
1
Hide whitespace changes
Inline
Side-by-side
lua_modules/ds18b20/ds18b20.lua
View file @
8cc66192
...
@@ -126,7 +126,7 @@ function read(addr, unit)
...
@@ -126,7 +126,7 @@ function read(addr, unit)
if
((
t1
==
nil
)
or
(
t2
==
nil
))
then
if
((
t1
==
nil
)
or
(
t2
==
nil
))
then
return
nil
return
nil
else
else
return
t1
..
"."
..
t2
return
t1
..
"."
..
string.format
(
"%04u"
,
t2
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment