| 246 | } |
| 247 | |
| 248 | void 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 | |
| 262 | void WebSerialClass::_flush_global_buffer() { |
| 263 | if (_buffer_offset > 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected