Skip to content

Commit 40c894a

Browse files
committed
v 2.00 ready
1 parent 5babcd0 commit 40c894a

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ pms5003 library is distributed under [Boost Software License 1.0 (BSL-1.0)](http
88

99
## Status
1010

11-
### Current revision: 2.00 RC
11+
### Current revision: 2.00
1212

13-
It is not published as a release yet
13+
[release: 2.0](https://github.com/jbanaszczyk/pms5003/releases/tag/2.0)
1414

15-
Code in repository (branch: master) is 2.00 RC
16-
* It looks stable - development is finished
17-
* README have to be updated
18-
* There are some TODOs for next revisions
15+
* There are some [TODOs](/../../issues) for next revisions
1916

2017
### What is new?
2118

src/pms.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ using __uint24 = uint32_t;
3535

3636
namespace pmsx {
3737

38-
constexpr char pmsxApiVersion[] = "pms5003 2.00 RC";
38+
constexpr char pmsxApiVersion[] = "pms5003 2.00";
3939

4040
typedef uint16_t pmsData_t;
4141

@@ -45,7 +45,7 @@ namespace pmsx {
4545
public:
4646
explicit PmsStatus(pmsStatus_t value) : value(value) {}
4747

48-
operator pmsStatus_t() {
48+
operator pmsStatus_t() const {
4949
return value;
5050
}
5151

@@ -301,7 +301,7 @@ namespace pmsx {
301301
optionalPin_t pinSleepMode;
302302
optionalPin_t pinReset;
303303

304-
void setupHardwarePin(uint8_t value) {
304+
static void setupHardwarePin(uint8_t value) {
305305
digitalWrite(value, HIGH);
306306
pinMode(value, OUTPUT);
307307
digitalWrite(value, HIGH);
@@ -373,7 +373,7 @@ namespace pmsx {
373373
}
374374
}
375375

376-
bool initialized() {
376+
bool initialized() const {
377377
return pmsSerial;
378378
}
379379

@@ -398,7 +398,7 @@ namespace pmsx {
398398

399399
////////////////////////////////////////
400400

401-
void sumBuffer(uint16_t* sum, const uint8_t* buffer, uint16_t cnt) {
401+
static void sumBuffer(uint16_t* sum, const uint8_t* buffer, uint16_t cnt) {
402402
for (; cnt > 0; --cnt, ++buffer) {
403403
*sum += *buffer;
404404
}
@@ -601,7 +601,7 @@ namespace pmsx {
601601
if (pmsSerial->write(sig, sizeof(sig)) != sizeof(sig)) {
602602
return false;
603603
}
604-
const size_t cmdSize = 3;
604+
constexpr auto cmdSize = uint8_t{3};
605605
if (pmsSerial->write((uint8_t*)&cmd, cmdSize) != cmdSize) {
606606
return false;
607607
}

0 commit comments

Comments
 (0)