wiimote_sps 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7b19ec266bda0397d5615d273abc1d49ee6e5627
4
+ data.tar.gz: fac982603abd144bf3af8b3b4940ee40645325a1
5
+ SHA512:
6
+ metadata.gz: 63f0b18a9749a2b167b269a5645f24c9f67578802c8ca386f87da72140b7d29c48eea113736a8d92cebde517efb7ca9eae6637813341f08621636dd11e51182e
7
+ data.tar.gz: 6b7f1fc525e156e494cc3db7ff9d156a4baba01a5dfec14afd52b688ade47dfb826999047bc03fb97337be9bd09f8a409aebb5489647e4f81ac556ed6dcea589
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,48 @@
1
+ !/usr/bin/env ruby
2
+
3
+ # file: wiimote_sps.rb
4
+
5
+ require 'sps-pub'
6
+ require 'simple_wiimote'
7
+
8
+
9
+ class WiimoteSps < SimpleWiimote
10
+
11
+ def initialize(device_id: 'wiimote', sps_address: nil, sps_port: 59000)
12
+
13
+ raise "WiimoteSps: Please provide an SPS address.' unless sps_address
14
+
15
+ super()
16
+ @pub = SPSPub.new address: sps_address, port: sps_port
17
+ @device_id = device_id
18
+
19
+ end
20
+
21
+ def notify(m)
22
+ @pub.notice @device_id + '/input: ' + m
23
+ end
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
44
+
45
+ wm = WiimoteSps.new
46
+ wm.activate # ... then to deactivate press buttons 1 + 2
47
+
48
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ ��
2
+ NN����X�}���tą���S���� ���z#���>?ng H�Q�Y���$NI}Q����'�Ʊ��#�&V��՘��eZ�_�Z�$�•}x����v��,������=,���6��e{yY�k u��ת
3
+ 0n��FWr~�D��Rd(��p�l gn�����U�b&'�����#z�h��%q�|��_����K=5\�sR/ ����)�P��[<��3�t��ݔ�����KmT(!��۷
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wiimote_sps
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
+ YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
+ 8ixkARkWAmV1MB4XDTE1MDYxNTE5MTQxN1oXDTE2MDYxNDE5MTQxN1owSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBALxpBH3j4LTUwQJXYX9nUxRPp6lrLZ2Cv8xJnp5+2epqca/PLzcP4V5jw23J
19
+ opiidsQhLYNhmyxY/CdqdHrmNSSjXCuu9HpsJdi+N8s6AWM6SXHrBzuT99Kui6s1
20
+ 1c1Qiu1z4usjQXB3WW5zOaSonhBwQQeAIZQaY5OlinEfa03u+VT5uDUJYpyWloKJ
21
+ IQhHv44aa/ElzfjLIdlr5/hep1OEK6g+xX+MwgGTACz2Zq2sQ3Dp3zrTZk5ZjlPE
22
+ oIMkgTNEhQsoHYrVQO5bMpznhQSF1RlxF/4Zft+pgm6U4M2WqFyQMBD2MdKIgiDu
23
+ +eEjEtNkMt6wvzDF9JXgf7n1VVkCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUCgvtvgjhltFZc/YLdWkK7Vw6tkUwJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAhqZspLQ0
27
+ WY5KAvwEjkMaesOJgOW7eKthKEVsFpgBK17CHcNggjo3vlYgYpkg4TRvcg9BjpFb
28
+ /+BliCifdXBzCpdZJhyzojxeqsuHJmL3sfzFOLDPFsF/hw9iyyu5xc3i3Y/l+oMi
29
+ PgsCV6wwVr6RJ2eGGjUeHwwtj1GDCPqjRTCKGWsxcCYw3sONG7m85+7Mw7tlVz9S
30
+ 3xCqcDVjxTLMBaN30boxj5EuvIrPaKZdHHTdPiwJWe8eKzJLzINp+RZ659rtRQBe
31
+ ZWXcw1o9dBZIIi2X/e1ZXyvEsO9MeL+7yRK80sfZ7oE58jUBaamzCmoVXuv+xLPL
32
+ yuu01H8kLkjz1w==
33
+ -----END CERTIFICATE-----
34
+ date: 2015-06-15 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: simple_wiimote
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.3'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.3.2
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.3'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.3.2
56
+ description:
57
+ email: james@r0bertson.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/wiimote_sps.rb
63
+ homepage: https://github.com/jrobertson/wiimote_sps
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.4.6
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Uses a Wiimote to publish key presses to a SimplePubSub broker.
87
+ test_files: []
metadata.gz.sig ADDED
Binary file