]> git.basschouten.com Git - openhab-addons.git/commit
[novafinedust] Optimizations on access to the serial port (#10005)
authorStefan Triller <t2000@users.noreply.github.com>
Thu, 4 Feb 2021 19:49:43 +0000 (20:49 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Feb 2021 19:49:43 +0000 (11:49 -0800)
commit00d2aabcb522b1fd8c35f47ad81934e3c3e513d6
treee9ca25cd0ea3365eb6ca10e2a90637ee442e4cc4
parent40dbd509433f7478e289b1ec350120d6084c0a98
[novafinedust] Optimizations on access to the serial port (#10005)

* [novafinedust] Test for optimizations on access to the serial port

- retry logic if port does not yet exist on startup
- do not write sleep command on shutdown if port has issues
- no not register data listener on port but wait for data instead to be
  compatible with RFC2217 serial over network implementation
- ignore all buffered data from device during initialization to get the
  device into a defined state

* Adress review comments

- moved most "normal" logging to TRACE level
- used lambda function

* Improve error messages as requested in the review

Signed-off-by: Stefan Triller <github@stefantriller.de>
bundles/org.openhab.binding.novafinedust/src/main/java/org/openhab/binding/novafinedust/internal/SDS011Handler.java
bundles/org.openhab.binding.novafinedust/src/main/java/org/openhab/binding/novafinedust/internal/sds011protocol/SDS011Communicator.java