forked from airgradienthq/arduino
add nox_index to payload
This commit is contained in:
1 parent
3f1da6387b
commit
6cf5e31843
4 files changed
+31
-2
No files matched your search
@@ -121,6 +121,7 @@ void Sgp41::_handle(void) {
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
if (getRawSignal(srawVoc, srawNox)) {
|
||||
tvocRaw = srawVoc;
|
||||
noxRaw = srawNox;
|
||||
nox = noxAlgorithm()->process(srawNox);
|
||||
tvoc = vocAlgorithm()->process(srawVoc);
|
||||
AgLog("Polling SGP41 success: tvoc: %d, nox: %d", tvoc, nox);
|
||||
@@ -249,3 +250,10 @@ bool Sgp41::_noxConditioning(void) {
|
||||
* @return int
|
||||
*/
|
||||
int Sgp41::getTvocRaw(void) { return tvocRaw; }
|
||||
|
||||
/**
|
||||
* @brief Get NOX raw value
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int Sgp41::getNoxRaw(void) { return noxRaw; }
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
int getTvocIndex(void);
|
||||
int getNoxIndex(void);
|
||||
int getTvocRaw(void);
|
||||
int getNoxRaw(void);
|
||||
|
||||
private:
|
||||
bool onConditioning = true;
|
||||
@@ -39,6 +40,7 @@ private:
|
||||
int tvoc = 0;
|
||||
int tvocRaw;
|
||||
int nox = 0;
|
||||
int noxRaw;
|
||||
#if defined(ESP8266)
|
||||
uint32_t conditioningPeriod;
|
||||
uint8_t conditioningCount;
|
||||
|
||||
Reference in new issue
Block a user