Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
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
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
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
2 changes: 0 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ lib_deps =
adafruit/Adafruit INA260 Library@1.5.3
# renovate: datasource=custom.pio depName=Adafruit INA219 packageName=adafruit/library/Adafruit INA219
adafruit/Adafruit INA219@1.2.3
# renovate: datasource=custom.pio depName=Adafruit PM25 AQI Sensor packageName=adafruit/library/Adafruit PM25 AQI Sensor
adafruit/Adafruit PM25 AQI Sensor@2.0.0
# renovate: datasource=custom.pio depName=Adafruit MPU6050 packageName=adafruit/library/Adafruit MPU6050
adafruit/Adafruit MPU6050@2.2.6
# renovate: datasource=custom.pio depName=Adafruit LIS3DH packageName=adafruit/library/Adafruit LIS3DH
Expand Down
3 changes: 2 additions & 1 deletion src/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LPS22HB_ADDR_ALT 0x5D
#define SHT31_4x_ADDR 0x44
#define SHT31_4x_ADDR_ALT 0x45
#define PMSA0031_ADDR 0x12
#define PMSA003I_ADDR 0x12
#define QMA6100P_ADDR 0x12
#define AHT10_ADDR 0x38
#define RCWL9620_ADDR 0x57
Expand Down Expand Up @@ -480,6 +480,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MESHTASTIC_EXCLUDE_AUDIO 1
#define MESHTASTIC_EXCLUDE_DETECTIONSENSOR 1
#define MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR 1
#define MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR 1
#define MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY 1
#define MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION 1
#define MESHTASTIC_EXCLUDE_PAXCOUNTER 1
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[] = {PMSA0031, SCD4X};
ScanI2C::DeviceType types[] = {PMSA003I, SCD4X};
return firstOfOrNONE(2, types);
}

Expand Down
2 changes: 1 addition & 1 deletion src/detect/ScanI2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ScanI2C
QMI8658,
QMC5883L,
HMC5883L,
PMSA0031,
PMSA003I,
QMA6100P,
MPU6050,
LIS3DH,
Expand Down
2 changes: 1 addition & 1 deletion src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
#ifdef HAS_QMA6100P
SCAN_SIMPLE_CASE(QMA6100P_ADDR, QMA6100P, "QMA6100P", (uint8_t)addr.address)
#else
SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031", (uint8_t)addr.address)
SCAN_SIMPLE_CASE(PMSA003I_ADDR, PMSA003I, "PMSA003I", (uint8_t)addr.address)
#endif
case BMA423_ADDR: // this can also be LIS3DH_ADDR_ALT
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 2);
Expand Down
40 changes: 40 additions & 0 deletions src/detect/reClockI2C.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifdef CAN_RECLOCK_I2C
#include "ScanI2CTwoWire.h"

uint32_t reClockI2C(uint32_t desiredClock, TwoWire *i2cBus) {

uint32_t currentClock;

/* See https://github.com/arduino/Arduino/issues/11457
Currently, only ESP32 can getClock()
While all cores can setClock()
https://github.com/sandeepmistry/arduino-nRF5/blob/master/libraries/Wire/Wire.h#L50
https://github.com/earlephilhower/arduino-pico/blob/master/libraries/Wire/src/Wire.h#L60
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/libraries/Wire/src/Wire.h#L103
For cases when I2C speed is different to the ones defined by sensors (see defines in sensor classes)
we need to reclock I2C and set it back to the previous desired speed.
Only for cases where we can know OR predefine the speed, we can do this.
*/

#ifdef ARCH_ESP32
currentClock = i2cBus->getClock();
#elif defined(ARCH_NRF52)
// TODO add getClock function or return a predefined clock speed per variant?
return 0;
#elif defined(ARCH_RP2040)
// TODO add getClock function or return a predefined clock speed per variant
return 0;
#elif defined(ARCH_STM32WL)
// TODO add getClock function or return a predefined clock speed per variant
return 0;
#else
return 0;
#endif

if (currentClock != desiredClock){
LOG_DEBUG("Changing I2C clock to %u", desiredClock);
i2cBus->setClock(desiredClock);
}
return currentClock;
}
#endif
16 changes: 12 additions & 4 deletions src/graphics/draw/MenuHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,8 @@ void menuHandler::FrameToggles_menu()
lora,
clock,
show_favorites,
show_telemetry,
show_env_telemetry,
show_aq_telemetry,
show_power,
enumEnd
};
Expand Down Expand Up @@ -2292,8 +2293,11 @@ void menuHandler::FrameToggles_menu()
optionsArray[options] = screen->isFrameHidden("show_favorites") ? "Show Favorites" : "Hide Favorites";
optionsEnumArray[options++] = show_favorites;

