Skip to content

Commit

Permalink
Merge pull request #515 from dirkmueller/124_b9_fix
Browse files Browse the repository at this point in the history
Fix GPS and HTU21d
  • Loading branch information
ricki-z authored Oct 13, 2019
2 parents 8b199b9 + 40a679f commit 1502254
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions airrohr-firmware/Versions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
NRZ-2019-124-B9
* Handle Si7021 for HTU21d replacement
* Fix GPS regression

NRZ-2019-124-B8
* bug fixes
* translation updates
Expand Down
8 changes: 5 additions & 3 deletions airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
*
************************************************************************/
// increment on change
#define SOFTWARE_VERSION_STR "NRZ-2019-124-B8"
#define SOFTWARE_VERSION_STR "NRZ-2019-124-B9"
const String SOFTWARE_VERSION(SOFTWARE_VERSION_STR);

/*****************************************************************
Expand Down Expand Up @@ -3328,7 +3328,7 @@ static void fetchSensorGPS(String& s) {
add_Value2Json(s, F("GPS_time"), last_value_GPS_time);
}

if ( gps.charsProcessed() < 10) {
if ( count_sends > 0 && gps.charsProcessed() < 10) {
debug_outln_error(F("No GPS data received: check wiring"));
gps_init_failed = true;
}
Expand Down Expand Up @@ -3934,7 +3934,9 @@ static void powerOnTestSensors() {

if (cfg::htu21d_read) {
debug_outln_info(F("Read HTU21D..."));
if (!htu21d.begin()) {
// begin() might return false when using Si7021
// so validate reading via Humidity (will return 0.0 when failed)
if (!htu21d.begin() && htu21d.readHumidity() < 1.0f) {
debug_outln_error(F("Check HTU21D wiring"));
htu21d_init_failed = true;
}
Expand Down

0 comments on commit 1502254

Please sign in to comment.