Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS18B20 - CRC check added to lua module, minor optimization; change of ow module example #2992

Merged
merged 1 commit into from
Jan 2, 2020

Conversation

vsky279
Copy link
Contributor

@vsky279 vsky279 commented Jan 2, 2020

No issue connected with this PR.

Make sure all boxes are checked (add x inside the brackets) when you submit your contribution, remove this sentence before doing so.

  • This PR is for the dev branch rather than for master.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • I have thoroughly tested my contribution.
  • The code changes are reflected in the documentation at docs/*.

I have 7 DS18B20 devices connected to 1 bus and I start to receive some wrong readouts. This may be connected to an hw issue. The module does not check CRC for readouts so wrong temperatures are reported. CRC check was added.

Beside this some minor optimization of the module.

This PR also changes nasty example in ow module documentation. The example was using tmr.delay(1000000)...

@vsky279 vsky279 changed the title DS18B20 - CRC check added to lua module, minor optimization; clean-up of a nasty ow module example (tmr.delay(1000000)) DS18B20 - CRC check added to lua module, minor optimization; change of ow module example Jan 2, 2020
@vsky279 vsky279 force-pushed the ds18b20 branch 2 times, most recently from fcc3266 to dcad1f0 Compare January 2, 2020 11:55
@HHHartmann
Copy link
Member

HHHartmann commented Jan 2, 2020

Thanks for this contribution.
The build currently fails our new luacheck with the following messages:

   Checking lua_modules/ds18b20/ds18b20.lua          2 warnings

    lua_modules/ds18b20/ds18b20.lua:88:76: line contains trailing whitespace
    lua_modules/ds18b20/ds18b20.lua:102:43: line contains trailing whitespace 

… of a nasty `ow` module example (`tmr.delay(1000000)`)
@vsky279
Copy link
Contributor Author

vsky279 commented Jan 2, 2020

It's great we have such check. Corrected.

@marcelstoer marcelstoer added this to the Next release milestone Jan 2, 2020
@marcelstoer marcelstoer merged commit 8c08e76 into nodemcu:dev Jan 2, 2020
marcelstoer pushed a commit that referenced this pull request Jun 9, 2020
Also clean-up a nasty `ow` module example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants