You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Developer,
when playing with the new OLED, i've realized i do not know where the cursor is
after 'print'.
These to function in the "U8glib.h" can solve the problem:
u8g_uint_t getPrintCol(void) { return tx; }
u8g_uint_t getPrintRow(void) { return ty; }
So now, an output from get formatted correctly:
u8g.setFont(u8g_font_profont11);
cCursor = 1;
cRow = 25;
cCursor += u8g.drawStr(cCursor, cRow, "Boot #");
u8g.setFont(u8g_font_courB10);
u8g.setPrintPos(cCursor, cRow);
u8g.print(nBoot);
cCursor = u8g.getPrintCol();
u8g.setFont(u8g_font_profont11);
cCursor += u8g.drawStr(cCursor, cRow, " and " );
u8g.setFont(u8g_font_courB10);
u8g.setPrintPos(cCursor,cRow);
u8g.print(nRace);
cCursor = u8g.getPrintCol();
u8g.setFont(u8g_font_profont11);
cCursor += u8g.drawStr(cCursor, cRow, " races served ");
Yet it would be nice 'drawStr*' could continue from the last position.
Original issue reported on code.google.com by Eugeniju...@gmail.com on 31 Jan 2015 at 10:43
The text was updated successfully, but these errors were encountered:
Well, the idea is, to make the interface in c++ and c identical. Also, i assume
that all people in the Arduino world will use "print" instead of drawStr.
If you really want such a feature, you can derive your own class from U8glib
class and add these missing functions.
Original comment by olikr...@gmail.com on 1 Feb 2015 at 12:23
Original issue reported on code.google.com by
Eugeniju...@gmail.com
on 31 Jan 2015 at 10:43The text was updated successfully, but these errors were encountered: