Skip to content

Commit 2dae289

Browse files
committed
suppress some C++ warnings
1 parent bf214a0 commit 2dae289

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cpp/arduino/SoftwareSerial.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ class SoftwareSerial : public Stream
1010
private:
1111
int mPinIn;
1212
int mPinOut;
13-
bool mInverse;
1413
bool mIsListening;
1514
GodmodeState* mState;
1615
unsigned long mOffset; // bits to offset stream
1716
bool bigEndian;
1817

1918
public:
20-
SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false) {
19+
// @TODO this is public for now to avoid a compiler warning
20+
bool mInvertLogic; // @TODO not sure how to implement yet
21+
22+
SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool invertLogic = false) {
2123
mPinIn = receivePin;
2224
mPinOut = transmitPin;
25+
mIsListening = invertLogic;
2326
mIsListening = false;
2427
mOffset = 0; // godmode starts with 1 bit in the queue
2528
mState = GODMODE();

cpp/unittest/ArduinoUnitTests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class Test
113113
static const int RESULT_FAIL = 2;
114114
static const int RESULT_SKIP = 3;
115115

116-
const inline char *name() { return mName; }
117-
const inline int result() { return mResult; }
116+
inline const char *name() const { return mName; }
117+
inline int result() const { return mResult; }
118118

119119
Test(const char* _name) : mName(_name) {
120120
mResult = RESULT_NONE;

0 commit comments

Comments
 (0)