procon_bypass_man 0.1.3 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procon_bypass_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiikko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-03 00:00:00.000000000 Z
11
+ date: 2021-09-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: extension for Nintendo Switch Pro Controller
14
14
  email:
@@ -20,6 +20,7 @@ files:
20
20
  - ".circleci/config.yml"
21
21
  - ".gitignore"
22
22
  - ".rspec"
23
+ - ".rubocop.yml"
23
24
  - ".ruby-version"
24
25
  - CHANGELOG.md
25
26
  - Gemfile
@@ -31,36 +32,42 @@ files:
31
32
  - bin/setup
32
33
  - docs/how_to_connect_procon.md
33
34
  - docs/setup_raspi.md
34
- - examples/pbm.service
35
+ - docs/setup_raspi.mitamae.rb
36
+ - docs/setup_raspi_by_mitamae.md
35
37
  - examples/practical/app.rb
36
38
  - examples/practical/setting.yml
37
- - examples/simple.rb
38
39
  - lib/procon_bypass_man.rb
39
40
  - lib/procon_bypass_man/bypass.rb
40
41
  - lib/procon_bypass_man/configuration.rb
41
42
  - lib/procon_bypass_man/configuration/layer.rb
42
43
  - lib/procon_bypass_man/configuration/loader.rb
43
44
  - lib/procon_bypass_man/configuration/validator.rb
44
- - lib/procon_bypass_man/device_registry.rb
45
+ - lib/procon_bypass_man/device_connector.rb
45
46
  - lib/procon_bypass_man/io_monitor.rb
46
47
  - lib/procon_bypass_man/processor.rb
47
48
  - lib/procon_bypass_man/procon.rb
48
49
  - lib/procon_bypass_man/procon/button_collection.rb
49
50
  - lib/procon_bypass_man/procon/data.rb
51
+ - lib/procon_bypass_man/procon/flip_cache.rb
50
52
  - lib/procon_bypass_man/procon/layer_changeable.rb
51
53
  - lib/procon_bypass_man/procon/macro_registry.rb
52
54
  - lib/procon_bypass_man/procon/mode_registry.rb
53
55
  - lib/procon_bypass_man/procon/pressed_button_helper.rb
54
56
  - lib/procon_bypass_man/procon/user_operation.rb
55
57
  - lib/procon_bypass_man/runner.rb
58
+ - lib/procon_bypass_man/timer.rb
56
59
  - lib/procon_bypass_man/version.rb
57
60
  - procon_bypass_man.gemspec
58
- homepage: https://github.com/splaspla-hacker/procon_bypass_man
61
+ - project_template/README.md
62
+ - project_template/app.rb
63
+ - project_template/setting.yml
64
+ - project_template/systemd_units/pbm.service
65
+ homepage: https://github.com/splaplapla/procon_bypass_man
59
66
  licenses:
60
67
  - MIT
61
68
  metadata:
62
- homepage_uri: https://github.com/splaspla-hacker/procon_bypass_man
63
- source_code_uri: https://github.com/splaspla-hacker/procon_bypass_man
69
+ homepage_uri: https://github.com/splaplapla/procon_bypass_man
70
+ source_code_uri: https://github.com/splaplapla/procon_bypass_man
64
71
  post_install_message:
65
72
  rdoc_options: []
66
73
  require_paths:
data/examples/pbm.service DELETED
@@ -1,27 +0,0 @@
1
- # sudo ln -s /home/pi/src/procon_bypass_man/examples/pbm.service /etc/systemd/system/pbm.service
2
- # Usage:
3
- # systemctl daemon-reload
4
- # systemctl enable pbm.service
5
- # systemctl start pbm.service
6
- # systemctl status pbm.service
7
- # systemctl restart pbm.service
8
- # Debug:
9
- # journalctl -xe -f
10
- # TODO:
11
- # do not make PIDFILE
12
-
13
- [Unit]
14
- Description=PBM
15
- # After=network-online.target
16
- After=network.target
17
-
18
- [Service]
19
- Type=simple
20
- # PIDFile=/home/pi/src/procon_bypass_man/pbm_pid
21
- # WatchdogSec=60
22
- WorkingDirectory=/home/pi/src/procon_bypass_man
23
- ExecStart=/home/pi/.rbenv/versions/3.0.1/bin/ruby examples/practical/app.rb
24
- Restart=always
25
-
26
- [Install]
27
- WantedBy=multi-user.target
data/examples/simple.rb DELETED
@@ -1,13 +0,0 @@
1
- ProconBypassMan.run do
2
- prefix_keys_for_changing_layer [:zr, :r, :zl, :l]
3
-
4
- layer :up, mode: :manual do
5
- flip :zr, if_pressed: :zr
6
- end
7
- layer :right
8
- layer :left
9
- layer :down do
10
- flip :zl
11
- end
12
- end
13
-
@@ -1,42 +0,0 @@
1
- class ProconBypassMan::DeviceRegistry
2
- PROCON_PATH = "/dev/hidraw0"
3
- PROCON2_PATH = "/dev/hidraw1"
4
-
5
- def gadget
6
- @gadget
7
- end
8
-
9
- def procon
10
- @procon
11
- end
12
-
13
- def initialize
14
- init_devices
15
- end
16
-
17
- # @return [void]
18
- def init_devices
19
- loop do
20
- case
21
- when File.exist?(PROCON_PATH)
22
- system('echo > /sys/kernel/config/usb_gadget/procon/UDC')
23
- system('ls /sys/class/udc > /sys/kernel/config/usb_gadget/procon/UDC')
24
- sleep 0.5
25
- @gadget = File.open('/dev/hidg0', "w+")
26
- @procon = File.open(PROCON_PATH, "w+")
27
- break
28
- when File.exist?(PROCON2_PATH)
29
- system('echo > /sys/kernel/config/usb_gadget/procon/UDC')
30
- system('ls /sys/class/udc > /sys/kernel/config/usb_gadget/procon/UDC')
31
- sleep 0.5
32
- @gadget = File.open('/dev/hidg0', "w+")
33
- @procon = File.open(PROCON2_PATH, "w+")
34
- break
35
- else
36
- puts "プロコンをラズベイに挿してください"
37
- ProconBypassMan.logger.info("プロコンをラズベイに挿してください")
38
- sleep(1)
39
- end
40
- end
41
- end
42
- end