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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b19ec266bda0397d5615d273abc1d49ee6e5627
4
- data.tar.gz: fac982603abd144bf3af8b3b4940ee40645325a1
3
+ metadata.gz: b5fdc38132cd6efe6805a2702f9dd6ba46dbe467
4
+ data.tar.gz: eadfbf57adcb86916599e233574fb0fb53d74a95
5
5
  SHA512:
6
- metadata.gz: 63f0b18a9749a2b167b269a5645f24c9f67578802c8ca386f87da72140b7d29c48eea113736a8d92cebde517efb7ca9eae6637813341f08621636dd11e51182e
7
- data.tar.gz: 6b7f1fc525e156e494cc3db7ff9d156a4baba01a5dfec14afd52b688ade47dfb826999047bc03fb97337be9bd09f8a409aebb5489647e4f81ac556ed6dcea589
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
- !/usr/bin/env ruby
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 "WiimoteSps: Please provide an SPS address.' unless sps_address
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 onbtn_2_up(wm) notify 'button 2 pressed' end
26
- def onbtn_2_press(wm) end
27
- def onbtn_1_up(wm) notify 'button 1 pressed' end
28
- def onbtn_1_press(wm) end
29
- def onbtnb_press(wm) notify 'button b pressed' end
30
- def onbtnb_up(wm) end
31
- def onbtnb_down(wm) end
32
- def onbtn_a_press(wm) notify 'button a pressed' end
33
- def onbtn_minus_press(wm) notify 'button minus pressed' end
34
- def onbtn_home_press(wm) notify 'button home pressed' end
35
- def onbtn_left_press(wm) notify 'button left pressed' end
36
- def onbtn_right_press(wm) notify 'button right pressed' end
37
- def onbtn_down_press(wm) notify 'button down pressed' end
38
- def onbtn_up_press(wm) notify 'button up pressed' end
39
- def onbtn_plus_press(wm) notify 'button plus pressed' end
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
- wm = WiimoteSps.new
46
- wm.activate # ... then to deactivate press buttons 1 + 2
47
-
48
- end
41
+
42
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiimote_sps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file