Merge lp:~noskcaj/ubuntu/trusty/pyrocket/new-release into lp:ubuntu/trusty/pyrocket

Proposed by Jackson Doak
Status: Needs review
Proposed branch: lp:~noskcaj/ubuntu/trusty/pyrocket/new-release
Merge into: lp:ubuntu/trusty/pyrocket
Diff against target: 1133 lines (+414/-378)
15 files modified
40-rocketlauncher.rules (+3/-4)
debian/changelog (+10/-0)
debian/compat (+1/-1)
debian/control (+4/-5)
debian/pycompat (+0/-1)
debian/pyrocket.install (+1/-1)
debian/pyrocket.manpages (+1/-0)
debian/pyrocket.xpm (+299/-0)
debian/rules (+6/-9)
pyrocket.xpm (+0/-299)
rocket_backend.py (+36/-3)
rocket_frontend.py (+25/-19)
rocket_joystick.py (+5/-13)
rocket_webcam.py (+21/-21)
setup.py (+2/-2)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/trusty/pyrocket/new-release
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Needs Information
Dmitry Shachnev Abstain
Review via email: mp+195921@code.launchpad.net

Description of the change

Import upstream fix.

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks for your work here.

- When does the source tarball come from? debian/watch is broken, and when I download v0.8.tar.gz from GitHub, it has differences with your branch (i.e. 40-rocketlauncher.rules is missing);
- "LP:#1055778" won't close the bug, you need a space after the colon;
- dh-python is not used unless you build-depend on it (and falls back to "old" dh_python2 provided by python-defaults). See the relevant logic in /usr/bin/dh_python2.

By the way, here is a debian/watch line that works with GitHub:

opts=filenamemangle=s/.*v(.*).tar.gz/pyrocket_$1.orig.tar.gz/ \
http://github.com/stadler/pyrocket/tags .*/archive/v(.*).tar.gz

review: Needs Fixing
Revision history for this message
Jackson Doak (noskcaj) wrote :

I got the tarball from the PPA, then removed the debian/ folder
Everything should say dh-python2

On Wed, Nov 20, 2013 at 9:17 PM, Dmitry Shachnev <email address hidden> wrote:

> The proposal to merge lp:~noskcaj/ubuntu/trusty/pyrocket/new-release into
> lp:ubuntu/pyrocket has been updated.
>
> Status: Needs review => Work in progress
>
> For more details, see:
>
> https://code.launchpad.net/~noskcaj/ubuntu/trusty/pyrocket/new-release/+merge/195921
> --
>
> https://code.launchpad.net/~noskcaj/ubuntu/trusty/pyrocket/new-release/+merge/195921
> You are the owner of lp:~noskcaj/ubuntu/trusty/pyrocket/new-release.
>

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Looks better now, though I cannot sponsor it right now…

review: Abstain
Revision history for this message
Jackson Doak (noskcaj) wrote :

The tarball is at https://launchpad.net/~zarquon42/+archive/ppa/+files/pyrocket_0.8-0ubuntu1.tar.gz , it just needs the debian directory renamed or removed from it.

Revision history for this message
Daniel Holbach (dholbach) wrote :

The patch looks good, can it be forward to the upstream developers please?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Sorry, commented on the wrong MP.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Download full text (5.8 KiB)

Using https://github.com/stadler/pyrocket/archive/v0.8.tar.gz I get the following:

daniel@daydream:~/pyrocket$ LC_ALL=C bzr bd -- -S -sa
Building using working tree
Building package in normal mode
Purging the build dir: /home/daniel/build-area/pyrocket-0.8
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that
Building the package in /home/daniel/build-area/pyrocket-0.8, using debuild -S -sa
 dpkg-buildpackage -rfakeroot -d -us -uc -S -sa
dpkg-buildpackage: source package pyrocket
dpkg-buildpackage: source version 0.8-0ubuntu1
dpkg-buildpackage: source distribution trusty
dpkg-buildpackage: source changed by Jackson Doak <email address hidden>
 dpkg-source --before-build pyrocket-0.8
 fakeroot debian/rules clean
dh clean --with python2
   dh_testdir
   dh_auto_clean
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
running clean
'build/lib.linux-x86_64-2.7' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
   debian/rules override_dh_clean
make[1]: Entering directory `/home/daniel/build-area/pyrocket-0.8'
dh_clean
rm -f pyrocket.6
make[1]: Leaving directory `/home/daniel/build-area/pyrocket-0.8'
 dpkg-source -b pyrocket-0.8
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building pyrocket using existing ./pyrocket_0.8.orig.tar.gz
dpkg-source: warning: ignoring deletion of file find_occurences_of_version_number.sh
dpkg-source: warning: ignoring deletion of file make_source_package.sh
dpkg-source: warning: ignoring deletion of file make_package.sh
dpkg-source: warning: ignoring deletion of file cheeky.xcf
dpkg-source: warning: ignoring deletion of file README.md
dpkg-source: warning: ignoring deletion of file cheeky.png
dpkg-source: warning: ignoring deletion of file clean_source_package.sh
dpkg-source: warning: ignoring deletion of file TODO.txt
dpkg-source: warning: ignoring deletion of directory src
dpkg-source: warning: ignoring deletion of file src/msnmissile.png
dpkg-source: warning: ignoring deletion of file src/40-rocketlauncher.rules
dpkg-source: warning: ignoring deletion of file src/LICENSE
dpkg-source: warning: ignoring deletion of file src/setup.py
dpkg-source: warning: ignoring deletion of file src/rocket_frontend.py
dpkg-source: warning: ignoring deletion of file src/pyrocket
dpkg-source: warning: ignoring deletion of file src/rocket_joystick.py
dpkg-source: warning: ignoring deletion of file src/pyrocket.png
dpkg-source: warning: ignoring deletion of file src/rocket_webcam.py
dpkg-source: warning: ignoring deletion of file src/joystick.svg
dpkg-source: warning: ignoring deletion of file src/rocket_backend.py
dpkg-source: warning: ignoring deletion of directory src/debian
dpkg-source: warning: ignoring deletion of file src/debian/pyrocket.desktop
dpkg-source: warning: ignoring deletion of file src/debian/control
dpkg-source: warning: ignoring deletion of file src/debian/watch
dpkg-source: warning: ignoring deletion of file src/debian/pyrocket....

Read more...

review: Needs Fixing
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Daniel: Jackson used a repacked tarball from someone's PPA, not the GitHub one.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Was there a good reason for it?

Revision history for this message
Jackson Doak (noskcaj) wrote :

I used the tarball from upstream's PPA, then removed the debian/ folder
from it. Should i change the bzr branch to use the github tarball?

On Thu, Dec 19, 2013 at 2:25 AM, Daniel Holbach
<email address hidden>wrote:

