MCPcopy Create free account
hub / github.com/Michael-Manning/E-Paper-Climate-Logger / printfAndOffset

Method printfAndOffset

firmware/src/drivers/display.cpp:148–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146
147 display.setCursor(x, y);
148 display.print(printBuffer);
149}
150int Display::printfAndOffset(int x, int y, const char* fmt, ...) {
151 va_list args;
152 va_start(args, fmt);
153 vsprintf(printBuffer, fmt, args);
154 va_end(args);
155
156 display.setCursor(x, y);
157 int16_t x1,y1;
158 uint16_t w,h;
159 d->getTextBounds(printBuffer, x, y, &x1, &y1, &w, &h);
160 display.print(printBuffer);
161 return x1 + w;
162}
163

Callers

nothing calls this directly

Calls 1

printMethod · 0.80

Tested by

no test coverage detected