MCPcopy Create free account
hub / github.com/ayushsharma82/WebSerial / _flush_print_buffer

Method _flush_print_buffer

src/WebSerial.cpp:248–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void WebSerialClass::_flush_print_buffer() {
249 if (_print_buffer_offset > 0) {
250 if (_buffer_offset + _print_buffer_offset > WSL_BUFFER_SIZE) {
251 // Flush global buffer to websocket
252 _flush_global_buffer();
253 }
254
255 // Flush print to global buffer and create a packet
256 _write_row(_print_buffer, _print_buffer_offset);
257 _print_buffer_offset = 0;
258 _last_print_buffer_flush_time = millis();
259 }
260}
261
262void WebSerialClass::_flush_global_buffer() {
263 if (_buffer_offset > 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected