Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
0c72cab
Move PMSA003I to separate class and update AQ telemetry
oscgonfer Jul 1, 2025
78cef30
AirQualityTelemetry module not depend on PM sensor presence
oscgonfer Jul 1, 2025
9d0d6b6
Remove commented line
oscgonfer Jul 2, 2025
f1402c4
Fixes on PMS class
oscgonfer Jul 2, 2025
f90e1a3
Add missing warmup period to wakeUp function
oscgonfer Jul 2, 2025
c545a9f
Fixes on compilation for different variants
oscgonfer Jul 6, 2025
534f414
Add functions to check for I2C bus speed and set it
oscgonfer Jul 11, 2025
34aefb1
Initial implementation for SFA30Sensor
Nikl174 Jul 17, 2025
7f042a0
Move PMSA003I to separate class and update AQ telemetry
oscgonfer Jul 1, 2025
835adb2
AirQualityTelemetry module not depend on PM sensor presence
oscgonfer Jul 1, 2025
3b470b7
Remove commented line
oscgonfer Jul 2, 2025
2f68458
Fixes on PMS class
oscgonfer Jul 2, 2025
e4903eb
Add missing warmup period to wakeUp function
oscgonfer Jul 2, 2025
9111f88
Fixes on compilation for different variants
oscgonfer Jul 6, 2025
40af7b8
Add functions to check for I2C bus speed and set it
oscgonfer Jul 11, 2025
ff8691d
Add ScreenFonts.h
oscgonfer Jul 12, 2025
0dda175
PMSA003I 1st round test
Nashui-Yan Jul 22, 2025
14eaa3e
Fix I2C scan speed
oscgonfer Jul 23, 2025
8a811b2
Fix minor issues and bring back I2C SPEED def
oscgonfer Jul 23, 2025
ec5a752
Remove PMSA003I library as its no longer needed
oscgonfer Jul 25, 2025
f7a9e27
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Aug 4, 2025
417f5a8
Add functional SCD4X
oscgonfer Jul 2, 2025
00349c3
Fix screen frame for CO2
oscgonfer Jul 17, 2025
8a4f5c1
Add admin commands to SCD4X class
oscgonfer Jul 29, 2025
2609f45
Add further admin commands and fixes.
oscgonfer Aug 4, 2025
b23605a
Merge branch 'master' into enhancement/air-quality-module
thebentern Aug 5, 2025
a129441
Remove unused I2C speed functions and cleanup
oscgonfer Aug 6, 2025
bb3ec31
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Aug 30, 2025
8ec036a
Merge branch 'master' into enhancement/air-quality-module
thebentern Sep 9, 2025
6d45a86
Merge branch 'master' into enhancement/air-quality-module
thebentern Sep 10, 2025
24b3a22
Unify build epoch to add flag in platformio-custom.py (#7917)
thebentern Sep 10, 2025
0827bd0
Fix build error in rak_wismesh_tap_v2 (#7905)
fifieldt Sep 8, 2025
0b900dd
Put guards in place around debug heap operations (#7955)
thebentern Sep 11, 2025
7b75468
Cleanup
thebentern Sep 11, 2025
d7ef19b
Fix memory leak in NextHopRouter: always free packet copy when removi…
compumike Sep 12, 2025
ab09d9b
Formatting
thebentern Sep 12, 2025
4aa5e91
Only queue 2 client notification
thebentern Sep 12, 2025
8468bf9
Merge pull request #7965 from compumike/compumike/fix-nrf52-bluetooth…
thebentern Sep 12, 2025
8d1b20d
Merge pull request #7964 from compumike/compumike/fix-nimble-bluetoot…
thebentern Sep 12, 2025
9f25738
Update protobufs (#7973)
github-actions[bot] Sep 13, 2025
a5876f8
T-Lora Pager: Support LR1121 and SX1280 models (#7956)
WillyJL Sep 13, 2025
1d757ba
Trunk
thebentern Sep 13, 2025
375ab36
Trunk
thebentern Sep 13, 2025
33ffa8d
Static memory pool allocation (#7966)
thebentern Sep 13, 2025
55b42b9
Portduino dynamic alloc
thebentern Sep 13, 2025
1da6d28
Missed
thebentern Sep 13, 2025
3092ec7
Drop the limit
thebentern Sep 13, 2025
569c0d2
Update meshtastic-esp8266-oled-ssd1306 digest to 0cbc26b (#7977)
renovate[bot] Sep 13, 2025
2fe065d
Fix json report crashes on esp32 (#7978)
thebentern Sep 13, 2025
d9eb18f
Tweak maximums
thebentern Sep 13, 2025
9fdd31a
Fix DRAM overflow on old esp32 targets
thebentern Sep 14, 2025
e9fb1b5
Guard bad time warning logs using GPS_DEBUG (#7897)
fifieldt Sep 8, 2025
4b4609f
Scale probe buffer size based on current baud rate (#7975)
thebentern Sep 14, 2025
aea2072
Fix GPS gm_mktime memory leak (#7981)
compumike Sep 14, 2025
520c479
Fix overflow of time value (#7984)
thebentern Sep 14, 2025
7c1fea0
Remove PMSA003 include from modules
oscgonfer Sep 14, 2025
247b399
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Jan 7, 2026
44f5e06
Add flag to exclude air quality module
oscgonfer Jan 7, 2026
d893954
Rework PMSA003I to align with new I2C scanner
oscgonfer Jan 8, 2026
23f82c9
Move add sensor template to separate file
oscgonfer Jan 10, 2026
80f63b6
Split telemetry on screen options
oscgonfer Jan 10, 2026
998726e
Add variable I2C clock compile flag
oscgonfer Jan 12, 2026
9d75bcc
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Jan 12, 2026
aa943a9
Fix drawFrame in AQ module
oscgonfer Jan 12, 2026
7f35c38
Module settings override to i2cScan module function
oscgonfer Jan 12, 2026
25e4319
Move to CAN_RECLOCK_I2C per architecture
oscgonfer Jan 12, 2026
322b250
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Jan 12, 2026
0d420eb
Minor fix
oscgonfer Jan 12, 2026
d9c6afc
Merge branch 'master' into enhancement/air-quality-module
thebentern Jan 12, 2026
a134f41
Move I2C reclock function to src/detect
oscgonfer Jan 14, 2026
886d542
Fix uninitMemberVar errors and compile issue
oscgonfer Jan 14, 2026
068009e
Make sleep, wakeUp functions generic
oscgonfer Jan 14, 2026
fa0d88d
Merge branch 'master' into enhancement/air-quality-module
oscgonfer Jan 14, 2026
d641206
Fix STM32 builds
oscgonfer Jan 14, 2026
d7b36d0
Merge branch 'master' into enhancement/air-quality-module
thebentern Jan 14, 2026
f61e4c9
SEN5X first pass
oscgonfer Jul 6, 2025
f9924d0
WIP Sen5X functions
oscgonfer Jul 7, 2025
aa02a24
Further (non-working) progress in SEN5X
oscgonfer Jul 8, 2025
2261ae5
WIP Sen5X functions
oscgonfer Jul 7, 2025
5788a7b
Changes on SEN5X library - removing pm_env as well
oscgonfer Jul 15, 2025
5068c8b
Small cleanup of SEN5X sensors
oscgonfer Jul 15, 2025
7988af4
Minor change for SEN5X detection
oscgonfer Jul 15, 2025
697c120
Remove dup code
oscgonfer Jul 15, 2025
e4de0d0
Enable PM sensor before sending telemetry.
oscgonfer Jul 17, 2025
03b10c4
Small cleanups in SEN5X sensor
oscgonfer Jul 17, 2025
4e9b66a
Add dynamic measurement interval for SEN5X
oscgonfer Jul 17, 2025
6df0f88
Only disable SEN5X if enough time after reading.
oscgonfer Jul 17, 2025
c9fd77a
Idle for SEN5X on communication error
oscgonfer Jul 17, 2025
e54acf5
Cleanup of logs and remove unnecessary delays
oscgonfer Jul 18, 2025
5284215
Small TODO
oscgonfer Jul 22, 2025
eaf6cb5
Settle on uint16_t for SEN5X PM data
oscgonfer Jul 23, 2025
c45e0bf
Make AQTelemetry sensors non-exclusive
oscgonfer Jul 23, 2025
94750ed
Implementation of cleaning in FS prefs and cleanup
oscgonfer Aug 5, 2025
7f51253
Bring back detection code for SEN5X after branch rebase
oscgonfer Aug 6, 2025
456ee95
Add placeholder for admin message
oscgonfer Aug 7, 2025
f722ce0
Add VOC measurements and persistence (WIP)
oscgonfer Aug 7, 2025
8194be0
Add one-shot mode config flag to SEN5X
oscgonfer Aug 26, 2025
53f43dc
Add nan checks on sensor data from SEN5X
oscgonfer Aug 26, 2025
972aec1
Working implementation on VOCState
oscgonfer Aug 30, 2025
9ac258d
Fixes on VOC state and mode swtiching
oscgonfer Sep 14, 2025
31da50a
Adapt SEN5X to new sensor list structure. Improve reclock.
oscgonfer Jan 17, 2026
4fd2ed7
Merge branch 'master' into feat/add-sen5x
oscgonfer Jan 17, 2026
457eac3
Fix merge errors
oscgonfer Jan 17, 2026
0d455e1
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Jan 18, 2026
d547c4c
Small reordering in PMS class for consistency
oscgonfer Jan 18, 2026
2f95db2
If one sensor fails, AQ telemetry still reports data
oscgonfer Jan 18, 2026
f6cd9db
Small formatting fix
oscgonfer Jan 18, 2026
b4a2560
Add SEN5X to AQI in ScanI2C
oscgonfer Jan 18, 2026
52ca090
SCD4X now part of AQ module with template list
oscgonfer Jan 18, 2026
c6c97f1
Remove unnecessary import
oscgonfer Jan 18, 2026
26a05c3
Add co2 to serialized AQ metrics
oscgonfer Jan 20, 2026
7b995e1
Merge branch 'master' into feat/add-scd4x
oscgonfer Jan 20, 2026
abc0cf1
Merge branch 'feat/add-scd4x' into feat/add-sfa30
oscgonfer Jan 20, 2026
26f77c3
Add SFA30 with new sensor template in AQ module
oscgonfer Jan 20, 2026
46ff9ec
Merge branch 'master' into feat/add-sen5x
oscgonfer Jan 20, 2026
958923d
Update library dependencies in platformio.ini
oscgonfer Jan 20, 2026
8d8e116
Merge branch 'master' into feat/add-sen5x
oscgonfer Jan 27, 2026
588a700
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Jan 27, 2026
1e34ee2
Merge branch 'master' into feat/add-scd4x
thebentern Jan 27, 2026
712c43a
Merge branch 'master' into feat/add-sen5x
oscgonfer Jan 28, 2026
d1f1cf4
Fix unitialized variables in SEN5X constructor
oscgonfer Jan 28, 2026
74aedc9
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Jan 28, 2026
cdf6183
Fix missing import
oscgonfer Jan 28, 2026
18cf9f7
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Jan 28, 2026
105206c
Fix uninitMemberVars
oscgonfer Jan 28, 2026
637e0c6
Fix import error for SCD4X
oscgonfer Jan 28, 2026
66a1fc0
Fix I2CClock logic
oscgonfer Jan 28, 2026
5cfbc65
Fix multiple sensors being read simultaneously
oscgonfer Jan 28, 2026
4edfca9
Merge branch 'master' into feat/add-scd4x
thebentern Jan 29, 2026
7f4f078
Fix pending clock change in PMSA003
oscgonfer Jan 30, 2026
f3c5a33
Merge branch 'master' into feat/add-sen5x
oscgonfer Jan 31, 2026
7b125aa
Cleanup of SEN5X class
oscgonfer Feb 6, 2026
b5681dc
Exclude AQ sensor from wio-e5 due to flash limitations
oscgonfer Feb 6, 2026
a031e0e
Merge branch 'master' into feat/add-sen5x
oscgonfer Feb 6, 2026
8faeeb5
Fix I2C clock change logic
oscgonfer Feb 6, 2026
7b58e31
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Feb 6, 2026
4e1d405
Make sure clock is always set to needed value
oscgonfer Feb 6, 2026
1f91a62
Fix returns
oscgonfer Feb 6, 2026
2d02273
Fix trunk
oscgonfer Feb 6, 2026
960c1c6
Fix on condition in reclock
oscgonfer Feb 6, 2026
9e9751c
Merge branch 'feat/add-sen5x' into feat/add-scd4x
oscgonfer Feb 6, 2026
2cc1682
Fix trunk
oscgonfer Feb 6, 2026
bd793e0
Merge branch 'feat/add-scd4x' into feat/add-sfa30
oscgonfer Feb 7, 2026
1dc0cb0
Final SFA30 class implementation
oscgonfer Feb 7, 2026
df1d38c
Add HCHO to screen and improve logs
oscgonfer Feb 7, 2026
a9c924f
Add metrics to mesh packet serializer
oscgonfer Feb 7, 2026
7c604d1
Merge branch 'develop' into feat/add-sfa30
oscgonfer Feb 7, 2026
6a579c6
Minor fixes in logs
oscgonfer Feb 7, 2026
5ed19d4
OCD tidy up of logs
oscgonfer Feb 7, 2026
3ffe820
Merge branch 'develop' into feat/add-sfa30
oscgonfer Feb 8, 2026
e3587d7
Merge branch 'develop' into feat/add-sfa30
oscgonfer Feb 9, 2026
3ad1feb
Merge branch 'develop' into feat/add-sfa30
oscgonfer Feb 10, 2026
fc69e67
Fix sleep function
oscgonfer Feb 10, 2026
94c2bfd
Remove old I2C_CLOCK_SPEED code
oscgonfer Feb 10, 2026
be96cb5
Merge branch 'develop' into feat/add-sfa30
thebentern Feb 11, 2026
212d250
Merge branch 'develop' into feat/add-sfa30
oscgonfer Feb 11, 2026
cc91518
Merge branch 'develop' into feat/add-sfa30
thebentern Feb 11, 2026
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 platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ lib_deps =
sensirion/Sensirion [email protected]
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
sensirion/Sensirion I2C [email protected]
# renovate: datasource=custom.pio depName=Sensirion I2C SFA3x packageName=sensirion/library/Sensirion I2C SFA3x
sensirion/Sensirion I2C [email protected]

; Same as environmental_extra but without BSEC (saves ~3.5KB DRAM for original ESP32 targets)
[environmental_extra_no_bsec]
Expand Down Expand Up @@ -242,3 +244,5 @@ lib_deps =
sensirion/Sensirion [email protected]
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
sensirion/Sensirion I2C [email protected]
# renovate: datasource=custom.pio depName=Sensirion I2C SFA3x packageName=sensirion/library/Sensirion I2C SFA3x
sensirion/Sensirion I2C [email protected]
1 change: 1 addition & 0 deletions src/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SHTC3_ADDR 0x70
#define LPS22HB_ADDR 0x5C
#define LPS22HB_ADDR_ALT 0x5D
#define SFA30_ADDR 0x5D
#define SHT31_4x_ADDR 0x44
#define SHT31_4x_ADDR_ALT 0x45
#define PMSA003I_ADDR 0x12
Expand Down
2 changes: 1 addition & 1 deletion src/detect/ScanI2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const

ScanI2C::FoundDevice ScanI2C::firstAQI() const
{
ScanI2C::DeviceType types[] = {PMSA003I, SEN5X, SCD4X};
ScanI2C::DeviceType types[] = {PMSA003I, SEN5X, SCD4X, SFA30};
return firstOfOrNONE(2, types);
}

Expand Down
5 changes: 3 additions & 2 deletions src/detect/ScanI2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class ScanI2C
DA217,
CHSC6X,
CST226SE,
CW2015,
SEN5X
SEN5X,
SFA30,
CW2015
} DeviceType;

// typedef uint8_t DeviceAddress;
Expand Down
9 changes: 9 additions & 0 deletions src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "ScanI2CTwoWire.h"
#include "configuration.h"
#include "detect/ScanI2C.h"

#if !MESHTASTIC_EXCLUDE_I2C

Expand Down Expand Up @@ -456,6 +458,13 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
break;

case LPS22HB_ADDR_ALT:
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xD060), 48); // get device marking
if (registerValue != 0) {
type = SFA30;
logFoundDevice("SFA30", (uint8_t)addr.address);
break;
}
// TODO - What happens with these two?
SCAN_SIMPLE_CASE(LPS22HB_ADDR, LPS22HB, "LPS22HB", (uint8_t)addr.address)
SCAN_SIMPLE_CASE(QMC6310U_ADDR, QMC6310U, "QMC6310U", (uint8_t)addr.address)

Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ void setup()
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MLX90614, meshtastic_TelemetrySensorType_MLX90614);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::ICM20948, meshtastic_TelemetrySensorType_ICM20948);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MAX30102, meshtastic_TelemetrySensorType_MAX30102);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::SCD4X, meshtastic_TelemetrySensorType_SCD4X);
#endif

#ifdef HAS_SDCARD
Expand Down
44 changes: 32 additions & 12 deletions src/modules/Telemetry/AirQualityTelemetry.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "DebugConfiguration.h"
#include "configuration.h"

#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR
Expand Down Expand Up @@ -25,6 +26,9 @@
#if __has_include(<SensirionI2cScd4x.h>)
#include "Sensor/SCD4XSensor.h"
#endif
#if __has_include(<SensirionI2cSfa3x.h>)
#include "Sensor/SFA30Sensor.h"
#endif

void AirQualityTelemetryModule::i2cScanFinished(ScanI2C *i2cScanner)
{
Expand All @@ -50,6 +54,9 @@ void AirQualityTelemetryModule::i2cScanFinished(ScanI2C *i2cScanner)
#if __has_include(<SensirionI2cScd4x.h>)
addSensor<SCD4XSensor>(i2cScanner, ScanI2C::DeviceType::SCD4X);
#endif
#if __has_include(<SensirionI2cSfa3x.h>)
addSensor<SFA30Sensor>(i2cScanner, ScanI2C::DeviceType::SFA30);
#endif
}

int32_t AirQualityTelemetryModule::runOnce()
Expand All @@ -71,7 +78,8 @@ int32_t AirQualityTelemetryModule::runOnce()
}

if (firstTime) {
// This is the first time the OSThread library has called this function, so do some setup
// This is the first time the OSThread library has called this function, so
// do some setup
firstTime = false;

if (moduleConfig.telemetry.air_quality_enabled) {
Expand Down Expand Up @@ -221,6 +229,8 @@ void AirQualityTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSta
entries.push_back("PM10: " + String(m.pm100_standard) + "ug/m3");
if (m.has_co2)
entries.push_back("CO2: " + String(m.co2) + "ppm");
if (m.has_form_formaldehyde)
entries.push_back("HCHO: " + String(m.form_formaldehyde) + "ppb");

// === Show first available metric on top-right of first line ===
if (!entries.empty()) {
Expand Down Expand Up @@ -256,17 +266,19 @@ bool AirQualityTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPack
#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)
const char *sender = getSenderShortName(mp);

LOG_INFO("(Received from %s): pm10_standard=%i, pm25_standard=%i, pm100_standard=%i", sender,
t->variant.air_quality_metrics.pm10_standard, t->variant.air_quality_metrics.pm25_standard,
t->variant.air_quality_metrics.pm100_standard);
if (t->variant.air_quality_metrics.has_pm10_standard)
LOG_INFO("(Received from %s): pm10_standard=%i, pm25_standard=%i, "
"pm100_standard=%i",
sender, t->variant.air_quality_metrics.pm10_standard, t->variant.air_quality_metrics.pm25_standard,
t->variant.air_quality_metrics.pm100_standard);

// TODO - Decide what to do with these
// LOG_INFO(" | PM1.0(Environmental)=%i, PM2.5(Environmental)=%i, PM10.0(Environmental)=%i",
// t->variant.air_quality_metrics.pm10_environmental, t->variant.air_quality_metrics.pm25_environmental,
// t->variant.air_quality_metrics.pm100_environmental);
if (t->variant.air_quality_metrics.has_co2)
LOG_INFO("CO2=%i, CO2_T=%.2f, CO2_H=%.2f", t->variant.air_quality_metrics.co2,
t->variant.air_quality_metrics.co2_temperature, t->variant.air_quality_metrics.co2_humidity);

LOG_INFO(" | CO2=%i, CO2_T=%f, CO2_H=%f", t->variant.air_quality_metrics.co2,
t->variant.air_quality_metrics.co2_temperature, t->variant.air_quality_metrics.co2_humidity);
if (t->variant.air_quality_metrics.has_form_formaldehyde)
LOG_INFO("HCHO=%.2f, HCHO_T=%.2f, HCHO_H=%.2f", t->variant.air_quality_metrics.form_formaldehyde,
t->variant.air_quality_metrics.form_temperature, t->variant.air_quality_metrics.form_humidity);
#endif
// release previous packet before occupying a new spot
if (lastMeasurementPacket != nullptr)
Expand Down Expand Up @@ -354,10 +366,18 @@ bool AirQualityTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
m.variant.air_quality_metrics.has_co2_humidity;

if (hasAnyCO2) {
LOG_INFO("Send: co2=%i, co2_t=%f, co2_rh=%f", m.variant.air_quality_metrics.co2,
LOG_INFO("Send: co2=%i, co2_t=%.2f, co2_rh=%.2f", m.variant.air_quality_metrics.co2,
m.variant.air_quality_metrics.co2_temperature, m.variant.air_quality_metrics.co2_humidity);
}

bool hasAnyHCHO = m.variant.air_quality_metrics.has_form_formaldehyde ||
m.variant.air_quality_metrics.has_form_temperature || m.variant.air_quality_metrics.has_form_humidity;

if (hasAnyHCHO) {
LOG_INFO("Send: hcho=%.2f, hcho_t=%.2f, hcho_rh=%.2f", m.variant.air_quality_metrics.form_formaldehyde,
m.variant.air_quality_metrics.form_temperature, m.variant.air_quality_metrics.form_humidity);
}

meshtastic_MeshPacket *p = allocDataProtobuf(m);
p->to = dest;
p->decoded.want_response = false;
Expand Down Expand Up @@ -426,4 +446,4 @@ AdminMessageHandleResult AirQualityTelemetryModule::handleAdminMessageForModule(
return result;
}

#endif
#endif
3 changes: 2 additions & 1 deletion src/modules/Telemetry/AirQualityTelemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ class AirQualityTelemetryModule : private concurrency::OSThread,
bool firstTime = true;
meshtastic_MeshPacket *lastMeasurementPacket;
uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute
// uint32_t sendToPhoneIntervalMs = 1000; // Send to phone every minute
uint32_t lastSentToMesh = 0;
uint32_t lastSentToPhone = 0;
};

#endif
#endif
4 changes: 4 additions & 0 deletions src/modules/Telemetry/Sensor/PMSA003ISensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ bool PMSA003ISensor::getMetrics(meshtastic_Telemetry *measurement)
measurement->variant.air_quality_metrics.has_particles_100um = true;
measurement->variant.air_quality_metrics.particles_100um = read16(buffer, 26);

LOG_DEBUG("Got %s readings: pM1p0_standard=%u, pM2p5_standard=%u, pM10p0_standard=%u", sensorName,
measurement->variant.air_quality_metrics.pm10_standard, measurement->variant.air_quality_metrics.pm25_standard,
measurement->variant.air_quality_metrics.pm100_standard);

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/Telemetry/Sensor/SCD4XSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ bool SCD4XSensor::getMetrics(meshtastic_Telemetry *measurement)
reClockI2C(currentClock, _bus, false);
#endif

LOG_DEBUG("%s readings: %u ppm, %.2f degC, %.2f %rh", sensorName, co2, temperature, humidity);
LOG_DEBUG("Got %s readings: co2=%u, co2_temp=%.2f, co2_hum%.2f", sensorName, co2, temperature, humidity);
if (error != SCD4X_NO_ERROR) {
LOG_DEBUG("%s: Error while getting measurements: %u", sensorName, error);
if (co2 == 0) {
Expand Down
16 changes: 8 additions & 8 deletions src/modules/Telemetry/Sensor/SEN5XSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,16 +665,16 @@ bool SEN5XSensor::readValues()
sen5xmeasurement.vocIndex = !isnan(int_vocIndex) ? int_vocIndex / 10.0f : FLT_MAX;
sen5xmeasurement.noxIndex = !isnan(int_noxIndex) ? int_noxIndex / 10.0f : FLT_MAX;

LOG_DEBUG("Got: pM1p0=%u, pM2p5=%u, pM4p0=%u, pM10p0=%u", sen5xmeasurement.pM1p0, sen5xmeasurement.pM2p5,
sen5xmeasurement.pM4p0, sen5xmeasurement.pM10p0);
LOG_DEBUG("Got %s readings: pM1p0=%u, pM2p5=%u, pM4p0=%u, pM10p0=%u", sensorName, sen5xmeasurement.pM1p0,
sen5xmeasurement.pM2p5, sen5xmeasurement.pM4p0, sen5xmeasurement.pM10p0);

if (model != SEN50) {
LOG_DEBUG("Got: humidity=%.2f, temperature=%.2f, vocIndex=%.2f", sen5xmeasurement.humidity, sen5xmeasurement.temperature,
sen5xmeasurement.vocIndex);
LOG_DEBUG("Got %s readings: humidity=%.2f, temperature=%.2f, vocIndex=%.2f", sensorName, sen5xmeasurement.humidity,
sen5xmeasurement.temperature, sen5xmeasurement.vocIndex);
}

if (model == SEN55) {
LOG_DEBUG("Got: noxIndex=%.2f", sen5xmeasurement.noxIndex);
LOG_DEBUG("Got %s readings: noxIndex=%.2f", sensorName, sen5xmeasurement.noxIndex);
}

return true;
Expand Down Expand Up @@ -727,9 +727,9 @@ bool SEN5XSensor::readPNValues(bool cumulative)
sen5xmeasurement.pN1p0 -= sen5xmeasurement.pN0p5;
}

LOG_DEBUG("Got: pN0p5=%u, pN1p0=%u, pN2p5=%u, pN4p0=%u, pN10p0=%u, tSize=%.2f", sen5xmeasurement.pN0p5,
sen5xmeasurement.pN1p0, sen5xmeasurement.pN2p5, sen5xmeasurement.pN4p0, sen5xmeasurement.pN10p0,
sen5xmeasurement.tSize);
LOG_DEBUG("Got %s readings: pN0p5=%u, pN1p0=%u, pN2p5=%u, pN4p0=%u, pN10p0=%u, tSize=%.2f", sensorName,
sen5xmeasurement.pN0p5, sen5xmeasurement.pN1p0, sen5xmeasurement.pN2p5, sen5xmeasurement.pN4p0,
sen5xmeasurement.pN10p0, sen5xmeasurement.tSize);

return true;
}
Expand Down
Loading