Skip to content

Commit

Permalink
BITSTORE_H
Browse files Browse the repository at this point in the history
moveLeft eines kompletten Puffers bei dem keine Daten übrig bleiben optimiert. #62
  • Loading branch information
sidey79 committed Feb 25, 2018
1 parent e836947 commit da652fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/_micro-api/libraries/bitstore/src/bitstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ template<uint8_t bufSize>
bool BitStore<bufSize>::moveLeft(const uint16_t begin)
{
if (begin == 0 || begin >= valcount) return false;

if (begin == valcount - 1)
{
reset();
return true;
}
uint8_t startbyte = begin*valuelen / 8;
byte crcval = this->getValue(begin);

Expand Down

0 comments on commit da652fe

Please sign in to comment.