wiimote_sps 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/wiimote_sps.rb +21 -27
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5fdc38132cd6efe6805a2702f9dd6ba46dbe467
|
4
|
+
data.tar.gz: eadfbf57adcb86916599e233574fb0fb53d74a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3132ede0a87f4d1700e6703d7b599744e6b76d4cb66ff8befe99c067cf5baf356e2d9a6081c84dc4c6da63e15989f4bb7a091f6f9f1a1604b77d6a999ecfa992
|
7
|
+
data.tar.gz: 30b735214bf248e7ced3c3a5d67f837da7ca84aff11426de1069cc2039e052212f8af65fda21ea09ec97949355c436fd9425a4c2a8f9f6bdf37776019db4f64d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/wiimote_sps.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# file: wiimote_sps.rb
|
4
4
|
|
@@ -10,11 +10,11 @@ class WiimoteSps < SimpleWiimote
|
|
10
10
|
|
11
11
|
def initialize(device_id: 'wiimote', sps_address: nil, sps_port: 59000)
|
12
12
|
|
13
|
-
raise
|
14
|
-
|
13
|
+
raise 'WiimoteSps: Please provide a SPS addres' unless sps_address
|
15
14
|
super()
|
16
|
-
@pub = SPSPub.new address: sps_address, port: sps_port
|
17
15
|
@device_id = device_id
|
16
|
+
@pub = SPSPub.new address: sps_address
|
17
|
+
@pub.notice @device_id + '/info: wiimote initialized'
|
18
18
|
|
19
19
|
end
|
20
20
|
|
@@ -22,27 +22,21 @@ class WiimoteSps < SimpleWiimote
|
|
22
22
|
@pub.notice @device_id + '/input: ' + m
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
def
|
27
|
-
def
|
28
|
-
def
|
29
|
-
def
|
30
|
-
def
|
31
|
-
def
|
32
|
-
def
|
33
|
-
def
|
34
|
-
def
|
35
|
-
def
|
36
|
-
def
|
37
|
-
def
|
38
|
-
def
|
39
|
-
def
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
if __FILE__ == $0 then
|
25
|
+
def on_btn_2_up(wm) notify 'button 2 pressed' end
|
26
|
+
def on_btn_1_up(wm) notify 'button 1 pressed' end
|
27
|
+
def on_btn_b_press(wm) notify 'button b pressed' end
|
28
|
+
def on_btn_b_up(wm) end
|
29
|
+
def on_btn_b_down(wm) end
|
30
|
+
def on_btn_a_press(wm) notify 'button a pressed' end
|
31
|
+
def on_btn_minus_press(wm) notify 'button minus pressed' end
|
32
|
+
def on_btn_void1_press(wm) notify 'button void1 pressed' end
|
33
|
+
def on_btn_void2_press(wm) notify 'button void2 pressed' end
|
34
|
+
def on_btn_home_press(wm) notify 'button home pressed' end
|
35
|
+
def on_btn_left_press(wm) notify 'button left pressed' end
|
36
|
+
def on_btn_right_press(wm) notify 'button right pressed' end
|
37
|
+
def on_btn_down_press(wm) notify 'button down pressed' end
|
38
|
+
def on_btn_up_press(wm) notify 'button up pressed' end
|
39
|
+
def on_btn_plus_press(wm) notify 'button plus pressed' end
|
44
40
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
41
|
+
|
42
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|