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

Fix GPS and HTU21d #515

Merged
merged 3 commits into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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