procon_bypass_man 0.1.7 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -2
- data/.github/workflows/ruby.yml +34 -0
- data/.gitignore +4 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +54 -2
- data/README.md +13 -8
- data/Rakefile +10 -1
- data/Steepfile +39 -0
- data/bin/console +4 -0
- data/bin/dev_api_server.rb +18 -0
- data/docs/setup_raspi.mitamae.rb +17 -2
- data/docs/setup_raspi_by_mitamae.md +2 -1
- data/lib/procon_bypass_man/background/report_thread.rb +42 -0
- data/lib/procon_bypass_man/boot_message.rb +40 -0
- data/lib/procon_bypass_man/buttons_setting_configuration.rb +102 -0
- data/lib/procon_bypass_man/bypass/usb_hid_logger.rb +27 -0
- data/lib/procon_bypass_man/bypass.rb +60 -29
- data/lib/procon_bypass_man/callbacks.rb +70 -0
- data/lib/procon_bypass_man/configuration/layer.rb +50 -4
- data/lib/procon_bypass_man/configuration/loader.rb +8 -8
- data/lib/procon_bypass_man/configuration/validator.rb +1 -1
- data/lib/procon_bypass_man/configuration.rb +67 -64
- data/lib/procon_bypass_man/device_connector.rb +13 -30
- data/lib/procon_bypass_man/io_monitor.rb +7 -4
- data/lib/procon_bypass_man/on_memory_cache.rb +34 -0
- data/lib/procon_bypass_man/outbound/base.rb +53 -0
- data/lib/procon_bypass_man/outbound/error_reporter.rb +13 -0
- data/lib/procon_bypass_man/outbound/pressed_buttons_reporter.rb +13 -0
- data/lib/procon_bypass_man/outbound/reporter.rb +12 -0
- data/lib/procon_bypass_man/procon/analog_stick.rb +31 -0
- data/lib/procon_bypass_man/procon/analog_stick_cap.rb +65 -0
- data/lib/procon_bypass_man/procon/button_collection.rb +15 -6
- data/lib/procon_bypass_man/procon/layer_changeable.rb +2 -2
- data/lib/procon_bypass_man/procon/macro_registry.rb +2 -2
- data/lib/procon_bypass_man/procon/mode_registry.rb +4 -4
- data/lib/procon_bypass_man/procon/press_button_aware.rb +13 -0
- data/lib/procon_bypass_man/procon/pressed_button_helper.rb +1 -11
- data/lib/procon_bypass_man/procon/user_operation.rb +15 -4
- data/lib/procon_bypass_man/procon.rb +25 -5
- data/lib/procon_bypass_man/readonly_procon.rb +32 -0
- data/lib/procon_bypass_man/runner.rb +39 -48
- data/lib/procon_bypass_man/uptime.rb +15 -0
- data/lib/procon_bypass_man/version.rb +1 -1
- data/lib/procon_bypass_man.rb +26 -33
- data/project_template/README.md +3 -2
- data/project_template/app.rb +8 -6
- data/project_template/systemd_units/pbm.service +1 -1
- data/project_template/systemd_units/pbm_web.service +11 -0
- data/project_template/web.rb +16 -0
- data/sig/README.rb +4 -0
- data/sig/main.rbs +507 -0
- metadata +25 -5
- data/examples/practical/app.rb +0 -21
- data/examples/practical/setting.yml +0 -24
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.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiikko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: extension for Nintendo Switch Pro Controller
|
14
14
|
email:
|
@@ -18,6 +18,7 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".circleci/config.yml"
|
21
|
+
- ".github/workflows/ruby.yml"
|
21
22
|
- ".gitignore"
|
22
23
|
- ".rspec"
|
23
24
|
- ".rubocop.yml"
|
@@ -28,40 +29,59 @@ files:
|
|
28
29
|
- LICENSE.txt
|
29
30
|
- README.md
|
30
31
|
- Rakefile
|
32
|
+
- Steepfile
|
31
33
|
- bin/console
|
34
|
+
- bin/dev_api_server.rb
|
32
35
|
- bin/setup
|
33
36
|
- docs/how_to_connect_procon.md
|
34
37
|
- docs/setup_raspi.md
|
35
38
|
- docs/setup_raspi.mitamae.rb
|
36
39
|
- docs/setup_raspi_by_mitamae.md
|
37
|
-
- examples/practical/app.rb
|
38
|
-
- examples/practical/setting.yml
|
39
40
|
- lib/procon_bypass_man.rb
|
41
|
+
- lib/procon_bypass_man/background/report_thread.rb
|
42
|
+
- lib/procon_bypass_man/boot_message.rb
|
43
|
+
- lib/procon_bypass_man/buttons_setting_configuration.rb
|
40
44
|
- lib/procon_bypass_man/bypass.rb
|
45
|
+
- lib/procon_bypass_man/bypass/usb_hid_logger.rb
|
46
|
+
- lib/procon_bypass_man/callbacks.rb
|
41
47
|
- lib/procon_bypass_man/configuration.rb
|
42
48
|
- lib/procon_bypass_man/configuration/layer.rb
|
43
49
|
- lib/procon_bypass_man/configuration/loader.rb
|
44
50
|
- lib/procon_bypass_man/configuration/validator.rb
|
45
51
|
- lib/procon_bypass_man/device_connector.rb
|
46
52
|
- lib/procon_bypass_man/io_monitor.rb
|
53
|
+
- lib/procon_bypass_man/on_memory_cache.rb
|
54
|
+
- lib/procon_bypass_man/outbound/base.rb
|
55
|
+
- lib/procon_bypass_man/outbound/error_reporter.rb
|
56
|
+
- lib/procon_bypass_man/outbound/pressed_buttons_reporter.rb
|
57
|
+
- lib/procon_bypass_man/outbound/reporter.rb
|
47
58
|
- lib/procon_bypass_man/processor.rb
|
48
59
|
- lib/procon_bypass_man/procon.rb
|
60
|
+
- lib/procon_bypass_man/procon/analog_stick.rb
|
61
|
+
- lib/procon_bypass_man/procon/analog_stick_cap.rb
|
49
62
|
- lib/procon_bypass_man/procon/button_collection.rb
|
50
63
|
- lib/procon_bypass_man/procon/data.rb
|
51
64
|
- lib/procon_bypass_man/procon/flip_cache.rb
|
52
65
|
- lib/procon_bypass_man/procon/layer_changeable.rb
|
53
66
|
- lib/procon_bypass_man/procon/macro_registry.rb
|
54
67
|
- lib/procon_bypass_man/procon/mode_registry.rb
|
68
|
+
- lib/procon_bypass_man/procon/press_button_aware.rb
|
55
69
|
- lib/procon_bypass_man/procon/pressed_button_helper.rb
|
56
70
|
- lib/procon_bypass_man/procon/user_operation.rb
|
71
|
+
- lib/procon_bypass_man/readonly_procon.rb
|
57
72
|
- lib/procon_bypass_man/runner.rb
|
58
73
|
- lib/procon_bypass_man/timer.rb
|
74
|
+
- lib/procon_bypass_man/uptime.rb
|
59
75
|
- lib/procon_bypass_man/version.rb
|
60
76
|
- procon_bypass_man.gemspec
|
61
77
|
- project_template/README.md
|
62
78
|
- project_template/app.rb
|
63
79
|
- project_template/setting.yml
|
64
80
|
- project_template/systemd_units/pbm.service
|
81
|
+
- project_template/systemd_units/pbm_web.service
|
82
|
+
- project_template/web.rb
|
83
|
+
- sig/README.rb
|
84
|
+
- sig/main.rbs
|
65
85
|
homepage: https://github.com/splaplapla/procon_bypass_man
|
66
86
|
licenses:
|
67
87
|
- MIT
|
@@ -83,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
103
|
- !ruby/object:Gem::Version
|
84
104
|
version: '0'
|
85
105
|
requirements: []
|
86
|
-
rubygems_version: 3.2.
|
106
|
+
rubygems_version: 3.2.30
|
87
107
|
signing_key:
|
88
108
|
specification_version: 4
|
89
109
|
summary: extension for Nintendo Switch Pro Controller
|
data/examples/practical/app.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# sudo ln -s /home/pi/src/procon_bypass_man/examples/practical/setting.yml /home/pi/src/procon_bypass_man/setting.yml
|
4
|
-
# cd src/procon_bypass_man
|
5
|
-
# sudo ruby examples/practical/app.rb
|
6
|
-
|
7
|
-
require 'bundler/inline'
|
8
|
-
|
9
|
-
gemfile do
|
10
|
-
source 'https://rubygems.org'
|
11
|
-
gem 'procon_bypass_man', github: 'splaplapla/procon_bypass_man', branch: "edge"
|
12
|
-
gem 'procon_bypass_man-splatoon2', github: 'splaplapla/procon_bypass_man-splatoon2', branch: "0.1.0"
|
13
|
-
end
|
14
|
-
|
15
|
-
ProconBypassMan.tap do |pbm|
|
16
|
-
pbm.logger = Logger.new("#{ProconBypassMan.root}/app.log", 5, 1024 * 1024 * 10) # 5世代まで残して, 10MBでローテーション
|
17
|
-
pbm.logger.level = :debug
|
18
|
-
pbm.root = File.expand_path(__dir__)
|
19
|
-
end
|
20
|
-
|
21
|
-
ProconBypassMan.run(setting_path: "./setting.yml")
|
@@ -1,24 +0,0 @@
|
|
1
|
-
version: 1.0
|
2
|
-
setting: |-
|
3
|
-
fast_return = ProconBypassMan::Splatoon2::Macro::FastReturn
|
4
|
-
guruguru = ProconBypassMan::Splatoon2::Mode::Guruguru
|
5
|
-
|
6
|
-
install_macro_plugin fast_return
|
7
|
-
install_mode_plugin guruguru
|
8
|
-
|
9
|
-
prefix_keys_for_changing_layer [:zr, :r, :zl, :l]
|
10
|
-
|
11
|
-
layer :up, mode: :manual do
|
12
|
-
flip :zr, if_pressed: :zr, force_neutral: :zl, flip_interval: "8F"
|
13
|
-
flip :zl, if_pressed: [:y, :b, :zl]
|
14
|
-
flip :down, if_pressed: :down
|
15
|
-
macro fast_return.name, if_pressed: [:y, :b, :down]
|
16
|
-
remap :l, to: :zr
|
17
|
-
end
|
18
|
-
layer :right, mode: guruguru.name
|
19
|
-
layer :left do
|
20
|
-
# no-op
|
21
|
-
end
|
22
|
-
layer :down do
|
23
|
-
flip :zl
|
24
|
-
end
|