initialize the last measurement values to something obviously "unread"

1.2-legacy
Charles Crossan 2021-02-22 21:00:41 -05:00
rodzic 3a91da5e52
commit ec41c11e58
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -27,7 +27,12 @@ class EnvironmentalMeasurementPluginRadio : public ProtobufPlugin<EnvironmentalM
/** Constructor
* name is for debugging output
*/
EnvironmentalMeasurementPluginRadio() : ProtobufPlugin("EnvironmentalMeasurement", PortNum_ENVIRONMENTAL_MEASUREMENT_APP, &EnvironmentalMeasurement_msg) {}
EnvironmentalMeasurementPluginRadio() : ProtobufPlugin("EnvironmentalMeasurement", PortNum_ENVIRONMENTAL_MEASUREMENT_APP, &EnvironmentalMeasurement_msg) {
lastMeasurement.barometric_pressure = nanf("");
lastMeasurement.relative_humidity = nanf("");
lastMeasurement.temperature = nanf("");
lastSender = "N/A";
}
/**
* Send our EnvironmentalMeasurement into the mesh