Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
output buffer cleanup
  • Loading branch information
davegarthsimpson committed Jun 14, 2022
commit 085f97e9989ea891c0581b822c261c3fa02179a7
8 changes: 4 additions & 4 deletions arduino-ide-extension/src/node/core-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { firstToUpperCase, firstToLowerCase } from '../common/utils';
import { Port } from './cli-protocol/cc/arduino/cli/commands/v1/port_pb';
import { nls } from '@theia/core';
import { MonitorManager } from './monitor-manager';
import { OutputPanelBufferProvider } from './output-panel-buffer-provider';
import { SimpleBuffer } from './utils/simple-buffer';

@injectable()
export class CoreServiceImpl extends CoreClientAware implements CoreService {
Expand Down Expand Up @@ -77,7 +77,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {

const result = client.compile(compileReq);

const compileBuffer = new OutputPanelBufferProvider(
const compileBuffer = new SimpleBuffer(
this.flushOutputPanelMessages.bind(this),
this.FLUSH_OUTPUT_MESSAGES_TIMEOUT_MS
);
Expand Down Expand Up @@ -184,7 +184,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {

const result = responseHandler(client, req);

const uploadBuffer = new OutputPanelBufferProvider(
const uploadBuffer = new SimpleBuffer(
this.flushOutputPanelMessages.bind(this),
this.FLUSH_OUTPUT_MESSAGES_TIMEOUT_MS
);
Expand Down Expand Up @@ -255,7 +255,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
burnReq.setVerbose(options.verbose);
const result = client.burnBootloader(burnReq);

const bootloaderBuffer = new OutputPanelBufferProvider(
const bootloaderBuffer = new SimpleBuffer(
this.flushOutputPanelMessages.bind(this),
this.FLUSH_OUTPUT_MESSAGES_TIMEOUT_MS
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export class OutputPanelBufferProvider {
export class SimpleBuffer {
chunks: Uint8Array[] = [];

private flushInterval?: NodeJS.Timeout;
Expand Down