Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devel #207

Merged
merged 51 commits into from
Jan 18, 2025
Merged

Devel #207

Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0ab605e
added Telegram badge for support community
hpsaturn Feb 13, 2024
6da7201
Fix CO2scd30Init() function.
melkati Feb 16, 2024
8511eac
Add debug statement for SCD30 temperature offset in CO2scd30Init()
melkati Feb 16, 2024
4232934
Do sensorRegister(SENSORS::SSCD4x) prior to seeting offsets.
melkati Feb 19, 2024
0482305
Add temperature offset getter for Sensirion sensors
melkati Feb 20, 2024
c18bd12
Fix temperature offset getters for SCD4x and SCD30 sensors
melkati Feb 20, 2024
93180ee
Fix getTempOffset function declaration in Sensors class
melkati Feb 20, 2024
7b22bed
Merge branch 'kike-canaries:master' into fixOffset
melkati Feb 20, 2024
6d188f9
Refactor getTempOffset function to check if sensor is registered
melkati Feb 21, 2024
45ddbb0
Merge branch 'fixOffset' of https://github.com/melkati/canairio_senso…
melkati Feb 21, 2024
622ff0b
Merge pull request #204 from melkati/fixOffset
hpsaturn Feb 21, 2024
cbb19df
Add internal temperature offset initialization and retrieval methods
melkati Feb 27, 2024
2882fca
Merge pull request #205 from melkati/fixOffset
hpsaturn Feb 27, 2024
711acff
Merge pull request #206 from kike-canaries/fix_203_toffset
hpsaturn Mar 6, 2024
97c0d11
added basic and initial support for M5AirQ SCD40 sensor
hpsaturn Mar 7, 2024
e0fa841
removed Wire initialization. The user should do that. Please check!
hpsaturn Mar 7, 2024
ba50613
fixed SEN5X init issue (bad pin level choosed)
hpsaturn Mar 7, 2024
9b38f52
fixed issue on sen5x read. Added startMeasure call
hpsaturn Mar 7, 2024
d19b2dd
clang format and minors refators
hpsaturn Mar 7, 2024
130b126
removed unnecesary libraries
hpsaturn Mar 7, 2024
540ed6f
added missing variables from sen5x sensor. New units: voci and noxi
hpsaturn Mar 7, 2024
375a48a
fixed some clang issues
hpsaturn Mar 7, 2024
689712b
improved i2c init for M5AIRQ variant
hpsaturn Mar 8, 2024
b605255
Merge pull request #208 from kike-canaries/m5AirQS3
hpsaturn Mar 8, 2024
7b65fc0
Merge branch 'devel' of github.com:kike-canaries/canairio_sensorlib i…
hpsaturn Mar 23, 2024
e937396
removed old Travis Badge
hpsaturn Jun 1, 2024
25a1bcd
testing Serial0 and Generic driver for Airgradient. Works
hpsaturn Jun 3, 2024
9045759
fixed issue on S8 UART library. Thanks to @jcomas
hpsaturn Jun 13, 2024
d840280
fixed CI issue on M5Atom test
hpsaturn Jun 13, 2024
17acd44
fixes clang CI issues
hpsaturn Jun 13, 2024
d96782d
Merge pull request #209 from kike-canaries/air_gradient_drivers
hpsaturn Jun 13, 2024
d8e4975
added define globas for airgradient i2c pins.
hpsaturn Sep 14, 2024
ed476b9
initial implementation for SGP41 sensor (untested)
hpsaturn Sep 14, 2024
8bb5505
fixed some debug message issues
hpsaturn Sep 14, 2024
518228c
fixed some clang format issues
hpsaturn Sep 14, 2024
319b33c
added original driver from Airgradient for PMS5003T sensor
hpsaturn Sep 16, 2024
8deb1ab
removed missing references and some link fixes
hpsaturn Sep 17, 2024
a498293
fixed link issues for esp32 families. Pending esp8266 and atmel
hpsaturn Sep 17, 2024
28ce5f0
fixed issues for atmelsam and esp8266. (untested on real hw)
hpsaturn Sep 17, 2024
a3edd26
unified Serial schema for HardwareSerial reference
hpsaturn Sep 18, 2024
b198b5c
added read implementation for pms5003t
hpsaturn Sep 18, 2024
fe317d2
fixed issue on Serial initialization and added missing units
hpsaturn Sep 19, 2024
0b216f3
fixed some clang issues and removed warnning with ms init
hpsaturn Sep 20, 2024
4c8c8ff
missing clang fixes
hpsaturn Sep 20, 2024
fbbcf94
Merge pull request #211 from kike-canaries/improv_pms5003t
hpsaturn Sep 20, 2024
9598d14
Merge pull request #210 from kike-canaries/air_gradient_drivers
hpsaturn Sep 20, 2024
23b1acf
missing init and read methods calls for sgh41
hpsaturn Oct 4, 2024
666c236
now the default TX/RX pina are -1,-1. If not pass it on init
hpsaturn Jan 12, 2025
0400dca
Merge pull request #212 from kike-canaries/fix_uart_c3_generic
hpsaturn Jan 13, 2025
6f57d13
fixed issues with Python version on CI workflow
hpsaturn Jan 18, 2025
40d11ad
Merge pull request #213 from kike-canaries/fix_ci_issues
hpsaturn Jan 18, 2025
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
Prev Previous commit
Next Next commit
fixed issue on Serial initialization and added missing units
hpsaturn committed Sep 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit fe317d2c4e8c2eae8e710762d7249abe7eb79b84
18 changes: 14 additions & 4 deletions src/Sensors.cpp
Original file line number Diff line number Diff line change
@@ -786,8 +786,16 @@ bool Sensors::pm1006Read() {
bool Sensors::pm5003TRead() {
if (!isSensorRegistered(SENSORS::P5003T)) return false;
pm5003t->handle();
pm1 = pm5003t->getPm01Ae();
pm25 = pm5003t->getPm25Ae();
pm10 = pm5003t->getPm10Ae();
temp = pm5003t->getTemperature();
humi = pm5003t->getRelativeHumidity();
unitRegister(UNIT::PM1);
unitRegister(UNIT::PM25);
unitRegister(UNIT::PM10);
unitRegister(UNIT::HUM);
unitRegister(UNIT::TEMP);
return true;
}

@@ -1271,6 +1279,9 @@ bool Sensors::sensorSerialInit(u_int pms_type, int pms_rx, int pms_tx) {
} else if (pms_type == SENSORS::IKEAVK) {
DEBUG("-->[SLIB] UART detecting type\t: SENSEAIRS8");
if (!serialInit(pms_type, PM1006::BIT_RATE, pms_rx, pms_tx)) return false;
} else if (pms_type == SENSORS::P5003T) {
DEBUG("-->[SLIB] UART detecting type\t: PMS5003T");
if (!serialInit(pms_type, 9600, pms_rx, pms_tx)) return false;
}

// starting auto detection loop
@@ -1377,11 +1388,10 @@ bool Sensors::PM1006Init() {
}

bool Sensors::PM5003TInit(){
pm5003t = new PMS5003T();
bool pms_ready = pm5003t->begin(*_serial);
if (!pms_ready) return false;
pm5003t = new PMS5003T(*_serial);
if (!pm5003t->begin()) return false;
sensorRegister(SENSORS::P5003T);
return pms_ready;
return true;
}

bool Sensors::CO2CM1106Init() {
11 changes: 3 additions & 8 deletions src/drivers/PMS5003T.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
#include "PMS5003T.h"

/**
* @brief Init Sensor
* @brief Constructor.
*
* @param serial Serial communication with sensor
* @return true Success
* @return false Failure
* @param serial the serial port, NOTE: the serial port has to be pre-configured
*/
bool PMS5003T::begin(Stream &serial) {
this->_serial = &serial;
return this->begin();
}
PMS5003T::PMS5003T(Stream &serial) { this->_serial = &serial; }

/**
* @brief Init sensor
4 changes: 2 additions & 2 deletions src/drivers/PMS5003T.h
Original file line number Diff line number Diff line change
@@ -11,7 +11,8 @@
*/
class PMS5003T: public PMS5003TBase {
public:
bool begin(Stream &serial);
explicit PMS5003T(Stream &serial);
bool begin(void);
void end(void);
void handle(void);
bool isFailed(void);
@@ -28,7 +29,6 @@ class PMS5003T: public PMS5003TBase {
bool _isSleep = false;
Stream *_serial;
PMSBase pms;
bool begin(void);
bool isBegin(void);
};