c4ev3 / EV3-API

EV3-API for Programming the LEGO Mindstorms EV3 in C
http://c4ev3.github.io
GNU General Public License v2.0
71 stars 22 forks source link

LcdClean() doesn't reset cursor position #39

Closed Davester47 closed 4 years ago

Davester47 commented 4 years ago

I ran into the problem mentioned in #13 concerning LcdClean() where it doesn't reset the cursor position. I've created a program to demonstrate the problem:

#include <ev3.h>

int main() {
  InitEV3();

  LcdPrintf(1, "Hello World!\n");
  Wait(1000);
  LcdClean();
  LcdPrintf(1, "I am a line farther down than I should be.\n");
  Wait(2000);

  FreeEV3();
  return 0;
}

I realize that this might break code for a small subset of users, but it would be an easy enough fix as long as they find out about it.

a3f commented 4 years ago

As mentioned in the just-merged pull request, there's Ev3Clear() for this. Closing.