Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove absurd requirement that the script be run as root #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 54-missilelauncher.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="usb", ATTR{idVendor}=="2123", MODE="0664", GROUP="plugdev"
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ There are a few projects for using older launchers in Linux, but I couldn't find
This script requires PyUSB 1.0+, apt in Debian/Ubuntu installs 0.4.

Also, on Debian\Ubuntu systems you need the __python-imaging-tk__
It also requires that you run it as root unless you want to spend an afternoon playing with udev rules :/



## Getting Started:

git clone git@github.com:nmilford/stormLauncher.git
cd stormLauncher
chmod +x stormLauncher.py
sudo ./stormLauncher.py
sudo cp 54-missilelauncher.rules /etc/udev/rules.d
sudo service udev restart
./stormLauncher.py

## Usage:

Expand Down
4 changes: 1 addition & 3 deletions stormLauncher.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self):

def turretUp(self, event):
self.message1.set("Turret Up.")
self.dev.ctrl_transfer(0x21,0x09,0,0,[0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00])
self.dev.ctrl_transfer(0x21,0x09,0,0,[0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00])

def turretDown(self, event):
self.message1.set("Turret Down.")
Expand Down Expand Up @@ -121,6 +121,4 @@ def turretFire(self, event):


if __name__ == '__main__':
if not os.geteuid() == 0:
sys.exit("Script must be run as root.")
launchControl().mainloop()