Skip to content

Commit

Permalink
v 2.00 ready
Browse files Browse the repository at this point in the history
  • Loading branch information
jbanaszczyk committed May 11, 2018
1 parent 5babcd0 commit 40c894a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ pms5003 library is distributed under [Boost Software License 1.0 (BSL-1.0)](http

## Status

### Current revision: 2.00 RC
### Current revision: 2.00

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

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

### What is new?

Expand Down
12 changes: 6 additions & 6 deletions src/pms.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using __uint24 = uint32_t;

namespace pmsx {

constexpr char pmsxApiVersion[] = "pms5003 2.00 RC";
constexpr char pmsxApiVersion[] = "pms5003 2.00";

typedef uint16_t pmsData_t;

Expand All @@ -45,7 +45,7 @@ namespace pmsx {
public:
explicit PmsStatus(pmsStatus_t value) : value(value) {}

operator pmsStatus_t() {
operator pmsStatus_t() const {
return value;
}

Expand Down Expand Up @@ -301,7 +301,7 @@ namespace pmsx {
optionalPin_t pinSleepMode;
optionalPin_t pinReset;

void setupHardwarePin(uint8_t value) {
static void setupHardwarePin(uint8_t value) {
digitalWrite(value, HIGH);
pinMode(value, OUTPUT);
digitalWrite(value, HIGH);
Expand Down Expand Up @@ -373,7 +373,7 @@ namespace pmsx {
}
}

bool initialized() {
bool initialized() const {
return pmsSerial;
}

Expand All @@ -398,7 +398,7 @@ namespace pmsx {

////////////////////////////////////////

void sumBuffer(uint16_t* sum, const uint8_t* buffer, uint16_t cnt) {
static void sumBuffer(uint16_t* sum, const uint8_t* buffer, uint16_t cnt) {
for (; cnt > 0; --cnt, ++buffer) {
*sum += *buffer;
}
Expand Down Expand Up @@ -601,7 +601,7 @@ namespace pmsx {
if (pmsSerial->write(sig, sizeof(sig)) != sizeof(sig)) {
return false;
}
const size_t cmdSize = 3;
constexpr auto cmdSize = uint8_t{3};
if (pmsSerial->write((uint8_t*)&cmd, cmdSize) != cmdSize) {
return false;
}
Expand Down

0 comments on commit 40c894a

Please sign in to comment.