optionsArray[options] = moduleConfig.telemetry.environment_screen_enabled ? "Hide Telemetry" : "Show Telemetry";
optionsEnumArray[options++] = show_telemetry;
optionsArray[options] = moduleConfig.telemetry.environment_screen_enabled ? "Hide Env. Telemetry" : "Show Env. Telemetry";
optionsEnumArray[options++] = show_env_telemetry;

optionsArray[options] = moduleConfig.telemetry.air_quality_screen_enabled ? "Hide AQ Telemetry" : "Show AQ Telemetry";
optionsEnumArray[options++] = show_aq_telemetry;

optionsArray[options] = moduleConfig.telemetry.power_screen_enabled ? "Hide Power" : "Show Power";
optionsEnumArray[options++] = show_power;
Expand Down Expand Up @@ -2356,10 +2360,14 @@ void menuHandler::FrameToggles_menu()
screen->toggleFrameVisibility("show_favorites");
menuHandler::menuQueue = menuHandler::FrameToggles;
screen->runNow();
} else if (selected == show_telemetry) {
} else if (selected == show_env_telemetry) {
moduleConfig.telemetry.environment_screen_enabled = !moduleConfig.telemetry.environment_screen_enabled;
menuHandler::menuQueue = menuHandler::FrameToggles;
screen->runNow();
} else if (selected == show_aq_telemetry) {
moduleConfig.telemetry.air_quality_screen_enabled = !moduleConfig.telemetry.air_quality_screen_enabled;
menuHandler::menuQueue = menuHandler::FrameToggles;
screen->runNow();
} else if (selected == show_power) {
moduleConfig.telemetry.power_screen_enabled = !moduleConfig.telemetry.power_screen_enabled;
menuHandler::menuQueue = menuHandler::FrameToggles;
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ void setup()
Wire.setSCL(I2C_SCL);
Wire.begin();
#elif defined(I2C_SDA) && !defined(ARCH_RP2040)
LOG_INFO("Starting Bus with (SDA) %d and (SCL) %d: ", I2C_SDA, I2C_SCL);
Wire.begin(I2C_SDA, I2C_SCL);
#elif defined(ARCH_PORTDUINO)
if (portduino_config.i2cdev != "") {
Expand Down Expand Up @@ -762,7 +763,6 @@ void setup()
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMI8658, meshtastic_TelemetrySensorType_QMI8658);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMC5883L, meshtastic_TelemetrySensorType_QMC5883L);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::HMC5883L, meshtastic_TelemetrySensorType_QMC5883L);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::PMSA0031, meshtastic_TelemetrySensorType_PMSA003I);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MLX90614, meshtastic_TelemetrySensorType_MLX90614);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::ICM20948, meshtastic_TelemetrySensorType_ICM20948);
scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MAX30102, meshtastic_TelemetrySensorType_MAX30102);
Expand Down
6 changes: 3 additions & 3 deletions src/modules/Modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ void setupModules()
(moduleConfig.telemetry.environment_measurement_enabled || moduleConfig.telemetry.environment_screen_enabled)) {
new EnvironmentTelemetryModule();
}
#if __has_include("Adafruit_PM25AQI.h")
if (moduleConfig.has_telemetry && moduleConfig.telemetry.air_quality_enabled &&
nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_PMSA003I].first > 0) {
#if HAS_TELEMETRY && HAS_SENSOR && !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR
if (moduleConfig.has_telemetry &&
(moduleConfig.telemetry.air_quality_enabled || moduleConfig.telemetry.air_quality_screen_enabled)) {
new AirQualityTelemetryModule();
}
#endif
Expand Down
Loading