Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HygroClip2 by
Revision 2:b41e36e81711, committed 2016-05-02
- Comitter:
- wolfsberger
- Date:
- Mon May 02 14:09:30 2016 +0000
- Parent:
- 1:810b9b0dd9a4
- Commit message:
- -
Changed in this revision
HygroClip2.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 810b9b0dd9a4 -r b41e36e81711 HygroClip2.cpp --- a/HygroClip2.cpp Tue Mar 15 07:45:31 2016 +0000 +++ b/HygroClip2.cpp Mon May 02 14:09:30 2016 +0000 @@ -12,8 +12,8 @@ void HygroClip2::uartCallback() { static size_t index = 0; - uint8_t data = uart_.getc(); - + uint8_t data = LPC_UART3->RBR; + if (dataReadyToPars_) { return; } @@ -47,7 +47,6 @@ temperature_ = NAN; isDataValid_ = false; } - uart_.printf("{F00RDD}\r"); } @@ -72,5 +71,9 @@ } bool HygroClip2::isDataValid() { + if (humidity_ == NAN || humidity_ == 0.0f) + return false; + if (temperature_ == NAN || temperature_ == 0.0f) + return false; return isDataValid_; }