procon_bypass_man 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -1
- data/.solargraph.yml +23 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +6 -5
- data/Gemfile.lock +40 -1
- data/README.md +6 -2
- data/bin/console +2 -3
- data/bin/rspec +29 -0
- data/lib/procon_bypass_man/buttons_setting_configuration/layer.rb +10 -1
- data/lib/procon_bypass_man/procon.rb +3 -0
- data/lib/procon_bypass_man/version.rb +1 -1
- data/lib/procon_bypass_man.rb +2 -0
- data/procon_bypass_man.gemspec +2 -2
- data/project_template/app.rb +1 -1
- data/project_template/app.rb.erb +1 -1
- metadata +20 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9799933aa6f27812290fd75a4538b7ac0f334f548593a7365840c2a7256dd7ea
|
4
|
+
data.tar.gz: 7f8f101cc58b668d38297d220cfcdd06e650429bf1d8540e7f75d4cb66e374c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38af52cac3890ad462b1dfa99e2d8f278a74631561174a368789cb7ea779382c138baf17fd17ebf6eef815bdd40534af0618d811ee8bbd6c1907142ed06ddc94
|
7
|
+
data.tar.gz: 4b26dbfe8ac913f3cb957a8a93fdb535c8b9b3d8162a9c1837a9f3075390a54fbda3739f4986a91c84775ce633d7b0f1202320e3f7cf2903a8d79bcc9f3ec60d
|
data/.rubocop.yml
CHANGED
@@ -16,8 +16,16 @@ Layout:
|
|
16
16
|
Naming:
|
17
17
|
Enabled: false
|
18
18
|
|
19
|
+
Layout/AccessModifierIndentation:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Layout/IndentationConsistency:
|
23
|
+
Enabled: true
|
24
|
+
|
19
25
|
Lint/ConstantDefinitionInBlock:
|
20
|
-
Enabled:
|
26
|
+
Enabled: true
|
27
|
+
Exclude:
|
28
|
+
- 'spec/**/*.rb'
|
21
29
|
Lint/UselessAssignment:
|
22
30
|
Enabled: false
|
23
31
|
Lint/EmptyBlock:
|
data/.solargraph.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
include:
|
2
|
+
- "**/*.rb"
|
3
|
+
exclude:
|
4
|
+
- spec/**/*
|
5
|
+
- test/**/*
|
6
|
+
- vendor/**/*
|
7
|
+
- ".bundle/**/*"
|
8
|
+
require:
|
9
|
+
- pbmenv
|
10
|
+
- resolv-replace
|
11
|
+
domains: []
|
12
|
+
reporters:
|
13
|
+
- rubocop
|
14
|
+
- require_not_found
|
15
|
+
formatter:
|
16
|
+
rubocop:
|
17
|
+
cops: safe
|
18
|
+
except: []
|
19
|
+
only: []
|
20
|
+
extra_args: []
|
21
|
+
require_paths: []
|
22
|
+
plugins: []
|
23
|
+
max_files: 5000
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.3.9] 2023-07-15
|
2
|
+
* Lボタンを押すだけで簡単スニーキング(スプラ3)ができるようになりました
|
3
|
+
* 例: `left_analog_stick_cap cap: 1100, if_pressed: [:l], combined_press_is_pressed: [:zl], force_neutral: [:l]`
|
4
|
+
|
5
|
+
## [0.3.8.1] 2023-05-08
|
6
|
+
* 接続に失敗しているときに、手動で別のプロセスとして起動できるようにする(多重起動禁止の制限緩和)
|
7
|
+
|
1
8
|
## [0.3.8] 2023-05-03
|
2
9
|
* TCP/IP経由でPBMに入力ができるようになりました
|
3
10
|
* 多重起動ができないようにしました
|
data/Gemfile
CHANGED
@@ -5,18 +5,19 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in procon_bypass_man.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
+
gem "pry"
|
8
9
|
gem "rake"
|
9
10
|
gem "rspec"
|
10
|
-
gem "pry"
|
11
|
-
gem "timecop"
|
12
11
|
gem "rubocop", require: false
|
12
|
+
gem "serialport" # シリアル通信をする時に必要。通常はいらない
|
13
13
|
gem "sinatra", require: false
|
14
|
-
gem "
|
14
|
+
gem "solargraph", require: false
|
15
15
|
gem "stackprof", require: false
|
16
|
-
gem "
|
16
|
+
gem "timecop"
|
17
|
+
gem "webrick", require: false
|
17
18
|
|
18
19
|
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new("2.6.0")
|
19
|
-
gem 'typeprof', require: false
|
20
20
|
gem 'rbs', require: false
|
21
21
|
gem "steep", require: false
|
22
|
+
gem 'typeprof', require: false
|
22
23
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
procon_bypass_man (0.3.
|
4
|
+
procon_bypass_man (0.3.9)
|
5
5
|
action_cable_client
|
6
6
|
blue_green_process (= 0.1.4.2)
|
7
7
|
pbmenv (>= 0.1.11)
|
@@ -19,22 +19,40 @@ GEM
|
|
19
19
|
tzinfo (~> 2.0)
|
20
20
|
zeitwerk (~> 2.3)
|
21
21
|
ast (2.4.2)
|
22
|
+
backport (1.2.0)
|
23
|
+
benchmark (0.2.1)
|
22
24
|
blue_green_process (0.1.4.2)
|
23
25
|
coderay (1.1.3)
|
24
26
|
concurrent-ruby (1.1.9)
|
25
27
|
diff-lcs (1.4.4)
|
28
|
+
e2mmap (0.1.0)
|
26
29
|
eventmachine (1.2.7)
|
27
30
|
ffi (1.15.4)
|
28
31
|
i18n (1.8.11)
|
29
32
|
concurrent-ruby (~> 1.0)
|
33
|
+
jaro_winkler (1.5.6)
|
34
|
+
kramdown (2.4.0)
|
35
|
+
rexml
|
36
|
+
kramdown-parser-gfm (1.1.0)
|
37
|
+
kramdown (~> 2.0)
|
30
38
|
language_server-protocol (3.16.0.3)
|
31
39
|
listen (3.7.0)
|
32
40
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
33
41
|
rb-inotify (~> 0.9, >= 0.9.10)
|
34
42
|
method_source (1.0.0)
|
43
|
+
mini_portile2 (2.8.2)
|
35
44
|
minitest (5.14.4)
|
36
45
|
mustermann (1.1.1)
|
37
46
|
ruby2_keywords (~> 0.0.1)
|
47
|
+
nokogiri (1.15.2)
|
48
|
+
mini_portile2 (~> 2.8.2)
|
49
|
+
racc (~> 1.4)
|
50
|
+
nokogiri (1.15.2-arm-linux)
|
51
|
+
racc (~> 1.4)
|
52
|
+
nokogiri (1.15.2-arm64-darwin)
|
53
|
+
racc (~> 1.4)
|
54
|
+
nokogiri (1.15.2-x86_64-linux)
|
55
|
+
racc (~> 1.4)
|
38
56
|
parallel (1.21.0)
|
39
57
|
parser (3.0.3.2)
|
40
58
|
ast (~> 2.4.1)
|
@@ -42,6 +60,7 @@ GEM
|
|
42
60
|
pry (0.14.1)
|
43
61
|
coderay (~> 1.1)
|
44
62
|
method_source (~> 1.0)
|
63
|
+
racc (1.7.1)
|
45
64
|
rack (2.2.3.1)
|
46
65
|
rack-protection (2.2.0)
|
47
66
|
rack
|
@@ -53,6 +72,8 @@ GEM
|
|
53
72
|
rbs (1.7.1)
|
54
73
|
rbtree (0.4.6)
|
55
74
|
regexp_parser (2.2.0)
|
75
|
+
reverse_markdown (2.1.1)
|
76
|
+
nokogiri
|
56
77
|
rexml (3.2.5)
|
57
78
|
rspec (3.10.0)
|
58
79
|
rspec-core (~> 3.10.0)
|
@@ -87,6 +108,21 @@ GEM
|
|
87
108
|
rack (~> 2.2)
|
88
109
|
rack-protection (= 2.2.0)
|
89
110
|
tilt (~> 2.0)
|
111
|
+
solargraph (0.48.0)
|
112
|
+
backport (~> 1.2)
|
113
|
+
benchmark
|
114
|
+
bundler (>= 1.17.2)
|
115
|
+
diff-lcs (~> 1.4)
|
116
|
+
e2mmap
|
117
|
+
jaro_winkler (~> 1.5)
|
118
|
+
kramdown (~> 2.3)
|
119
|
+
kramdown-parser-gfm (~> 1.1)
|
120
|
+
parser (~> 3.0)
|
121
|
+
reverse_markdown (>= 1.0.5, < 3)
|
122
|
+
rubocop (>= 0.52)
|
123
|
+
thor (~> 1.0)
|
124
|
+
tilt (~> 2.0)
|
125
|
+
yard (~> 0.9, >= 0.9.24)
|
90
126
|
sorted_set (1.0.3)
|
91
127
|
rbtree
|
92
128
|
set (~> 1.0)
|
@@ -102,6 +138,7 @@ GEM
|
|
102
138
|
terminal-table (>= 2, < 4)
|
103
139
|
terminal-table (3.0.2)
|
104
140
|
unicode-display_width (>= 1.1.1, < 3)
|
141
|
+
thor (1.2.2)
|
105
142
|
tilt (2.0.10)
|
106
143
|
timecop (0.9.4)
|
107
144
|
typeprof (0.20.4)
|
@@ -118,6 +155,7 @@ GEM
|
|
118
155
|
websocket-eventmachine-client (1.3.0)
|
119
156
|
websocket-eventmachine-base (~> 1.0)
|
120
157
|
websocket-native (1.0.0)
|
158
|
+
yard (0.9.34)
|
121
159
|
zeitwerk (2.5.1)
|
122
160
|
|
123
161
|
PLATFORMS
|
@@ -137,6 +175,7 @@ DEPENDENCIES
|
|
137
175
|
rubocop
|
138
176
|
serialport
|
139
177
|
sinatra
|
178
|
+
solargraph
|
140
179
|
stackprof
|
141
180
|
steep
|
142
181
|
timecop
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ https://user-images.githubusercontent.com/1664497/171327108-f12f56a5-fc36-48da-9
|
|
18
18
|
* 他のシリーズは未確認です
|
19
19
|
* データ通信が可能なUSBケーブル
|
20
20
|
|
21
|
-
##
|
21
|
+
## 必要なソフトウェア
|
22
22
|
* ruby 2.5 以上
|
23
23
|
|
24
24
|
## プラグイン
|
@@ -41,6 +41,10 @@ https://user-images.githubusercontent.com/1664497/171327108-f12f56a5-fc36-48da-9
|
|
41
41
|
* キーリマップ, 連射, マクロ, 外部ツールからの入力
|
42
42
|
* リマップは1つのキーを別のキーに割り当てます
|
43
43
|
* 連射中には特定のキーの入力を無視したり、複数のキーをトリガーに連射することができます
|
44
|
+
* スプラ2, 3の自動ドット打ち
|
45
|
+
* https://zenn.dev/jiikko/articles/fcec13200487d5
|
46
|
+
* オートトリガー
|
47
|
+
* https://zenn.dev/jiikko/articles/e794f89afe8896
|
44
48
|
* どうしてsudoが必要なの?
|
45
49
|
* 操作するdeviceファイルの所有者がrootだからです
|
46
50
|
* 市販されているサードパーティ製連射機との違いは?
|
@@ -85,7 +89,7 @@ sudo kill -USR2 `cat ./pbm_pid`
|
|
85
89
|
* procon_bypassの運営・開発・サーバー費用に充てさせていただきます。また、問い合わせに優先して対応します。
|
86
90
|
|
87
91
|
## Links
|
88
|
-
* https://discord.gg/
|
92
|
+
* https://discord.gg/GjaywxVZHY
|
89
93
|
* 質問などご意見をdiscordでも受け付けています
|
90
94
|
|
91
95
|
## License
|
data/bin/console
CHANGED
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
@@ -172,7 +172,7 @@ module ProconBypassMan
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
-
def left_analog_stick_cap(cap: nil, if_pressed: nil, force_neutral: nil)
|
175
|
+
def left_analog_stick_cap(cap: nil, if_pressed: nil, force_neutral: nil, combined_press_is_pressed: nil)
|
176
176
|
case cap
|
177
177
|
when Integer
|
178
178
|
# OK
|
@@ -203,6 +203,15 @@ module ProconBypassMan
|
|
203
203
|
return
|
204
204
|
end
|
205
205
|
|
206
|
+
begin
|
207
|
+
if(combined_press_is_pressed = ParamNormalizer::IfPressedAllowsFalsy.new(combined_press_is_pressed).to_value!)
|
208
|
+
hash[:combined_press_is_pressed] = combined_press_is_pressed
|
209
|
+
end
|
210
|
+
rescue ParamNormalizer::UnSupportValueError
|
211
|
+
Kernel.warn "設定ファイルに記述ミスがあります. left_analog_stick_capのcombined_press_is_pressedにはボタンを渡してください."
|
212
|
+
return
|
213
|
+
end
|
214
|
+
|
206
215
|
left_analog_stick_caps << hash
|
207
216
|
end
|
208
217
|
|
@@ -226,6 +226,9 @@ class ProconBypassMan::Procon
|
|
226
226
|
config[:force_neutral]&.each do |force_neutral_button|
|
227
227
|
user_operation.unpress_button(force_neutral_button)
|
228
228
|
end
|
229
|
+
config[:combined_press_is_pressed]&.each do |button|
|
230
|
+
user_operation.press_button(button)
|
231
|
+
end
|
229
232
|
user_operation.apply_left_analog_stick_cap(cap: config[:cap])
|
230
233
|
end
|
231
234
|
end
|
data/lib/procon_bypass_man.rb
CHANGED
@@ -116,6 +116,8 @@ module ProconBypassMan
|
|
116
116
|
rescue ProconBypassMan::DeviceConnection::TimeoutError
|
117
117
|
ProconBypassMan::SendErrorCommand.execute(error: "接続に失敗しました。プロコンとRaspberry Piのケーブルを差し直して、再実行してください。\n改善しない場合は、app.logの中身を添えて不具合報告をお願いします。")
|
118
118
|
ProconBypassMan::DeviceStatus.change_to_connected_but_sleeping!
|
119
|
+
FileUtils.rm_rf(ProconBypassMan.pid_path) # NOTE: この状態になったときに手動で起動できるようにする(多重起動禁止回避)
|
120
|
+
|
119
121
|
%w(TERM INT).each do |sig|
|
120
122
|
Kernel.trap(sig) { exit 0 }
|
121
123
|
end
|
data/procon_bypass_man.gemspec
CHANGED
@@ -28,10 +28,10 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
# Uncomment to register a new dependency of your gem
|
31
|
-
spec.add_dependency "pbmenv", ">= 0.1.11" # enable_pbm_cloud連携機能でPbmenv.install, .cleanを使っている.
|
32
31
|
spec.add_dependency "action_cable_client"
|
33
|
-
spec.add_dependency "sorted_set"
|
34
32
|
spec.add_dependency "blue_green_process", '0.1.4.2'
|
33
|
+
spec.add_dependency "pbmenv", ">= 0.1.11" # enable_pbm_cloud連携機能でPbmenv.install, .cleanを使っている.
|
34
|
+
spec.add_dependency "sorted_set"
|
35
35
|
|
36
36
|
# For more information and examples about making a new gem, checkout our
|
37
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/project_template/app.rb
CHANGED
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
gemfile do
|
13
13
|
source 'https://rubygems.org'
|
14
14
|
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
15
|
-
gem 'procon_bypass_man', '0.3.
|
15
|
+
gem 'procon_bypass_man', '0.3.9'
|
16
16
|
# uncomment if you want to use master branch
|
17
17
|
# gem 'procon_bypass_man', github: 'splaplapla/procon_bypass_man', branch: 'master'
|
18
18
|
# uncomment if you want to use serial communication feature
|
data/project_template/app.rb.erb
CHANGED
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
gemfile do
|
13
13
|
source 'https://rubygems.org'
|
14
14
|
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
15
|
-
gem 'procon_bypass_man', '0.3.
|
15
|
+
gem 'procon_bypass_man', '0.3.9'
|
16
16
|
# uncomment if you want to use master branch
|
17
17
|
# gem 'procon_bypass_man', github: 'splaplapla/procon_bypass_man', branch: 'master'
|
18
18
|
# uncomment if you want to use serial communication feature
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procon_bypass_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiikko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: action_cable_client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: blue_green_process
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.1.4.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.1.4.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: pbmenv
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.1.11
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.1.11
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: sorted_set
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
68
|
+
version: '0'
|
69
69
|
description: A programmable converter for Nintendo Switch Pro Controller
|
70
70
|
email:
|
71
71
|
- n905i.1214@gmail.com
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- ".rspec"
|
82
82
|
- ".rubocop.yml"
|
83
83
|
- ".ruby-version"
|
84
|
+
- ".solargraph.yml"
|
84
85
|
- CHANGELOG.md
|
85
86
|
- Gemfile
|
86
87
|
- Gemfile.lock
|
@@ -94,6 +95,7 @@ files:
|
|
94
95
|
- bin/dev_api_server.rb
|
95
96
|
- bin/generate_default_app
|
96
97
|
- bin/generate_output_report
|
98
|
+
- bin/rspec
|
97
99
|
- bin/setup
|
98
100
|
- bin/validate_external_input
|
99
101
|
- docs/getting_started.md
|