> Was there a good reason for it?
> --
>
> https://code.launchpad.net/~noskcaj/ubuntu/trusty/pyrocket/new-release/+merge/195921
> You are the owner of lp:~noskcaj/ubuntu/trusty/pyrocket/new-release.
>

Revision history for this message
Daniel Holbach (dholbach) wrote :

We always try to use what is the most official tarball, so there are less chances of Debian and Ubuntu getting out of sync, etc. What are the differences of the two?

Revision history for this message
Jackson Doak (noskcaj) wrote :

Debian doesn't have this anyway, but it appears the difference in tarballs
is some extra config files, plus a huge .xcf file. Should we just leave
this as the smaller version, or do we need the extra files?

On Fri, Dec 20, 2013 at 12:05 AM, Daniel Holbach
<email address hidden>wrote:

> We always try to use what is the most official tarball, so there are less
> chances of Debian and Ubuntu getting out of sync, etc. What are the
> differences of the two?
> --
>
> https://code.launchpad.net/~noskcaj/ubuntu/trusty/pyrocket/new-release/+merge/195921
> You are the owner of lp:~noskcaj/ubuntu/trusty/pyrocket/new-release.
>

Revision history for this message
Daniel Holbach (dholbach) wrote :

I have no idea. Somebody who packaged it or upstream would know.

review: Needs Information

Unmerged revisions

10. By Jackson Doak

changelog fixes

9. By Jackson Doak

Bump standards-version to 3.9.5

8. By Jackson Doak

revert to .xpm pixmap

7. By Jackson Doak

Fix dh_clean override

6. By Jackson Doak

* Convert to dh, dh-python, and debhelper 9
* Create pyrocket.manpages

5. By Jackson Doak

