Closed Electrenator closed 4 years ago
Could you clarify what you mean by "skip the rest of the program"? Does the program exit after reaching LcdClean
or do you mean something else?
The program exits when reaching the LcdClean
function.
That is of course not supposed to happen. If this is an issue with the API code, it seems really strange though that this never occourred before. Do the other LCD related functions (Ev3Printf
or the older LcdPrintf
) work? Would you mind providing code for a minimal functional program that produces the error for you? That might help understanding what goes wrong and/or allow to maybe replicate the problem.
Have never tried to use Ev3Printf
, because it wasn't in the commands.pdf
and can't test it at the moment but I've used this code to get the result that I had described;
#include <ev3.h>
int main(void){
int x, y;
for(x = 0; x < 10; x++){
LcdClean();
for(y = 0; y < 8; y++){
if(x % 2 == 0)
{
LcdPrintf(1, "Hello World!\n");
LcdPrintf(0, "Hello World!\n");
}else{
LcdPrintf(0, "Hello World!\n");
LcdPrintf(1, "Hello World!\n");
}
}
Wait(MS_500);
}
}
Yes, Ev3Printf
and LcdPrintf
work with the above code
Did you figure out why LcdClean behaved strangely for you? Can this issue be closed?
No, I didn't figure it out in the end. Could have been something with the device itself because it did work with other EV3s that I could test it on.
Possibly different firmware versions? Could you check?
When printing on the lcd with LcdPrintf() and then clearing it with LcdClean() seems to always skip the rest of the program that still needs to be run on the EV3.