This fixes a bug where after disconnecting and reconnecting the USB
cable, the data rate would be set to the default of 125 Hz (= period of
8ms). By moving the setDataRate call to the attachHandler, the data rate
is correctly set after each reattachment.
This fixes a bug where after disconnecting and reconnecting the USB cable, the data rate would be set to the default of 125 Hz (= period of 8ms). By moving the setDataRate call to the attachHandler, the data rate is correctly set after each reattachment.