New upstream release from https://github.com/stadler/pyrocket
LP:#1055778

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '40-rocketlauncher.rules'
--- 40-rocketlauncher.rules 2008-12-30 19:29:33 +0000
+++ 40-rocketlauncher.rules 2013-11-20 21:01:57 +0000
@@ -1,4 +1,3 @@
1SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="1941", SYSFS{idProduct}=="8021", GROUP="plugdev", MODE="0660"1SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", GROUP="plugdev", MODE="0660"
2SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a81", SYSFS{idProduct}=="0701", GROUP="plugdev", MODE="0660"2SUBSYSTEM=="usb", ATTRS{idVendor}=="0a81", ATTRS{idProduct}=="0701", GROUP="plugdev", MODE="0660"
3SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="1130", SYSFS{idProduct}=="0202", GROUP="plugdev", MODE="0660"3SUBSYSTEM=="usb", ATTRS{idVendor}=="1130", ATTRS{idProduct}=="0202", GROUP="plugdev", MODE="0660"
4
5\ No newline at end of file4\ No newline at end of file
65
=== modified file 'debian/changelog'
--- debian/changelog 2010-05-23 19:56:33 +0000
+++ debian/changelog 2013-11-20 21:01:57 +0000
@@ -1,3 +1,13 @@
1pyrocket (0.8-0ubuntu1) trusty; urgency=low
2
3 * New upstream release from https://github.com/stadler/pyrocket
4 LP: #1055778
5 * Convert to dh, dh-python2, and debhelper 9
6 * Create pyrocket.manpages
7 * Bump standards-version to 3.9.5
8
9 -- Jackson Doak <noskcaj@ubuntu.com> Wed, 20 Nov 2013 19:10:21 +1100
10
1pyrocket (0.6-0ubuntu3) maverick; urgency=low11pyrocket (0.6-0ubuntu3) maverick; urgency=low
212
3 * debain/watch: Update for code.google.com (LP: #583719)13 * debain/watch: Update for code.google.com (LP: #583719)
414
=== modified file 'debian/compat'
--- debian/compat 2008-12-30 19:29:33 +0000
+++ debian/compat 2013-11-20 21:01:57 +0000
@@ -1,1 +1,1 @@
1519
2\ No newline at end of file2\ No newline at end of file
33
=== modified file 'debian/control'
--- debian/control 2010-05-23 19:56:33 +0000
+++ debian/control 2013-11-20 21:01:57 +0000
@@ -1,12 +1,11 @@
1Source: pyrocket1Source: pyrocket
2Section: electronics2Section: electronics
3Priority: optional3Priority: optional
4Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Karl Ostmo <kostmo@gmail.com>5XSBC-Original-Maintainer: Karl Ostmo <kostmo@gmail.com>
6Standards-Version: 3.8.46Standards-Version: 3.9.5
7Build-Depends: debhelper (>= 5), python, cdbs (>= 0.4.49)7Build-Depends: debhelper (>= 9), python
8Build-Depends-Indep: perl, python-support (>= 0.5.3)8Build-Depends-Indep: perl
9XB-Python-Version: ${python:Versions}
10Homepage: http://pyrocket.googlecode.com/9Homepage: http://pyrocket.googlecode.com/
1110
12Package: pyrocket11Package: pyrocket
1312
=== removed file 'debian/pycompat'
--- debian/pycompat 2008-12-30 19:29:33 +0000
+++ debian/pycompat 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
12
20
=== modified file 'debian/pyrocket.install'
--- debian/pyrocket.install 2009-01-16 15:01:27 +0000
+++ debian/pyrocket.install 2013-11-20 21:01:57 +0000
@@ -1,3 +1,3 @@
140-rocketlauncher.rules /lib/udev/rules.d140-rocketlauncher.rules /lib/udev/rules.d
2pyrocket.xpm /usr/share/pixmaps2debian/pyrocket.xpm /usr/share/pixmaps
3debian/pyrocket.desktop /usr/share/applications3debian/pyrocket.desktop /usr/share/applications
44
=== added file 'debian/pyrocket.manpages'
--- debian/pyrocket.manpages 1970-01-01 00:00:00 +0000
+++ debian/pyrocket.manpages 2013-11-20 21:01:57 +0000
@@ -0,0 +1,1 @@
1pyrocket.6
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'debian/pyrocket.xpm'
--- debian/pyrocket.xpm 1970-01-01 00:00:00 +0000
+++ debian/pyrocket.xpm 2013-11-20 21:01:57 +0000
@@ -0,0 +1,299 @@
1/* XPM */
2static char * pyrocket_icon_xpm[] = {
3"31 32 264 2",
4" c None",
5". c #39291F",
6"+ c #94837F",
7"@ c #060504",
8"# c #0E0E0B",
9"$ c #414339",
10"% c #FF3B1E",
11"& c #FE6A31",
12"* c #FFCE61",
13"= c #FFFF8F",
14"- c #FFFF9E",
15"; c #FFFFB9",
16"> c #91854C",
17", c #2F201A",
18"' c #786866",
19") c #372F24",
20"! c #18150F",
21"~ c #1A1A11",
22"{ c #253024",
23"] c #332521",
24"^ c #30251E",
25"/ c #1C120E",
26"( c #120B08",
27"_ c #1F0E0D",
28": c #CA933E",
29"< c #FEB84F",
30"[ c #FFCA5D",
31"} c #FFF786",
32"| c #FFFFA8",
33"1 c #FFFF95",
34"2 c #FFFF99",
35"3 c #C4B969",
36"4 c #5A463F",
37"5 c #957F7B",
38"6 c #221D16",
39"7 c #171410",
40"8 c #040302",
41"9 c #010000",
42"0 c #000000",
43"a c #0A100A",
44"b c #050302",
45"c c #100808",
46"d c #020000",
47"e c #040303",
48"f c #3C2323",
49"g c #F14B2E",
50"h c #FF7F45",
51"i c #FFAD4E",
52"j c #FDC142",
53"k c #FFFC7C",
54"l c #FFFFAC",
55"m c #FFFF9C",
56"n c #6B5839",
57"o c #4D3C3A",
58"p c #8E7B7B",
59"q c #14110D",
60"r c #17140F",
61"s c #030202",
62"t c #050403",
63"u c #0B0705",
64"v c #010101",
65"w c #010300",
66"x c #020701",
67"y c #030B02",
68"z c #0D130A",
69"A c #0D0707",
70"B c #160D0D",
71"C c #020101",
72"D c #040101",
73"E c #130807",
74"F c #40250D",
75"G c #FEB150",
76"H c #FFD262",
77"I c #FFF876",
78"J c #FFFFA7",
79"K c #FFFFAE",
80"L c #FFFE86",
81"M c #8E7B2D",
82"N c #483825",
83"O c #52423E",
84"P c #050303",
85"Q c #040604",
86"R c #010501",
87"S c #000300",
88"T c #000200",
89"U c #0D100C",
90"V c #181112",
91"W c #0A0707",
92"X c #3F3537",
93"Y c #765737",
94"Z c #FFB14F",
95"` c #FF9349",
96" . c #FDB25E",
97".. c #FBE24B",
98"+. c #FDDF49",
99"@. c #FEF651",
100"#. c #FFF855",
101"$. c #000100",
102"%. c #1A1718",
103"&. c #050405",
104"*. c #0E120F",
105"=. c #241D1F",
106"-. c #141011",
107";. c #050304",
108">. c #370D0A",
109",. c #902A23",
110"'. c #A74C29",
111"). c #F84D1A",
112"!. c #FC4628",
113"~. c #14100D",
114"{. c #0E1914",
115"]. c #0B0F0C",
116"^. c #0E0809",
117"/. c #0C0607",
118"(. c #0B0706",
119"_. c #140E0C",
120":. c #150E0B",
121"<. c #050A08",
122"[. c #09100D",
123"}. c #0E0E0D",
124"|. c #392B2A",
125"1. c #54423E",
126"2. c #020303",
127"3. c #030201",
128"4. c #24261E",
129"5. c #4A4940",
130"6. c #030203",
131"7. c #060706",
132"8. c #080A09",
133"9. c #1D1A14",
134"0. c #0D0B09",
135"a. c #040404",
136"b. c #2A2424",
137"c. c #342522",
138"d. c #2F201E",
139"e. c #3F302C",
140"f. c #030302",
141"g. c #1F191A",
142"h. c #393233",
143"i. c #3C2C2B",
144"j. c #392927",
145"k. c #342422",
146"l. c #010301",
147"m. c #08120C",
148"n. c #18201B",
149"o. c #2D2826",
150"p. c #030101",
151"q. c #312829",
152"r. c #3D3532",
153"s. c #3A423A",
154"t. c #3C4039",
155"u. c #090704",
156"v. c #2D282A",
157"w. c #020D06",
158"x. c #1B3B2A",
159"y. c #718377",
160"z. c #504B49",
161"A. c #1B0E0E",
162"B. c #27181C",
163"C. c #545253",
164"D. c #85A596",
165"E. c #5F8D77",
166"F. c #57514A",
167"G. c #5B4641",
168"H. c #969788",
169"I. c #000701",
170"J. c #042713",
171"K. c #0D3A24",
172"L. c #262B28",
173"M. c #0E0607",
174"N. c #3E3239",
175"O. c #8B8291",
176"P. c #ECF2F3",
177"Q. c #65907F",
178"R. c #6A6561",
179"S. c #3A2728",
180"T. c #6E7367",
181"U. c #020203",
182"V. c #0C0C0D",
183"W. c #022511",
184"X. c #0A3722",
185"Y. c #18211D",
186"Z. c #060102",
187"`. c #2B1E22",
188" + c #746D79",
189".+ c #DFE7E9",
190"++ c #5D8978",
191"@+ c #5B5A57",
192"#+ c #412F30",
193"$+ c #726F64",
194"%+ c #1D170E",
195"&+ c #020202",
196"*+ c #060505",
197"=+ c #010903",
198"-+ c #04180A",
199";+ c #0B2918",
200">+ c #212D25",
201",+ c #1A1415",
202"'+ c #090405",
203")+ c #191214",
204"!+ c #415C51",
205"~+ c #557A6C",
206"{+ c #446E5A",
207"]+ c #46433E",
208"^+ c #54413E",
209"/+ c #7D7369",
210"(+ c #010100",
211"_+ c #010702",
212":+ c #011708",
213"<+ c #062A17",
214"[+ c #20201F",
215"}+ c #0C090A",
216"|+ c #170F10",
217"1+ c #516A63",
218"2+ c #A1B3B2",
219"3+ c #6C9082",
220"4+ c #303532",
221"5+ c #28191C",
222"6+ c #423335",
223"7+ c #747B6A",
224"8+ c #000F03",
225"9+ c #02230F",
226"0+ c #0C0D0D",
227"a+ c #191012",
228"b+ c #456057",
229"c+ c #86A19E",
230"d+ c #5A8476",
231"e+ c #252E2A",
232"f+ c #1C0D0F",
233"g+ c #312224",
234"h+ c #6D7966",
235"i+ c #211910",
236"j+ c #000E03",
237"k+ c #02210E",
238"l+ c #0E0F0E",
239"m+ c #170E0E",
240"n+ c #385046",
241"o+ c #718785",
242"p+ c #48695D",
243"q+ c #202421",
244"r+ c #241515",
245"s+ c #3D2D2E",
246"t+ c #686758",
247"u+ c #0C0907",
248"v+ c #040201",
249"w+ c #1A1414",
250"x+ c #080505",
251"y+ c #110A0B",
252"z+ c #352D34",
253"A+ c #93838D",
254"B+ c #5F545E",
255"C+ c #2A1F23",
256"D+ c #211313",
257"E+ c #251818",
258"F+ c #261411",
259"G+ c #502F28",
260"H+ c #000001",
261"I+ c #090406",
262"J+ c #292229",
263"K+ c #5C515E",
264"L+ c #403844",
265"M+ c #181016",
266"N+ c #110808",
267"O+ c #13090B",
268" ",
269" ",
270" ",
271" ",
272" . + ",
273" @ # $ % & * = - ; > , ' ",
274" ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 ",
275" 6 7 8 9 0 a b c d 9 e f g h i j k l m n o p ",
276" q r s t u v w x y z A B C D E F G H I J | K L M N O ",
277" 0 0 0 0 P Q R S T U V W 9 C X Y Z ` ...+.@.#. ",
278" $.0 0 0 %.&.0 0 $.*.=.-.0 0 ;.>.,.'.).!. ",
279" ~.0 0 0 0 0 v 0 0 0 {.].^./.(._.:. ",
280" 0 0 0 0 0 0 0 0 0 <.[.}.|.1. ",
281" e 0 0 0 v 0 2.0 0 0 3.4.5. ",
282" t 0 6.0 0 7.8.9. ",
283" 0.0 s a.0 b.c.d.e. ",
284" f.0 0 g.0 h.i.j.k. ",
285" l.m.n.o.p.q.r.s.t. ",
286" u.v.0 w.x.y.z.A.B.C.D.E.F.G.H. ",
287" v %.0 I.J.K.L.M.N.O.P.Q.R.S.T. ",
288" U.V.0 I.W.X.Y.Z.`. +.+++@+#+$+ ",
289" %+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+ ",
290" (+0 0 _+:+<+[+}+p.|+1+2+3+4+5+6+7+ ",
291" 0 0 0 $.8+9+0+0 0 a+b+c+d+e+f+g+h+ ",
292" i+0 0 0 T j+k+l+e p.m+n+o+p+q+r+s+t+ ",
293"u+v+0 0 0 0 0 8 w+x+p.y+z+A+B+C+D+E+F+G+ ",
294" 0 0 0 0 0 0 0 0 H+0 I+J+K+L+M+N+O+ ",
295" ",
296" ",
297" ",
298" ",
299" "};
0300
=== modified file 'debian/rules'
--- debian/rules 2008-12-30 19:29:33 +0000
+++ debian/rules 2013-11-20 21:01:57 +0000
@@ -1,15 +1,12 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
22
3DEB_PYTHON_SYSTEM=pysupport3override_dh_auto_build:
4
5
6include /usr/share/cdbs/1/rules/debhelper.mk
7include /usr/share/cdbs/1/class/python-distutils.mk
8
9build/pyrocket::
10 pod2man --section=6 --release=$(VERSION) --center "" debian/pyrocket.pod > pyrocket.64 pod2man --section=6 --release=$(VERSION) --center "" debian/pyrocket.pod > pyrocket.6
5 dh_auto_build
116
12cleanbuilddir/pyrocket::7override_dh_clean:
8 dh_clean
13 rm -f pyrocket.69 rm -f pyrocket.6
1410
15DEB_INSTALL_MANPAGES_pyrocket = pyrocket.611%:
12 dh $@ --with python2
1613
=== added directory 'icons'
=== added file 'icons/128.png'
17Binary files icons/128.png 1970-01-01 00:00:00 +0000 and icons/128.png 2013-11-20 21:01:57 +0000 differ14Binary files icons/128.png 1970-01-01 00:00:00 +0000 and icons/128.png 2013-11-20 21:01:57 +0000 differ
=== added file 'icons/32.png'
18Binary files icons/32.png 1970-01-01 00:00:00 +0000 and icons/32.png 2013-11-20 21:01:57 +0000 differ15Binary files icons/32.png 1970-01-01 00:00:00 +0000 and icons/32.png 2013-11-20 21:01:57 +0000 differ
=== added file 'icons/48.png'
19Binary files icons/48.png 1970-01-01 00:00:00 +0000 and icons/48.png 2013-11-20 21:01:57 +0000 differ16Binary files icons/48.png 1970-01-01 00:00:00 +0000 and icons/48.png 2013-11-20 21:01:57 +0000 differ
=== added file 'icons/72.png'
20Binary files icons/72.png 1970-01-01 00:00:00 +0000 and icons/72.png 2013-11-20 21:01:57 +0000 differ17Binary files icons/72.png 1970-01-01 00:00:00 +0000 and icons/72.png 2013-11-20 21:01:57 +0000 differ
=== removed file 'pyrocket.xpm'
--- pyrocket.xpm 2008-12-30 19:29:33 +0000
+++ pyrocket.xpm 1970-01-01 00:00:00 +0000
@@ -1,299 +0,0 @@
1/* XPM */
2static char * pyrocket_icon_xpm[] = {
3"31 32 264 2",
4" c None",
5". c #39291F",
6"+ c #94837F",
7"@ c #060504",
8"# c #0E0E0B",
9"$ c #414339",
10"% c #FF3B1E",
11"& c #FE6A31",
12"* c #FFCE61",
13"= c #FFFF8F",
14"- c #FFFF9E",
15"; c #FFFFB9",
16"> c #91854C",
17", c #2F201A",
18"' c #786866",
19") c #372F24",
20"! c #18150F",
21"~ c #1A1A11",
22"{ c #253024",
23"] c #332521",
24"^ c #30251E",
25"/ c #1C120E",
26"( c #120B08",
27"_ c #1F0E0D",
28": c #CA933E",
29"< c #FEB84F",
30"[ c #FFCA5D",
31"} c #FFF786",
32"| c #FFFFA8",
33"1 c #FFFF95",
34"2 c #FFFF99",
35"3 c #C4B969",
36"4 c #5A463F",
37"5 c #957F7B",
38"6 c #221D16",
39"7 c #171410",
40"8 c #040302",
41"9 c #010000",
42"0 c #000000",
43"a c #0A100A",
44"b c #050302",
45"c c #100808",
46"d c #020000",
47"e c #040303",
48"f c #3C2323",
49"g c #F14B2E",
50"h c #FF7F45",
51"i c #FFAD4E",
52"j c #FDC142",
53"k c #FFFC7C",
54"l c #FFFFAC",
55"m c #FFFF9C",
56"n c #6B5839",
57"o c #4D3C3A",
58"p c #8E7B7B",
59"q c #14110D",
60"r c #17140F",
61"s c #030202",
62"t c #050403",
63"u c #0B0705",
64"v c #010101",
65"w c #010300",
66"x c #020701",
67"y c #030B02",
68"z c #0D130A",
69"A c #0D0707",
70"B c #160D0D",
71"C c #020101",
72"D c #040101",
73"E c #130807",
74"F c #40250D",
75"G c #FEB150",
76"H c #FFD262",
77"I c #FFF876",
78"J c #FFFFA7",
79"K c #FFFFAE",
80"L c #FFFE86",
81"M c #8E7B2D",
82"N c #483825",
83"O c #52423E",
84"P c #050303",
85"Q c #040604",
86"R c #010501",
87"S c #000300",
88"T c #000200",
89"U c #0D100C",
90"V c #181112",
91"W c #0A0707",
92"X c #3F3537",
93"Y c #765737",
94"Z c #FFB14F",
95"` c #FF9349",
96" . c #FDB25E",
97".. c #FBE24B",
98"+. c #FDDF49",
99"@. c #FEF651",
100"#. c #FFF855",
101"$. c #000100",
102"%. c #1A1718",
103"&. c #050405",
104"*. c #0E120F",
105"=. c #241D1F",
106"-. c #141011",
107";. c #050304",
108">. c #370D0A",
109",. c #902A23",
110"'. c #A74C29",
111"). c #F84D1A",
112"!. c #FC4628",
113"~. c #14100D",
114"{. c #0E1914",
115"]. c #0B0F0C",
116"^. c #0E0809",
117"/. c #0C0607",
118"(. c #0B0706",
119"_. c #140E0C",
120":. c #150E0B",
121"<. c #050A08",
122"[. c #09100D",
123"}. c #0E0E0D",
124"|. c #392B2A",
125"1. c #54423E",
126"2. c #020303",
127"3. c #030201",
128"4. c #24261E",
129"5. c #4A4940",
130"6. c #030203",
131"7. c #060706",
132"8. c #080A09",
133"9. c #1D1A14",
134"0. c #0D0B09",
135"a. c #040404",
136"b. c #2A2424",
137"c. c #342522",
138"d. c #2F201E",
139"e. c #3F302C",
140"f. c #030302",
141"g. c #1F191A",
142"h. c #393233",
143"i. c #3C2C2B",
144"j. c #392927",
145"k. c #342422",
146"l. c #010301",
147"m. c #08120C",
148"n. c #18201B",
149"o. c #2D2826",
150"p. c #030101",
151"q. c #312829",
152"r. c #3D3532",
153"s. c #3A423A",
154"t. c #3C4039",
155"u. c #090704",
156"v. c #2D282A",
157"w. c #020D06",
158"x. c #1B3B2A",
159"y. c #718377",
160"z. c #504B49",
161"A. c #1B0E0E",
162"B. c #27181C",
163"C. c #545253",
164"D. c #85A596",
165"E. c #5F8D77",
166"F. c #57514A",
167"G. c #5B4641",
168"H. c #969788",
169"I. c #000701",
170"J. c #042713",
171"K. c #0D3A24",
172"L. c #262B28",
173"M. c #0E0607",
174"N. c #3E3239",
175"O. c #8B8291",
176"P. c #ECF2F3",
177"Q. c #65907F",
178"R. c #6A6561",
179"S. c #3A2728",
180"T. c #6E7367",
181"U. c #020203",
182"V. c #0C0C0D",
183"W. c #022511",
184"X. c #0A3722",
185"Y. c #18211D",
186"Z. c #060102",
187"`. c #2B1E22",
188" + c #746D79",
189".+ c #DFE7E9",
190"++ c #5D8978",
191"@+ c #5B5A57",
192"#+ c #412F30",
193"$+ c #726F64",
194"%+ c #1D170E",
195"&+ c #020202",
196"*+ c #060505",
197"=+ c #010903",
198"-+ c #04180A",
199";+ c #0B2918",
200">+ c #212D25",
201",+ c #1A1415",
202"'+ c #090405",
203")+ c #191214",
204"!+ c #415C51",
205"~+ c #557A6C",
206"{+ c #446E5A",
207"]+ c #46433E",
208"^+ c #54413E",
209"/+ c #7D7369",
210"(+ c #010100",
211"_+ c #010702",
212":+ c #011708",
213"<+ c #062A17",
214"[+ c #20201F",
215"}+ c #0C090A",
216"|+ c #170F10",
217"1+ c #516A63",
218"2+ c #A1B3B2",
219"3+ c #6C9082",
220"4+ c #303532",
221"5+ c #28191C",
222"6+ c #423335",
223"7+ c #747B6A",
224"8+ c #000F03",
225"9+ c #02230F",
226"0+ c #0C0D0D",
227"a+ c #191012",
228"b+ c #456057",
229"c+ c #86A19E",
230"d+ c #5A8476",
231"e+ c #252E2A",
232"f+ c #1C0D0F",
233"g+ c #312224",
234"h+ c #6D7966",
235"i+ c #211910",
236"j+ c #000E03",
237"k+ c #02210E",
238"l+ c #0E0F0E",
239"m+ c #170E0E",
240"n+ c #385046",
241"o+ c #718785",
242"p+ c #48695D",
243"q+ c #202421",
244"r+ c #241515",
245"s+ c #3D2D2E",
246"t+ c #686758",
247"u+ c #0C0907",
248"v+ c #040201",
249"w+ c #1A1414",
250"x+ c #080505",
251"y+ c #110A0B",
252"z+ c #352D34",
253"A+ c #93838D",
254"B+ c #5F545E",
255"C+ c #2A1F23",
256"D+ c #211313",
257"E+ c #251818",
258"F+ c #261411",
259"G+ c #502F28",
260"H+ c #000001",
261"I+ c #090406",
262"J+ c #292229",
263"K+ c #5C515E",
264"L+ c #403844",
265"M+ c #181016",
266"N+ c #110808",
267"O+ c #13090B",
268" ",
269" ",
270" ",
271" ",
272" . + ",
273" @ # $ % & * = - ; > , ' ",
274" ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 ",
275" 6 7 8 9 0 a b c d 9 e f g h i j k l m n o p ",
276" q r s t u v w x y z A B C D E F G H I J | K L M N O ",
277" 0 0 0 0 P Q R S T U V W 9 C X Y Z ` ...+.@.#. ",
278" $.0 0 0 %.&.0 0 $.*.=.-.0 0 ;.>.,.'.).!. ",
279" ~.0 0 0 0 0 v 0 0 0 {.].^./.(._.:. ",
280" 0 0 0 0 0 0 0 0 0 <.[.}.|.1. ",
281" e 0 0 0 v 0 2.0 0 0 3.4.5. ",
282" t 0 6.0 0 7.8.9. ",
283" 0.0 s a.0 b.c.d.e. ",
284" f.0 0 g.0 h.i.j.k. ",
285" l.m.n.o.p.q.r.s.t. ",
286" u.v.0 w.x.y.z.A.B.C.D.E.F.G.H. ",
287" v %.0 I.J.K.L.M.N.O.P.Q.R.S.T. ",
288" U.V.0 I.W.X.Y.Z.`. +.+++@+#+$+ ",
289" %+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+ ",
290" (+0 0 _+:+<+[+}+p.|+1+2+3+4+5+6+7+ ",
291" 0 0 0 $.8+9+0+0 0 a+b+c+d+e+f+g+h+ ",
292" i+0 0 0 T j+k+l+e p.m+n+o+p+q+r+s+t+ ",
293"u+v+0 0 0 0 0 8 w+x+p.y+z+A+B+C+D+E+F+G+ ",
294" 0 0 0 0 0 0 0 0 H+0 I+J+K+L+M+N+O+ ",
295" ",
296" ",
297" ",
298" ",
299" "};
3000
=== modified file 'rocket_backend.py'
--- rocket_backend.py 2008-12-30 19:29:33 +0000
+++ rocket_backend.py 2013-11-20 21:01:57 +0000
@@ -5,9 +5,9 @@
55
6class RocketManager:6class RocketManager:
77
8 vendor_product_ids = [(0x1941, 0x8021), (0x0a81, 0x0701), (0x0a81, 0xff01), (0x1130, 0x0202)]8 vendor_product_ids = [(0x1941, 0x8021), (0x0a81, 0x0701), (0x0a81, 0xff01), (0x1130, 0x0202), (0x2123,0x1010)]
9 launcher_types = ["Original", "Webcam", "Wireless", "Striker II"]9 launcher_types = ["Original", "Webcam", "Wireless", "Striker II", "OIC Webcam"]
10 housing_colors = ["green", "blue", "silver", "black"]10 housing_colors = ["green", "blue", "silver", "black", "gray"]
1111
12 def __init__(self):12 def __init__(self):
13 self.launchers = []13 self.launchers = []
@@ -18,6 +18,8 @@
1818
19 device_found = False19 device_found = False
2020
21
22
21 for bus in usb.busses():23 for bus in usb.busses():
22 for dev in bus.devices:24 for dev in bus.devices:
23 for i, (cheeky_vendor_id, cheeky_product_id) in enumerate(self.vendor_product_ids):25 for i, (cheeky_vendor_id, cheeky_product_id) in enumerate(self.vendor_product_ids):
@@ -35,6 +37,8 @@
35 return '''The '''+self.launcher_types[i]+''' ('''+self.housing_colors[i]+''') Rocket Launcher is not yet supported. Try the '''+self.launcher_types[0]+''' or '''+self.launcher_types[1]+''' one.'''37 return '''The '''+self.launcher_types[i]+''' ('''+self.housing_colors[i]+''') Rocket Launcher is not yet supported. Try the '''+self.launcher_types[0]+''' or '''+self.launcher_types[1]+''' one.'''
36 elif i == 3:38 elif i == 3:
37 launcher = BlackRocketLauncher()39 launcher = BlackRocketLauncher()
40 elif i == 4:
41 launcher = GrayRocketLauncher()
3842
39 return_code = launcher.acquire( dev )43 return_code = launcher.acquire( dev )
40 if not return_code:44 if not return_code:
@@ -56,9 +60,11 @@
56the new permissions from the .rules file.'''60the new permissions from the .rules file.'''
5761
5862
63
59 if not device_found:64 if not device_found:
60 return 'No USB Rocket Launcher appears\nto be connected.'65 return 'No USB Rocket Launcher appears\nto be connected.'
6166
67
62# ============================================68# ============================================
63# ============================================69# ============================================
6470
@@ -237,3 +243,30 @@
237243
238 return self.previous_limit_switch_states244 return self.previous_limit_switch_states
239245
246
247
248# ============================================
249# ============================================
250
251class GrayRocketLauncher(BlueRocketLauncher):
252
253 striker_commands = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40]
254 has_laser = False
255
256 # -----------------------------
257 def issue_command(self, command_index):
258
259 signal = self.striker_commands[command_index]
260
261 try:
262 self.handle.controlMsg(0x21,0x09, [0x02, signal, 0x00,0x00,0x00,0x00,0x00,0x00])
263
264 except usb.USBError:
265 pass
266
267 # -----------------------------
268 def check_limits(self):
269
270 return self.previous_limit_switch_states
271
272
240273
=== modified file 'rocket_frontend.py'
--- rocket_frontend.py 2008-12-30 19:29:33 +0000
+++ rocket_frontend.py 2013-11-20 21:01:57 +0000
@@ -11,10 +11,10 @@
11from rocket_webcam import VideoWindow11from rocket_webcam import VideoWindow
12from rocket_joystick import StatefulJoystick12from rocket_joystick import StatefulJoystick
1313
14class RocketWindow(StatefulJoystick):14class RocketWindow:
1515
16 appname = "pyrocket"16 appname = "pyrocket"
17 version = "0.6"17 version = "0.7"
18 local_share_dir = "/usr/share/"18 local_share_dir = "/usr/share/"
1919
20 keymap = [65364, 65362, 65361, 65363]20 keymap = [65364, 65362, 65361, 65363]
@@ -30,6 +30,9 @@
3030
31 def __init__(self, run_installed=True):31 def __init__(self, run_installed=True):
3232
33 self.joystick_state = StatefulJoystick()
34# self.joystick_state = None
35
33 self.run_installed = run_installed36 self.run_installed = run_installed
3437
35 self.img_path = ""38 self.img_path = ""
@@ -107,14 +110,6 @@
107110
108 top_menu.append( help_menu )111 top_menu.append( help_menu )
109112
110
111
112
113
114
115
116
117
118 # ----------------------------113 # ----------------------------
119114
120 self.video = VideoWindow()115 self.video = VideoWindow()
@@ -123,8 +118,6 @@
123118
124 # ----------------------------119 # ----------------------------
125120
126
127
128 self.joystick_hbox = gtk.HBox(False, 5)121 self.joystick_hbox = gtk.HBox(False, 5)
129 vbox.pack_start(self.joystick_hbox, False, False)122 vbox.pack_start(self.joystick_hbox, False, False)
130123
@@ -139,6 +132,18 @@
139132
140 self.joystick_hbox.set_no_show_all(True)133 self.joystick_hbox.set_no_show_all(True)
141134
135
136 if self.joystick_state:
137 if not self.joystick_state.joystick_init():
138 self.status_message_list.append("Try connecting a Joystick!")
139 else:
140 self.joystick_hbox.set_no_show_all(False) # huh?
141 self.joystick_hbox.show_all()
142 self.joystick_name_label.set_text( self.joystick_state.joystick_object.get_name() )
143 print 'Joystick has %d axes and %d buttons' %(self.joystick_state.num_axes, self.joystick_state.num_buttons)
144
145
146
142 # ---------------------------- 147 # ----------------------------
143 control_hbox = gtk.HBox(False, 5)148 control_hbox = gtk.HBox(False, 5)
144 vbox.pack_start(control_hbox, False, False)149 vbox.pack_start(control_hbox, False, False)
@@ -206,13 +211,13 @@
206 self.connect_everything()211 self.connect_everything()
207 self.cb_select_new_launcher(self.laucher_id)212 self.cb_select_new_launcher(self.laucher_id)
208213
209 StatefulJoystick.__init__(self)
210
211214
212 self.status_message_index = 1215 self.status_message_index = 1
213 self.last_message_id = None216 self.last_message_id = None
214 self.cycle_status_message()217 self.cycle_status_message()
215218
219 gobject.idle_add( self.limit_checker_loop )
220
216 # ===============================221 # ===============================
217222
218 def cb_toggle_show_camera(self, widget):223 def cb_toggle_show_camera(self, widget):
@@ -233,6 +238,7 @@
233 def cb_about_dialog(self, widget):238 def cb_about_dialog(self, widget):
234239
235 about_dialog = gtk.AboutDialog()240 about_dialog = gtk.AboutDialog()
241 about_dialog.set_transient_for(self.window)
236 about_dialog.set_version( self.version )242 about_dialog.set_version( self.version )
237 about_dialog.set_logo( gtk.gdk.pixbuf_new_from_file(self.img_path + "msnmissile.png") )243 about_dialog.set_logo( gtk.gdk.pixbuf_new_from_file(self.img_path + "msnmissile.png") )
238 about_dialog.set_copyright(u"\u00A92008 Karl Ostmo")244 about_dialog.set_copyright(u"\u00A92008 Karl Ostmo")
@@ -297,7 +303,7 @@
297 self.last_message_id = self.status_bar.push(0, new_msg_text)303 self.last_message_id = self.status_bar.push(0, new_msg_text)
298304
299 if not saved_id is None:305 if not saved_id is None:
300 self.status_bar.remove(saved_id, (self.status_message_index-1) % len(self.status_message_list) + 1)306 self.status_bar.remove_message(saved_id, (self.status_message_index-1) % len(self.status_message_list) + 1)
301 self.status_message_index += 1307 self.status_message_index += 1
302 gobject.timeout_add( self.status_message_timeout, self.cycle_status_message)308 gobject.timeout_add( self.status_message_timeout, self.cycle_status_message)
303309
@@ -465,10 +471,10 @@
465471
466 # Terminate cylinder charging based on radio state472 # Terminate cylinder charging based on radio state
467 grp = self.stop_charge.get_group()473 grp = self.stop_charge.get_group()
468 if grp[0].get_active():474 if len(grp) > 0 and grp[0].get_active():
469 if prev_fire_state and not next_fire_state:475 if prev_fire_state and not next_fire_state:
470 launcher.stop_movement()476 launcher.stop_movement()
471 elif grp[1].get_active():477 elif len(grp) > 1 and grp[1].get_active():
472 if not prev_fire_state and next_fire_state:478 if not prev_fire_state and next_fire_state:
473 launcher.stop_movement()479 launcher.stop_movement()
474480
@@ -496,8 +502,8 @@
496 if self.video:502 if self.video:
497 self.video.stop_capture()503 self.video.stop_capture()
498504
499 if self.joystick_object:505 if self.joystick_state and self.joystick_state.joystick_object:
500 self.joystick_object.quit()506 self.joystick_state.joystick_object.quit()
501507
502508
503 for launcher in self.rocket_controller.launchers:509 for launcher in self.rocket_controller.launchers:
504510
=== modified file 'rocket_joystick.py'
--- rocket_joystick.py 2008-12-30 19:29:33 +0000
+++ rocket_joystick.py 2013-11-20 21:01:57 +0000
@@ -1,5 +1,5 @@
1#!/usr/bin/python1#!/usr/bin/python
2from opencv import cv, highgui2import cv
33
4from pygtk import require4from pygtk import require
5require('2.0')5require('2.0')
@@ -7,9 +7,7 @@
77
88
9import pygame9import pygame
10import pygame.display10#from pygame.locals import *
11import pygame.joystick
12from pygame.locals import *
1311
14# ==================================12# ==================================
1513
@@ -28,9 +26,6 @@
28 self.joystick_debug = False26 self.joystick_debug = False
29 self.joystick_object = None27 self.joystick_object = None
3028
31 self.joystick_init()
32 gobject.idle_add( self.limit_checker_loop )
33
34 # ===============================29 # ===============================
3530
36 def joystick_init(self):31 def joystick_init(self):
@@ -43,8 +38,7 @@
43 joystick_count = pygame.joystick.get_count() # get number of joysticks38 joystick_count = pygame.joystick.get_count() # get number of joysticks
44 print('%d joystick(s) connected' %joystick_count)39 print('%d joystick(s) connected' %joystick_count)
45 if not joystick_count:40 if not joystick_count:
46 self.status_message_list.append("Try connecting a Joystick!")41 return False
47 return
4842
49 self.joystick_object = pygame.joystick.Joystick(0)43 self.joystick_object = pygame.joystick.Joystick(0)
50 self.joystick_object.init()44 self.joystick_object.init()
@@ -53,10 +47,6 @@
53 self.num_buttons = self.joystick_object.get_numbuttons()47 self.num_buttons = self.joystick_object.get_numbuttons()
5448
5549
56 self.joystick_hbox.set_no_show_all(False)
57 self.joystick_hbox.show_all()
58 self.joystick_name_label.set_text( self.joystick_object.get_name() )
59 print 'Joystick has %d axes and %d buttons' %(self.num_axes, self.num_buttons)
6050
61 self.prev_button_array = [0]*self.num_buttons51 self.prev_button_array = [0]*self.num_buttons
62 self.prev_movement_state = [0, 0]52 self.prev_movement_state = [0, 0]
@@ -64,6 +54,8 @@
6454
65 gobject.idle_add( self.joystick_event_loop )55 gobject.idle_add( self.joystick_event_loop )
6656
57 return True
58
67 # ===============================59 # ===============================
6860
69 def joystick_event_loop(self):61 def joystick_event_loop(self):
7062
=== modified file 'rocket_webcam.py'
--- rocket_webcam.py 2008-12-30 19:29:33 +0000
+++ rocket_webcam.py 2013-11-20 21:01:57 +0000
@@ -1,5 +1,5 @@
1#!/usr/bin/python1#!/usr/bin/python
2from opencv import cv, highgui2import cv
33
4from pygtk import require4from pygtk import require
5require('2.0')5require('2.0')
@@ -68,16 +68,16 @@
6868
69 if not self.capture:69 if not self.capture:
7070
71 self.capture = highgui.cvCreateCameraCapture (device)71 self.capture = cv.CreateCameraCapture (device)
72 72
73 highgui.cvSetCaptureProperty(self.capture, highgui.CV_CAP_PROP_FRAME_WIDTH, video_dimensions[0])73 cv.SetCaptureProperty(self.capture, cv.CV_CAP_PROP_FRAME_WIDTH, video_dimensions[0])
74 highgui.cvSetCaptureProperty(self.capture, highgui.CV_CAP_PROP_FRAME_HEIGHT, video_dimensions[1])74 cv.SetCaptureProperty(self.capture, cv.CV_CAP_PROP_FRAME_HEIGHT, video_dimensions[1])
7575
76 # -----------------------------------76 # -----------------------------------
7777
78 def stop_capture(self):78 def stop_capture(self):
79 if self.capture:79 if self.capture:
80 cv.cvReleaseCapture( self.capture )80 del(self.capture)
8181
82 self.capture = None82 self.capture = None
8383
@@ -85,24 +85,24 @@
8585
86 def initialize_video(self):86 def initialize_video(self):
8787
88 webcam_frame = highgui.cvQueryFrame( self.capture )88 webcam_frame = cv.QueryFrame( self.capture )
8989
90 if not webcam_frame:90 if not webcam_frame:
91 print "Frame acquisition failed."91 print "Frame acquisition failed."
92 return False92 return False
9393
94 self.webcam_pixbuf = gtk.gdk.pixbuf_new_from_data(94 self.webcam_pixbuf = gtk.gdk.pixbuf_new_from_data(
95 webcam_frame.imageData,95 webcam_frame.tostring(),
96 gtk.gdk.COLORSPACE_RGB,96 gtk.gdk.COLORSPACE_RGB,
97 False,97 False,
98 8,98 8,
99 webcam_frame.width,99 webcam_frame.width,
100 webcam_frame.height,100 webcam_frame.height,
101 webcam_frame.widthStep)101 webcam_frame.width * 3)
102 self.video_image.set_from_pixbuf(self.webcam_pixbuf)102 self.video_image.set_from_pixbuf(self.webcam_pixbuf)
103103
104104
105 self.display_frame = cv.cvCreateImage( cv.cvSize(webcam_frame.width, webcam_frame.height), cv.IPL_DEPTH_8U, 3)105 self.display_frame = cv.CreateImage( (webcam_frame.width, webcam_frame.height), cv.IPL_DEPTH_8U, 3)
106106
107 return True107 return True
108108
@@ -118,26 +118,26 @@
118 def run(self):118 def run(self):
119119
120 if self.capture:120 if self.capture:
121 webcam_frame = highgui.cvQueryFrame( self.capture )121 webcam_frame = cv.QueryFrame( self.capture )
122 else:122 else:
123 print "Capture failed!"123 print "Capture failed!"
124 return124 return
125125
126 if self.inverted_video.get_active():126 if self.inverted_video.get_active():
127 highgui.cvConvertImage(webcam_frame, webcam_frame, highgui.CV_CVTIMG_FLIP)127 cv.ConvertImage(webcam_frame, webcam_frame, cv.CV_CVTIMG_FLIP)
128 highgui.cvConvertImage(webcam_frame, self.display_frame, highgui.CV_CVTIMG_SWAP_RB)128 cv.ConvertImage(webcam_frame, self.display_frame, cv.CV_CVTIMG_SWAP_RB)
129129
130130
131131
132132
133 if False:133 if False:
134 # PROCESS WEBCAM FRAME HERE...134 # PROCESS WEBCAM FRAME HERE...
135 inputImage = cv.cvCreateImage(cv.cvGetSize(webcam_frame), cv.IPL_DEPTH_8U, 1)135 inputImage = cv.CreateImage((webcam_frame), cv.IPL_DEPTH_8U, 1)
136 cv.cvCvtColor(webcam_frame, inputImage, cv.CV_RGB2GRAY);136 cv.CvtColor(webcam_frame, inputImage, cv.CV_RGB2GRAY);
137137
138 cv.cvThreshold(inputImage, inputImage, 128, 255, cv.CV_THRESH_BINARY)138 cv.Threshold(inputImage, inputImage, 128, 255, cv.CV_THRESH_BINARY)
139139
140 mysize = cv.cvGetSize(webcam_frame)140 mysize = cv.GetSize(webcam_frame)
141 height = mysize.height141 height = mysize.height
142 width = mysize.width142 width = mysize.width
143143
@@ -150,19 +150,19 @@
150150
151 print "Sum:", mysum151 print "Sum:", mysum
152152
153 cv.cvMerge( inputImage, inputImage, inputImage, None, self.display_frame )153 cv.Merge( inputImage, inputImage, inputImage, None, self.display_frame )
154154
155155
156156
157157
158 incoming_pixbuf = gtk.gdk.pixbuf_new_from_data(158 incoming_pixbuf = gtk.gdk.pixbuf_new_from_data(
159 self.display_frame.imageData,159 self.display_frame.tostring(),
160 gtk.gdk.COLORSPACE_RGB,160 gtk.gdk.COLORSPACE_RGB,
161 False,161 False,
162 8,162 8,
163 self.display_frame.width,163 self.display_frame.width,
164 self.display_frame.height,164 self.display_frame.height,
165 self.display_frame.widthStep)165 self.display_frame.width * 3)
166 incoming_pixbuf.copy_area(0, 0, self.display_frame.width, self.display_frame.height, self.webcam_pixbuf, 0, 0)166 incoming_pixbuf.copy_area(0, 0, self.display_frame.width, self.display_frame.height, self.webcam_pixbuf, 0, 0)
167167
168 self.video_image.queue_draw()168 self.video_image.queue_draw()
169169
=== modified file 'setup.py'
--- setup.py 2008-12-30 19:29:33 +0000
+++ setup.py 2013-11-20 21:01:57 +0000
@@ -10,7 +10,7 @@
10 long_description="""pyrocket is used to operate USB foam dart launchers. It supports many models,10 long_description="""pyrocket is used to operate USB foam dart launchers. It supports many models,
11and for some, has considerably more functionality than the drivers provided by11and for some, has considerably more functionality than the drivers provided by
12the manufacturer. One may find it useful as a starting point for controlling12the manufacturer. One may find it useful as a starting point for controlling
13other USB devices, or just for waging cubicle warfare.13other USB devices, or simply for waging cubicle warfare.
1414
15pyrocket automatically detects the launcher(s) and a joystick, and a video15pyrocket automatically detects the launcher(s) and a joystick, and a video
16window is provided for webcam-enabled devices. pyrocket currently supports the16window is provided for webcam-enabled devices. pyrocket currently supports the
@@ -21,7 +21,7 @@
21 author_email="kostmo@gmail.com",21 author_email="kostmo@gmail.com",
22 url="http://pyrocket.googlecode.com/",22 url="http://pyrocket.googlecode.com/",
23# version=RocketWindow.version23# version=RocketWindow.version
24 version="0.6",24 version="0.7",
25 py_modules=["rocket_backend", "rocket_frontend", "rocket_webcam", "rocket_joystick"],25 py_modules=["rocket_backend", "rocket_frontend", "rocket_webcam", "rocket_joystick"],
26 scripts=["pyrocket"],26 scripts=["pyrocket"],
27# data_files=[(RocketWindow.img_path, ["joystick.svg", "pyrocket.png"])]27# data_files=[(RocketWindow.img_path, ["joystick.svg", "pyrocket.png"])]

Subscribers

People subscribed via source and target branches

to all changes: