Skip to content

Commit a3691e2

Browse files
committed
minor corrections in comments
minor corrections
1 parent 2b75047 commit a3691e2

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

SD_ZH03B.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ The range of measured PM1.0, PM2.5 and PM10 values are all 0-1000ug/m3.
1919
2020
- **SD_ZH03B( Stream& serial )** - Class Constructor
2121
- **bool readData(void)** - read data from the module; returns **true** if data are read, verified and valid (validate by calculating checkSum of the data received).
22-
- **void setInitiativeMode(void)** - sets the "Initiative Upload" (IU) operstion mode. The module launches in that mode by default and shoot data to the COM port every second. So, no need to set up the mode after the module initialization.
23-
- **void setQandAmode(void)** - sets the Q&A opertion mode; Module sends the data on demand.
22+
- **void setInitiativeMode(void)** - sets the "Initiative Upload" (IU) operation mode. The module launches in that mode by default and shoot data to the COM port every second. So, no need to set up the mode after the module initialization.
23+
- **void setQandAmode(void)** - sets the Q&A operation mode; Module sends the data on demand.
2424
- **void setMode( const mode_t mode = IU_MODE )** - same as above two methods, can be used interchangable: sets the operation mode by using pre-defined constants IU_MODE and QA_MODE. Can be used interchangibly.
25-
- **mode_t getMode()** - returns current mode.
25+
- **mode_t getMode(void)** - returns current mode.
2626
- **bool sleep(void)** - put the module into a "Dormaint" mode. Dormancy consumption current <20mA. Returns **true** if command is confirmed by the module as successful.
2727
- **bool wakeup(void)** - wake up from a "Dormaint" mode. Working Current <120mA. Returns **true** if command is confirmed by the module as successful.
2828
- **uint16_t getPM1_0(void)** - returns a value of PM1.0 particles concentration in ug/m3
@@ -65,7 +65,6 @@ SD_ZH03B::~SD_ZH03B(){}
6565

6666

6767
bool SD_ZH03B::readData(void) {
68-
6968
if( _currentMode == QA_MODE ) { // request data: send a request command
7069
_sendCmd( 0x86, 0x00, 0x79 );
7170
delay(20);

SD_ZH03B.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ The range of measured PM1.0, PM2.5 and PM10 values are all 0-1000ug/m3.
1919
2020
- **SD_ZH03B( Stream& serial )** - Class Constructor
2121
- **bool readData(void)** - read data from the module; returns **true** if data are read, verified and valid (validate by calculating checkSum of the data received).
22-
- **void setInitiativeMode(void)** - sets the "Initiative Upload" (IU) operstion mode. The module launches in that mode by default and shoot data to the COM port every second. So, no need to set up the mode after the module initialization.
23-
- **void setQandAmode(void)** - sets the Q&A opertion mode; Module sends the data on demand.
22+
- **void setInitiativeMode(void)** - sets the "Initiative Upload" (IU) operation mode. The module launches in that mode by default and shoot data to the COM port every second. So, no need to set up the mode after the module initialization.
23+
- **void setQandAmode(void)** - sets the Q&A operation mode; Module sends the data on demand.
2424
- **void setMode( const mode_t mode = IU_MODE )** - same as above two methods, can be used interchangable: sets the operation mode by using pre-defined constants IU_MODE and QA_MODE. Can be used interchangibly.
25-
- **mode_t getMode()** - returns current mode.
25+
- **mode_t getMode(void)** - returns current mode.
2626
- **bool sleep(void)** - put the module into a "Dormaint" mode. Dormancy consumption current <20mA. Returns **true** if command is confirmed by the module as successful.
2727
- **bool wakeup(void)** - wake up from a "Dormaint" mode. Working Current <120mA. Returns **true** if command is confirmed by the module as successful.
2828
- **uint16_t getPM1_0(void)** - returns a value of PM1.0 particles concentration in ug/m3
@@ -115,25 +115,25 @@ enum mode_t : uint8_t {
115115
* @brief Returns the latest PM 1.0 reading
116116
* @note in IU_Mode Sensor reports new reading ~ every 1 sec.
117117
* @return PM 1.0 reading (unsigned int16)*/
118-
uint16_t getPM1_0(void) const {
119-
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM1_0 : _unionFrame.ZH03B_QAframe.concPM1_0;
120-
}
118+
uint16_t getPM1_0(void) const {
119+
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM1_0 : _unionFrame.ZH03B_QAframe.concPM1_0;
120+
}
121121

122122
/**
123123
* @brief Returns the latest PM 2.5 reading
124124
* @note in IU_Mode Sensor reports new reading ~ every 1 sec.
125125
* @return PM 2.5 reading (unsigned int16)*/
126-
uint16_t getPM2_5(void) const {
127-
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM2_5 : _unionFrame.ZH03B_QAframe.concPM2_5;
128-
}
126+
uint16_t getPM2_5(void) const {
127+
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM2_5 : _unionFrame.ZH03B_QAframe.concPM2_5;
128+
}
129129

130130
/**
131131
* @brief Returns the latest PM 10.0 reading
132132
* @note in IU_Mode Sensor reports new reading ~ every 1 sec.
133133
* @return PM 10.0 reading (unsigned int16)*/
134-
uint16_t getPM10_0(void) const {
135-
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM10_0 : _unionFrame.ZH03B_QAframe.concPM10_0;
136-
}
134+
uint16_t getPM10_0(void) const {
135+
return _currentMode == IU_MODE ? _unionFrame.ZH03B_IUframe.concPM10_0 : _unionFrame.ZH03B_QAframe.concPM10_0;
136+
}
137137

138138
#define SIZEOF_IU_FRAME 24
139139
#define SIZEOF_QA_FRAME 9

0 commit comments

Comments
 (0)