Enabled debug mode when PlatformIO builds in debug

This commit is contained in:
Benoit Blanchon
2020-03-20 17:22:34 +01:00
parent 9cb0ddb5e7
commit 5b812522fa
6 changed files with 19 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ template <typename TReader>
class Latch {
public:
Latch(TReader reader) : _reader(reader), _loaded(false) {
#ifdef ARDUINOJSON_DEBUG
#if ARDUINOJSON_DEBUG
_ended = false;
#endif
}
@@ -36,7 +36,7 @@ class Latch {
void load() {
ARDUINOJSON_ASSERT(!_ended);
int c = _reader.read();
#ifdef ARDUINOJSON_DEBUG
#if ARDUINOJSON_DEBUG
if (c <= 0)
_ended = true;
#endif
@@ -47,7 +47,7 @@ class Latch {
TReader _reader;
char _current;
bool _loaded;
#ifdef ARDUINOJSON_DEBUG
#if ARDUINOJSON_DEBUG
bool _ended;
#endif
};