omcaree / node-pololumaestro

Node module for control of Pololu Maestro servo controllers
14 stars 16 forks source link

Detect hardware disconnections #6

Open kishu27 opened 10 years ago

kishu27 commented 10 years ago

How to detect hardware disconnects in runtime?

achingbrain commented 10 years ago

At the moment you can't.

It's possible though - node-serialport supports a disconnectedCallback option that you can pass to the constructor.

Assuming it works reliably, you'd get that callback to emit an event that would be listened for and forwarded by the containing PololuMaestro class.