Skip to content

Commit 2ba8a15

Browse files
committed
fix: Homing command false timeout
Allow 15 seconds before timing out on G28, to avoid false time-outs when homing the printer.
1 parent a0fc2f7 commit 2ba8a15

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/tcpapi/FlashForgeTcpClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ export class FlashForgeTcpClient {
354354

355355
let timeoutDuration = 5000; // default timeout
356356
if (cmd === GCodes.CmdListLocalFiles || cmd.startsWith(GCodes.CmdGetThumbnail)) { timeoutDuration = 10000; } // increase command timeout
357+
if (cmd === GCodes.CmdHomeAxes || cmd === '~G28') { timeoutDuration = 15000; } // homing takes longer
357358
if (this.socket) { this.socket.setTimeout(timeoutDuration); }
358359

359360
timeoutId = setTimeout(() => {

0 commit comments

Comments
 (0)