Skip to content

Instantly share code, notes, and snippets.

@danpolanco
Last active December 19, 2015 06:59
Show Gist options
  • Save danpolanco/5915380 to your computer and use it in GitHub Desktop.
Save danpolanco/5915380 to your computer and use it in GitHub Desktop.
Udev rules for automatic start and stop cfheadless for crazyflie. Work in progress.
Before:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
After (do not use as I made it up):
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev", FILE="udev_script.sh"
Closer to correct:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev", RUN+="/path/to/script"
Final:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev", RUN+="/root/bin/cfheadless"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment