hybridgroup / cylon-crazyflie

Cylon adaptor/driver for the Crazyflie nanocopter
http://cylonjs.com
Other
18 stars 6 forks source link

Error "callback" argument must be a function #19

Open michaelgira23 opened 8 years ago

michaelgira23 commented 8 years ago

Hello, I've tried running the demo code, and it logs the following:

2016-11-05T05:37:50.142Z : [Robot 1] - Starting connections.
2016-11-05T05:37:50.144Z : [Robot 1] - Starting connection 'crazyflie' on port radio://1/10/250KPS.
STATE: setup --> connected
starting telemetry
timers.js:327
    throw new TypeError('"callback" argument must be a function');
    ^

TypeError: "callback" argument must be a function
    at exports.setTimeout (timers.js:327:11)
    at Crazyradio.onReadable (/Users/michael/Desktop/drones/node_modules/aerogel/lib/crazyradio.js:313:19)
    at emitNone (events.js:86:13)
    at ReadableUSBStream.emit (events.js:185:7)
    at emitReadable_ (_stream_readable.js:432:10)
    at emitReadable (_stream_readable.js:426:7)
    at readableAddChunk (_stream_readable.js:187:13)
    at ReadableUSBStream.Readable.push (_stream_readable.js:134:10)
    at ReadableUSBStream.onData (/Users/michael/Desktop/drones/node_modules/aerogel/lib/usbstreams.js:38:12)
    at emitOne (events.js:96:13)

I'm using a Mac, using Node v7, and installed the necessary libusb package on Brew. I tried using the Aerogel module by itself and I'm able to scan for the drones URI's, but I'm not able to connect/control them. I tried messing around with the Aerogel code, but it still gives me different errors. Is there any way to fix this? Much appreciated!

Nikhilvedi commented 7 years ago

I'm also having this issue, was it ever resolved?

michaelgira23 commented 7 years ago

I did a bunch of different things, but no matter what I tried I kept getting one error or another. I'm in the process of trying to writing an alternative library to control Crazyflies, which hopefully will eliminate any problems. I can link the repository back here if I ever finish it.

deadprogram commented 7 years ago

@michaelgira23 that sounds great, I look forward to seeing it. Too many old and unsupported modules in the current one.

michaelgira23 commented 7 years ago

Welp, I said I would link back the library if I every got around to finishing it, so here it is: https://github.com/michaelgira23/swarms

It's still in its early stages, so feedback is welcome!