Commit Graph

17 Commits

Author SHA1 Message Date
Lukáš Voborský cd9da6463c Add CRC check (#2992)
Also clean-up a nasty `ow` module example.
2020-06-09 22:26:52 +02:00
galjonsfigur 6926c66b16 Polish Lua examples (#2846)
* Add missing globals from luacheck config

* Fix luacheck warnings in all lua files

* Re-enable luacheck in Travis

* Speed up Travis by using preinstalled LuaRocks

* Fix more luacheck warnings in httpserver lua module

* Fix DCC module and add appropriate definitions to luacheck config.

* Change inline comments from ignoring block to only ignore specific line

* Add Luacheck for Windows and enable it for both Windows and Linux

* Change luacheck exceptions and fix errors from 1st round of polishing

* Add retry and timeout params to wget
2020-06-09 22:26:52 +02:00
Andreas f56722074a fixed missing forward declaration (#2975) 2020-06-09 22:26:06 +02:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Lukáš Voborský 55c368ac03 DS18B20 module - update (enhanced, optimized) (#1996) 2017-08-16 21:04:52 +02:00
Arnim Läuger 925991715f Fix float version, auto-detect int/float, OO tmr (#1866) 2017-03-16 23:10:04 +01:00
Arnim Läuger 46f651cccb Fix self.pin when specifying lpin for readTemp() (#1865) 2017-03-16 12:36:09 +01:00
Jonathan Karras 4acabab1cc Change address printing to Hex from Base64. (#1840) 2017-03-07 07:06:50 +01:00
vsky 5feae3fee1 Re-write DS18B20 asynchronous example (#1820) 2017-02-25 22:56:45 +01:00
Sebastian Schildt 0863a4c221 Fix unit constants to be consistent with code
Extend example to show querying different units or specific sensors
2016-01-17 14:39:39 +01:00
Nick Andrew 0a7b730e23 Support DS18S20 and fix negative temp handling
The DS18S20 has only 1 fractional bit whereas DS18B20 has 4, and their
temperature register alignment differs. Check the family code to choose
the correct multiplier for both devices.

Closes #610

Negative temperatures (less than 0°C) are returned as a sign-extended
two's complement number. Subtract 0x10000 to recover the proper
negative value.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-11-16 23:32:20 +11:00
Tamas Szabo 67ab2d018e Update ds18b20.lua 2015-02-21 17:05:16 +01:00
sza2 5a629e4297 Fix for negative values 2015-02-14 10:48:41 +01:00
Tobias Mädel 4bde88cd81 Fixed DS18B20 handling because of new floating point handling
Hi,

because of the new floating point API, the old ds18b20 code returns strange values like "19.8250.8250". 
This change fixes that. 

Best regards,
Tobias
2015-02-01 18:20:45 +01:00
HuangRui 8cc661923b The read function returns an incorrect temperature. Fixed #149. 2015-01-31 10:46:43 +08:00
HuangRui d4dcf55764 Formatted ds18b20.lua. 2015-01-26 18:16:55 +08:00
funshine 152107feab rename folder name to pre_build 2014-12-22 20:28:37 +08:00