refactor(usb-deployer): use named settle constant and fix comment
This commit is contained in:
parent
852fccacdf
commit
8adc28b745
|
|
@ -210,7 +210,7 @@ export class USBHardwareDeployer implements HardwareDeployer {
|
|||
if (!this.port) throw new Error('Belum terhubung ke perangkat');
|
||||
|
||||
console.log('[USB] resetArduino: DTR/RTS pulse');
|
||||
/* DTR low + RTS low → 10ms → both high → wait 50ms for optiboot */
|
||||
/* DTR low + RTS low → 10ms → both high → wait for optiboot */
|
||||
await this.port.setSignals({
|
||||
dataTerminalReady: false,
|
||||
requestToSend: false
|
||||
|
|
@ -220,8 +220,7 @@ export class USBHardwareDeployer implements HardwareDeployer {
|
|||
dataTerminalReady: true,
|
||||
requestToSend: true
|
||||
});
|
||||
/* Wait for optiboot to initialize (~100ms is safe, gives us ~900ms for sync) */
|
||||
await sleep(100);
|
||||
await sleep(BOOTLOADER_SETTLE_MS);
|
||||
console.log('[USB] resetArduino: DTR pulse done');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue