Skip to content

Commit

Permalink
fix: don't instantly stop scanning in scan-for-devices example
Browse files Browse the repository at this point in the history
  • Loading branch information
datagutt committed Jan 2, 2025
1 parent ccaf20a commit d1f5713
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/scan-for-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ scanner.on('deviceDiscovered', async ({ peripheral, model, modelName }) => {
console.log('Discovered device:', device, peripheral, model, modelName);
});

scanner.stopScanningForDevices();
process.on('SIGINT', () => {
console.log('Stopping DJI device scanner...');
scanner.stopScanningForDevices();
process.exit();
});

0 comments on commit d1f5713

Please sign in to comment.