This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pdrone = require('pdrone'); | |
const drone = pdrone({id: 'mambo', debug: false}); | |
/** Helper function */ | |
function sleep(ms) { | |
return new Promise(a => setTimeout(a, ms)); | |
} | |
drone.on('connected', async () => { | |
// drone.flatTrim(); // use flatTrim() everytime you want the drone to calm down |