I added the extra load between the drawString methods but with no success.
I did some extra testing and i found out that it dose not happen for every widget. I had the widget "A Battery Widget (with percentage)" and it happend there after the redraw.
It also happened with the widget "Calendar Widget", but it didn't occure witht the widgets "Battery Level Widget (Vertical)", "Battery Level Widget (with percentage)", "Battery Level Widget" or "Bluetooth ID Widget".
However i mangaed to reproduce the same error with a simple
E.showMessage()
command.
Here is the example code
g.clear();
g.drawString("hi this is a long sentence", 0,0);
E.showMessage("This is a test");
g.setFontVector(10);
g.drawString("hi this is a long sentence", 0,0);
I noticed there, that the font size of the text was changed to that of the shown message. But even if i set it to a lower one, it is still moved to the left.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I added the extra load between the drawString methods but with no success.
I did some extra testing and i found out that it dose not happen for every widget. I had the widget "A Battery Widget (with percentage)" and it happend there after the redraw.
It also happened with the widget "Calendar Widget", but it didn't occure witht the widgets "Battery Level Widget (Vertical)", "Battery Level Widget (with percentage)", "Battery Level Widget" or "Bluetooth ID Widget".
However i mangaed to reproduce the same error with a simple
command.
Here is the example code
I noticed there, that the font size of the text was changed to that of the shown message. But even if i set it to a lower one, it is still moved to the left.