Merge commit '0370a8aa15ffaf776f9055f84b5d7c221046b9be' into fix/pms-read-data

This commit is contained in:
Phat Nguyen committed 2024-09-24 10:39:04 +07:00
commit 2e0ba26c97
21 files changed
+309 -245

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
#include "../Main/BoardDef.h"
/**
* @brief Init and check that sensor has connected
* @brief Initializes the sensor and attempts to read data.
*
* @param stream UART stream
* @return true Sucecss
+3
View File
@@ -5,6 +5,9 @@
#define PMS_FAIL_COUNT_SET_INVALID 3
/**
* Known to work with these sensors: Plantower PMS5003, Plantower PMS5003, Cubic PM2009X
*/
class PMSBase {
public:
bool begin(HardwareSerial& serial);
+2 -5
View File
@@ -38,14 +38,11 @@ bool PMS5003::begin(HardwareSerial &serial) {
PMS5003::PMS5003(BoardType def) : _boardDef(def) {}
/**
* @brief Init sensor
*
* @return true Success
* @return false Failure
* Initializes the sensor.
*/
bool PMS5003::begin(void) {
if (this->_isBegin) {
AgLog("Initialized, call end() then try again");
AgLog("Already initialized, call end() then try again");
return true;
}