Add detection framework for multiple AirQuality sensors#7187
Merged
fifieldt merged 2 commits intomeshtastic:masterfrom Jul 1, 2025
Merged
Add detection framework for multiple AirQuality sensors#7187fifieldt merged 2 commits intomeshtastic:masterfrom
fifieldt merged 2 commits intomeshtastic:masterfrom
Conversation
fifieldt
commented
Jul 1, 2025
Member
Author
fifieldt
left a comment
There was a problem hiding this comment.
This piece of the code was written by Coloradohusky and has been thoroughly tested since Sept 2024. Will merge this quickly to help the hackathon people.
Tested in hardware using a T114 and SCD40.
Now we have the ability to detect multiple AirQualitySensors, follow the lead of other sensor types and create supporting methods and objects for using this information. Continued cherry-picking to get meshtastic#4601 over the line :) Co-Authored-By: @Coloradohusky
thebentern
approved these changes
Jul 1, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds detection framework support for multiple AirQuality sensors by introducing new variables and methods to enable sensor detection and mapping.
- Added global variable and initialization for Air Quality Indicator sensor detection.
- Implemented a new method firstAQI() in ScanI2C for detecting AQI sensors and integrated its usage in the main setup flow.
- Extended the sensor-to-sensor map with the SCD4X sensor telemetry type.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main.h | Declares new external variable for AQI sensor detection. |
| src/main.cpp | Initializes and assigns the AQI sensor address and adds sensor mapping. |
| src/detect/ScanI2C.h | Declares new firstAQI() method for AQI sensor detection. |
| src/detect/ScanI2C.cpp | Implements firstAQI() to return the first found AQI sensor. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now we have the ability to detect multiple AirQualitySensors, follow the lead of other sensor types and create supporting methods and objects for using this information.
Continued cherry-picking to get #4601 over the line :)
Co-Authored-By: @Coloradohusky