Skip to content

Commit

Permalink
#43 Inserting at the vector.begin() done correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
martinberlin committed Jul 9, 2021
1 parent be49dff commit 93ce48b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/CalEPD/models/plasticlogic/plasticlogic014.cpp
Expand Up @@ -48,9 +48,8 @@ void PlasticLogic014::init(bool debug)
* This has the function of assigning the original Vector size
*/
void PlasticLogic014::clearScreen(){
// #43 Adafruit.fillscreen is out of bonds here, adding a new X line
uint16_t x = 0;
for (x = 0; x < PLOGIC014_BUFFER_SIZE+1; x++)
for (x = 0; x < PLOGIC014_BUFFER_SIZE; x++)
{
_buffer.push_back(0xff); //WHITE
}
Expand All @@ -68,9 +67,7 @@ void PlasticLogic014::update(uint8_t updateMode)

IO.data(pixelAccessPos, sizeof(pixelAccessPos));

buffer_it = _buffer.begin();
*(buffer_it) = 0x10; // First element

_buffer.insert(_buffer.begin(), 0x10);
IO.dataVector(_buffer);

_waitBusy("Buffer sent", EPD_TMG_SRT);
Expand Down

0 comments on commit 93ce48b

Please sign in to comment.