filter out invalid RS41 humidity values; version number workaround no longer needed for sondehub
This commit is contained in:
parent
f4e806011b
commit
e46fc719ec
|
|
@ -853,6 +853,9 @@ int RS41::decode41(byte *data, int maxlen)
|
|||
calibration->value.calTU, calibration->value.taylorTU, calibration->value.polyTrh );
|
||||
Serial.printf("Humidity Sensor temperature = %f\n", si->tempRHSensor );
|
||||
si->relativeHumidity = GetRAHumidity( humidityMain, humidityRef1, humidityRef2, si->tempRHSensor, si->temperature, si->pressure );
|
||||
// drop humidity if invalid. faulty sonde can cause a value INFINITY that breaks JSON export.
|
||||
// We must make sure that humitidy is either a number of NAN (INFINIT is >100 so this is handled correctly now)
|
||||
if(si->relativeHumidity<0 || si->relativeHumidity>100) si->relativeHumidity = NAN;
|
||||
Serial.printf("Relative humidity = %f\n", si->relativeHumidity );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ String ConnSDCard::getStatus() {
|
|||
char buf[256];
|
||||
snprintf(buf, 256, "SD card type: %s [size: %lu MB]. File system: %lu / %lu MB used", cardTypeStr(cardType),
|
||||
cardSize, usedSize, totalSize);
|
||||
strlcat(buf, "; <a href=\\\"/sdfiles.html\\\">SD-Card content</a>", 256);
|
||||
return String(buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -302,21 +302,12 @@ void ConnSondehub::sondehub_station_update() {
|
|||
w = data;
|
||||
// not necessary... memset(w, 0, STATION_DATA_LEN);
|
||||
|
||||
if(strncmp(version_id, "dev2", 4)==0) {
|
||||
sprintf(w,
|
||||
"{"
|
||||
"\"software_name\": \"%s\","
|
||||
"\"software_version\": \"devel%s\","
|
||||
"\"uploader_callsign\": \"%s\",",
|
||||
version_name, version_id+3, conf->callsign);
|
||||
} else {
|
||||
sprintf(w,
|
||||
"{"
|
||||
"\"software_name\": \"%s\","
|
||||
"\"software_version\": \"%s\","
|
||||
"\"uploader_callsign\": \"%s\",",
|
||||
version_name, version_id, conf->callsign);
|
||||
}
|
||||
w += strlen(w);
|
||||
|
||||
// Only send email if provided
|
||||
|
|
|
|||
Loading…
Reference in New Issue