Skip to content

Commit

Permalink
v3.5.0 - simplified support for Platform IO
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhipenko committed Dec 17, 2021
1 parent 3487748 commit 1075c87
Show file tree
Hide file tree
Showing 9 changed files with 716 additions and 737 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ while ( d.count() ) d.remove(d(0));



### Platform.io Support

As of version 3.5.0 support for platform.io system has been simplified:

In your programs, use `DictionaryDeclarations.h` include instead of the `Dictionary.h` one.

In your `src` folder add this file:

File: `Dictionary.cpp`:

```c++
#include <Dictionary.h>
```

that's it.



### Memory management:
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/arkhipenko/Dictionary.git"
},
"version": "3.4.0",
"version": "3.5.0",
"frameworks": "arduino",
"platforms": "*"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Dictionary
version=3.4.0
version=3.5.0
author=Anatoli Arkhipenko <[email protected]>
maintainer=Anatoli Arkhipenko <[email protected]>
sentence=A dictionary data type with a fast b-tree based search
Expand Down
1 change: 1 addition & 0 deletions src/BufferStream/BaseBufferStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@

////////////////////////////////////////////////////////////////////////////////////////////////////
BaseBufferStream::BaseBufferStream(uint8_t *buff, size_t len) : buff(buff), len(len) {
sz = 0;
}
5 changes: 4 additions & 1 deletion src/BufferStream/BaseBufferStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ class BaseBufferStream : public Stream {
virtual int peek() { return -1; }
virtual void flush() {}

// inline uint8_t* bufPtr() { return buff; }
// inline size_t size() { return sz; }
using Print::write;

protected:
public:
uint8_t *buff;
size_t len;
size_t sz;
};

#endif // __BaseBufferStream_H__
1 change: 1 addition & 0 deletions src/BufferStream/WriteBufferStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ size_t WriteBufferStream::write(uint8_t value) {
}
*buff++ = value;
--len;
++sz;
return 1;
}
Loading

0 comments on commit 1075c87

Please sign in to comment.