procon_bypass_man 0.3.3.1 → 0.3.5
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 +4 -4
- data/.circleci/config.yml +2 -1
- data/CHANGELOG.md +12 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +8 -6
- data/README.md +2 -9
- data/benchmarks/README.md +6 -0
- data/benchmarks/bypass.rb +11 -0
- data/docs/getting_started.md +13 -9
- data/docs/setting/left-analogstick-cap.md +1 -1
- data/docs/setting/splatoon3_macro_dasei_cancel.md +7 -0
- data/docs/setting/splatoon3_macro_forward_ikarole.md +1 -1
- data/docs/setting/splatoon3_rotation_left_stick.md +20 -0
- data/lib/procon_bypass_man/background/jobs/report_warning_job.rb +11 -0
- data/lib/procon_bypass_man/background.rb +1 -0
- data/lib/procon_bypass_man/buttons_setting_configuration/loader.rb +6 -0
- data/lib/procon_bypass_man/buttons_setting_configuration/metadata_loader.rb +27 -0
- data/lib/procon_bypass_man/buttons_setting_configuration/validator.rb +4 -4
- data/lib/procon_bypass_man/bypass/bypass_command.rb +32 -9
- data/lib/procon_bypass_man/bypass/procon_to_switch.rb +12 -7
- data/lib/procon_bypass_man/bypass/switch_to_procon.rb +3 -3
- data/lib/procon_bypass_man/commands/send_warning_command.rb +18 -0
- data/lib/procon_bypass_man/commands.rb +1 -0
- data/lib/procon_bypass_man/plugin/splatoon3/macro/rotation_left_stick.rb +21 -0
- data/lib/procon_bypass_man/plugins.rb +1 -0
- data/lib/procon_bypass_man/procon/macro_builder.rb +6 -1
- data/lib/procon_bypass_man/remote_pbm_action/change_pbm_version_action.rb +1 -0
- data/lib/procon_bypass_man/runner.rb +16 -7
- data/lib/procon_bypass_man/version.rb +1 -1
- data/lib/procon_bypass_man.rb +6 -6
- data/procon_bypass_man.gemspec +2 -3
- data/project_template/app.rb +1 -1
- data/project_template/app.rb.erb +1 -1
- metadata +15 -10
- data/lib/procon_bypass_man/support/gc.rb +0 -8
- data/lib/procon_bypass_man/support/signal_handler.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4ffa6c5a0eca5298143505c133f6895f7bb33b6061a36e6123c27e19a0ffcbb
|
|
4
|
+
data.tar.gz: 74e77a823d913769a75b2dd698991bb1fed6a62a1da9a65928e00b86773e90df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90cbb299a402bbab3fae219fc17b359155b48c67cf34761ad69c63ee5ba72ed7cf356d5829ee003d19558c7418f07444d7f35619d82bebc124975ab1c40cb85f
|
|
7
|
+
data.tar.gz: f03f39550078285114b0a7ac209938dee7b335c99689cba48ed4d4f4d62e659b0fb1fcea51bd800acfe61839cc92c235f5112e3adc5a3896e033f5dbfa224373
|
data/.circleci/config.yml
CHANGED
|
@@ -27,7 +27,8 @@ commands:
|
|
|
27
27
|
- gem-cache-v1-<< parameters.ruby-version >>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
|
|
28
28
|
- gem-cache-v1-<< parameters.ruby-version >>-{{ arch }}-{{ .Branch }}
|
|
29
29
|
- gem-cache-v1
|
|
30
|
-
|
|
30
|
+
# NOTE: ruby2.5だとbundler2.4系に対応していないのでバージョンを固定する
|
|
31
|
+
- run: gem i bundler -v 2.3.26 && bundle install --path vendor/bundle --jobs 100 && bundle clean
|
|
31
32
|
- save_cache:
|
|
32
33
|
key: gem-cache-v1-<< parameters.ruby-version >>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
|
|
33
34
|
paths:
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [0.3.5] - 2022-2-9
|
|
2
|
+
* 設定ファイルに起動な必要なPBMのバージョンを表記できるようになりました
|
|
3
|
+
* https://github.com/splaplapla/procon_bypass_man/pull/238
|
|
4
|
+
* レイヤー変更ボタン(prefix_keys_for_changing_layer)が空欄の時に設定ファイルをエラーにしないようになりました
|
|
5
|
+
* PBM-CloudからPBMをアップグレードするときに、古いバージョンを削除するようにしました
|
|
6
|
+
|
|
7
|
+
## [0.3.4] - 2022-12-26
|
|
8
|
+
* 左スティックを1回転するマクロを追加しました
|
|
9
|
+
* 詳しい設定方法については docs/setting/splatoon3_rotation_left_stick.md を参照してください
|
|
10
|
+
* プログラムの停止時・再読み込み時に時間がかかってた不具合を修正しました
|
|
11
|
+
|
|
1
12
|
## [0.3.3.1] - 2022-11-13
|
|
2
13
|
* setting.ymlにmacroを使って「スプラ用マクロ、惰性キャンセル」の閾値を設定できない不具合を修正しました
|
|
3
14
|
|
|
@@ -14,7 +25,7 @@
|
|
|
14
25
|
* レイヤーを変更しているときにコントローラーを振動できるようになりました
|
|
15
26
|
* setting.yml で `enable(:rumble_on_layer_change)` と記述してください
|
|
16
27
|
* イカロールをするマクロを追加しました
|
|
17
|
-
* 詳しい設定方法については docs/setting/
|
|
28
|
+
* 詳しい設定方法については docs/setting/splatoon3_macro_forward_ikarole.md を参照してください
|
|
18
29
|
* スプラ用マクロ、惰性キャンセルを削除しました
|
|
19
30
|
|
|
20
31
|
## [0.3.0] - 2022-9-9
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
procon_bypass_man (0.3.
|
|
4
|
+
procon_bypass_man (0.3.5)
|
|
5
5
|
action_cable_client
|
|
6
|
-
blue_green_process
|
|
7
|
-
pbmenv (>= 0.1.
|
|
6
|
+
blue_green_process (= 0.1.4.2)
|
|
7
|
+
pbmenv (>= 0.1.11)
|
|
8
8
|
sorted_set
|
|
9
9
|
|
|
10
10
|
GEM
|
|
@@ -19,7 +19,7 @@ GEM
|
|
|
19
19
|
tzinfo (~> 2.0)
|
|
20
20
|
zeitwerk (~> 2.3)
|
|
21
21
|
ast (2.4.2)
|
|
22
|
-
blue_green_process (0.1.
|
|
22
|
+
blue_green_process (0.1.4.2)
|
|
23
23
|
coderay (1.1.3)
|
|
24
24
|
concurrent-ruby (1.1.9)
|
|
25
25
|
diff-lcs (1.4.4)
|
|
@@ -38,7 +38,7 @@ GEM
|
|
|
38
38
|
parallel (1.21.0)
|
|
39
39
|
parser (3.0.3.2)
|
|
40
40
|
ast (~> 2.4.1)
|
|
41
|
-
pbmenv (0.1.
|
|
41
|
+
pbmenv (0.1.11)
|
|
42
42
|
pry (0.14.1)
|
|
43
43
|
coderay (~> 1.1)
|
|
44
44
|
method_source (~> 1.0)
|
|
@@ -51,7 +51,7 @@ GEM
|
|
|
51
51
|
rb-inotify (0.10.1)
|
|
52
52
|
ffi (~> 1.0)
|
|
53
53
|
rbs (1.7.1)
|
|
54
|
-
rbtree (0.4.
|
|
54
|
+
rbtree (0.4.6)
|
|
55
55
|
regexp_parser (2.2.0)
|
|
56
56
|
rexml (3.2.5)
|
|
57
57
|
rspec (3.10.0)
|
|
@@ -89,6 +89,7 @@ GEM
|
|
|
89
89
|
sorted_set (1.0.3)
|
|
90
90
|
rbtree
|
|
91
91
|
set (~> 1.0)
|
|
92
|
+
stackprof (0.2.22)
|
|
92
93
|
steep (0.47.0)
|
|
93
94
|
activesupport (>= 5.1)
|
|
94
95
|
language_server-protocol (>= 3.15, < 4.0)
|
|
@@ -134,6 +135,7 @@ DEPENDENCIES
|
|
|
134
135
|
rspec
|
|
135
136
|
rubocop
|
|
136
137
|
sinatra
|
|
138
|
+
stackprof
|
|
137
139
|
steep
|
|
138
140
|
timecop
|
|
139
141
|
typeprof
|
data/README.md
CHANGED
|
@@ -38,7 +38,7 @@ https://user-images.githubusercontent.com/1664497/171327108-f12f56a5-fc36-48da-9
|
|
|
38
38
|
* レイヤーを切り替える方法は?
|
|
39
39
|
* 設定ファイルに記述している `prefix_keys_for_changing_layer`の後ろにあるキーを同時押しながら、十字キーのどれかを押すことで任意のレイヤーに切り替わります
|
|
40
40
|
* このツールでできることは?
|
|
41
|
-
* キーリマップ, 連射,
|
|
41
|
+
* キーリマップ, 連射, マクロ
|
|
42
42
|
* リマップは1つのキーを別のキーに割り当てます
|
|
43
43
|
* 連射中には特定のキーの入力を無視したり、複数のキーをトリガーに連射することができます
|
|
44
44
|
* どうしてsudoが必要なの?
|
|
@@ -52,7 +52,7 @@ https://user-images.githubusercontent.com/1664497/171327108-f12f56a5-fc36-48da-9
|
|
|
52
52
|
* 日を跨ぐ24時ちょうどになった瞬間はLinuxのcronが起動などがするようで、この時間は数秒間バイパスが激しく遅延します
|
|
53
53
|
* ログファイルのローテションが少なくとも走るはずなので、不要なデーモンを停止するなどで影響を小さくすることはできると思いますが、完全に抑制することは難しいと思います
|
|
54
54
|
* コントローラーから読み取ってSwitchに書き込む時間は、少なくとも0.02秒はかかります
|
|
55
|
-
*
|
|
55
|
+
* 遅延は動かしているRaspberry Piの負荷に依存します
|
|
56
56
|
|
|
57
57
|
<!--
|
|
58
58
|
## TODO
|
|
@@ -80,13 +80,6 @@ sudo kill -USR2 `cat ./pbm_pid`
|
|
|
80
80
|
* githubのreleaseを作成する
|
|
81
81
|
-->
|
|
82
82
|
|
|
83
|
-
## Raspberry Pi4のセットアップを代行します
|
|
84
|
-
* Raspberry Pi4を開発者である私の家に配送してくれれば、セットアップを代行します。セットアップが終わり次第送り返します
|
|
85
|
-
* 使い方に関しては、https://pbm-cloud.jiikko.com ですべて完結するので、Linuxの知識は不要です
|
|
86
|
-
* 何か問題が起きた時はリモートログインでサポート可能です
|
|
87
|
-
* 希望者はDiscordの `kawagu#7684` にDMを送ってください
|
|
88
|
-
* お金はかかりません
|
|
89
|
-
|
|
90
83
|
## 開発を支援してくれる人を募集しています
|
|
91
84
|
* https://jiikko.fanbox.cc/
|
|
92
85
|
* procon_bypassの運営・開発・サーバー費用に充てさせていただきます。また、問い合わせに優先して対応します。
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require "stackprof"
|
|
2
|
+
require "procon_bypass_man"
|
|
3
|
+
|
|
4
|
+
# no action
|
|
5
|
+
raw_binary = ["30f28100800078c77448287509550274ff131029001b0022005a0271ff191028001e00210064027cff1410280020002100000000000000000000000000000000"].pack("H*")
|
|
6
|
+
binary = ProconBypassMan::Domains::InboundProconBinary.new(binary: raw_binary)
|
|
7
|
+
StackProf.run(mode: :cpu, out: 'tmp/stackprof.dump') do
|
|
8
|
+
10000.times do
|
|
9
|
+
ProconBypassMan::Processor.new(binary).process
|
|
10
|
+
end
|
|
11
|
+
end
|
data/docs/getting_started.md
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
* [はじめに](#はじめに)
|
|
4
4
|
* [procon_bypass_manで解決したいこと](#procon_bypass_manで解決したいこと)
|
|
5
5
|
* [procon_bypass_manでできること](#procon_bypass_manでできること)
|
|
6
|
-
* [セットアップを代行できます](#セットアップを代行できます)
|
|
7
6
|
* [セットアップ](#セットアップ)
|
|
8
7
|
* [ラズベリーパイのセットアップ](#ラズベリーパイのセットアップ)
|
|
9
8
|
* [procon_bypass_manのインストール](#procon_bypass_manのインストール)
|
|
10
9
|
* [pbmenvを使う方法](#pbmenvを使う方法)
|
|
11
10
|
* [pbmenvを使わない方法](#pbmenvを使わない方法)
|
|
11
|
+
* [RaspberryPiの給電について](#RaspberryPiの給電について)
|
|
12
12
|
* [普段使いをするためのセットアップ](#普段使いをするためのセットアップ)
|
|
13
13
|
* [レイヤー](#レイヤー)
|
|
14
14
|
* [マクロ](#マクロ)
|
|
15
15
|
* [左スティックの感度調整](#左スティックの感度調整)
|
|
16
|
-
* [入力表示](#入力表示)
|
|
17
16
|
* [設定ファイルの書き方](#設定ファイルの書き方)
|
|
18
17
|
* プラグインの書き方
|
|
19
18
|
* [設定ファイルの書き方がわからない、エラーが起きるとき](#設定ファイルの書き方がわからない、エラーが起きるとき)
|
|
@@ -43,15 +42,10 @@
|
|
|
43
42
|
* [設定方法](/docs/setting/left-analogstick-cap.md)
|
|
44
43
|
* WEBから設定状態の閲覧・反映
|
|
45
44
|
* ボタンリマップ
|
|
45
|
+
<!--
|
|
46
46
|
* 入力表示
|
|
47
47
|
* https://github.com/splaplapla/switch-procon-input-viewer
|
|
48
|
-
|
|
49
|
-
## セットアップを代行できます
|
|
50
|
-
* Raspberry Pi4を開発者である私の家に配送してくれれば、セットアップを代行します。セットアップが終わり次第送り返します
|
|
51
|
-
* 使い方に関しては、https://pbm-cloud.jiikko.com ですべて完結するので、Linuxの知識は不要です
|
|
52
|
-
* 何か問題が起きた時はリモートログインでサポート可能です
|
|
53
|
-
* 希望者はDiscordの `kawagu#7684` にDMを送ってください
|
|
54
|
-
* お金はかかりません
|
|
48
|
+
-->
|
|
55
49
|
|
|
56
50
|
## セットアップ
|
|
57
51
|
### ラズベリーパイのセットアップ
|
|
@@ -123,6 +117,14 @@ wget https://raw.githubusercontent.com/jiikko/procon_bypass_man_sample/master/se
|
|
|
123
117
|
sudo /home/pi/.rbenv/versions/3.0.1/bin/ruby app.rb
|
|
124
118
|
```
|
|
125
119
|
|
|
120
|
+
## RaspberryPiの給電について
|
|
121
|
+
Raspberry Piの状態によっては、Switchと接続しているときに、Raspberry Piが電力不足になるようで動作が不安定になることがあります。
|
|
122
|
+
不安定になるようであれば、Switch以外からも給電してみてください。詳細には言及しませんが、主な給電方法には、以下があります。
|
|
123
|
+
|
|
124
|
+
* GPIO端子
|
|
125
|
+
* セルフパワーUSBハブ
|
|
126
|
+
* PoE
|
|
127
|
+
|
|
126
128
|
## 普段使いをするためのセットアップ
|
|
127
129
|
|
|
128
130
|
procon_bypass_manを起動するだけでプロコンと接続ができるようになったら、Raspberry Piを起動したときにprocon_bypass_manも自動起動するように設定しましょう。
|
|
@@ -215,9 +217,11 @@ open_macro :sokuwari, steps: [:toggle_r_for_0_2sec, :toggle_thumbr_for_0_14sec,
|
|
|
215
217
|
## 左スティックの感度調整
|
|
216
218
|
[左スティックの感度調整](/docs/setting/left-analogstick-cap.md)
|
|
217
219
|
|
|
220
|
+
<!--
|
|
218
221
|
## 入力表示
|
|
219
222
|
* 使い方は https://github.com/splaplapla/switch-procon-input-viewer を参照してください。
|
|
220
223
|
* https://zenn.dev/jiikko/articles/2ef0ccbdfe0fe7 に技術的な解説を書きました
|
|
224
|
+
-->
|
|
221
225
|
|
|
222
226
|
## 設定ファイルの書き方
|
|
223
227
|
設定ファイルは、ymlフォーマットに埋め込まれたRubyスクリプトで記述します。
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
* 本マクロは実験段階で、オプション名などの仕様が変更される可能性が高いです
|
|
4
4
|
* procon_bypass_man: 0.3.3以上が必要です
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
https://user-images.githubusercontent.com/1664497/210229394-493a7ad4-b4cf-4dfd-87da-2398494e00fd.mp4
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## 1. install_macro_pluginでマクロを有効化します
|
|
7
14
|
* `setting.yml` に`install_macro_plugin ProconBypassMan::Plugin::Splatoon3::Macro::DaseiCancel` と書きます
|
|
8
15
|
* これを記述することで、layer内でmacroを呼び出せるようになります
|
|
@@ -26,7 +26,7 @@ version: 1.0
|
|
|
26
26
|
setting: |-
|
|
27
27
|
prefix_keys_for_changing_layer [:zr, :zl, :l]
|
|
28
28
|
|
|
29
|
-
install_macro_plugin(ProconBypassMan::Plugin::
|
|
29
|
+
install_macro_plugin(ProconBypassMan::Plugin::Splatoon3::Macro::ForwardIkarole)
|
|
30
30
|
|
|
31
31
|
layer :up do
|
|
32
32
|
macro ProconBypassMan::Plugin::Splatoon3::Macro::ForwardIkarole, if_pressed: [:thumbl], force_neutral: []
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# スプラトゥーン3: 左スティック1回転 マクロの設定方法
|
|
2
|
+
|
|
3
|
+
* procon_bypass_man: 0.3.4以上が必要です
|
|
4
|
+
* このマクロは、左スティックを高速に1回転をします
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
https://user-images.githubusercontent.com/1664497/205416889-d458668e-ab46-4867-890c-ce32ff467128.mp4
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 設定例
|
|
11
|
+
```yaml
|
|
12
|
+
version: 1.0
|
|
13
|
+
setting: |-
|
|
14
|
+
prefix_keys_for_changing_layer [:zr, :zl, :l]
|
|
15
|
+
install_macro_plugin(ProconBypassMan::Plugin::Splatoon3::Macro::RotationLeftStick)
|
|
16
|
+
|
|
17
|
+
layer :up do
|
|
18
|
+
macro ProconBypassMan::Plugin::Splatoon3::Macro::RotationLeftStick, if_pressed: [:left]
|
|
19
|
+
end
|
|
20
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class ProconBypassMan::ReportWarningJob < ProconBypassMan::ReportEventBaseJob
|
|
2
|
+
extend ProconBypassMan::HasExternalApiSetting
|
|
3
|
+
|
|
4
|
+
# @param [String] body
|
|
5
|
+
def self.perform(body)
|
|
6
|
+
ProconBypassMan::ReportHttpClient.new(
|
|
7
|
+
path: path,
|
|
8
|
+
server: api_server,
|
|
9
|
+
).post(body: body, event_type: :warn)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -9,6 +9,7 @@ require "procon_bypass_man/background/jobs/report_reload_config_job"
|
|
|
9
9
|
require "procon_bypass_man/background/jobs/report_error_reload_config_job"
|
|
10
10
|
require "procon_bypass_man/background/jobs/report_load_config_job"
|
|
11
11
|
require "procon_bypass_man/background/jobs/report_error_job"
|
|
12
|
+
require "procon_bypass_man/background/jobs/report_warning_job"
|
|
12
13
|
require "procon_bypass_man/background/jobs/report_completed_upgrade_pbm_job"
|
|
13
14
|
require "procon_bypass_man/background/jobs/report_procon_performance_measurements_job"
|
|
14
15
|
require "procon_bypass_man/background/jobs/sync_device_stats_job"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require "procon_bypass_man/buttons_setting_configuration/param_normalizer"
|
|
2
|
+
require "procon_bypass_man/buttons_setting_configuration/metadata_loader"
|
|
2
3
|
|
|
3
4
|
module ProconBypassMan
|
|
4
5
|
class ButtonsSettingConfiguration
|
|
@@ -9,6 +10,11 @@ module ProconBypassMan
|
|
|
9
10
|
def self.load(setting_path: )
|
|
10
11
|
ProconBypassMan::ButtonsSettingConfiguration.instance.setting_path = setting_path
|
|
11
12
|
|
|
13
|
+
metadata_loader = ProconBypassMan::ButtonsSettingConfiguration::MetadataLoader.load(setting_path: setting_path)
|
|
14
|
+
if(Gem::Version.new(metadata_loader.required_pbm_version) >= Gem::Version.new(ProconBypassMan::VERSION))
|
|
15
|
+
ProconBypassMan::SendErrorCommand.execute(error: '起動中のPBMが設定ファイルのバージョンを満たしていません。設定ファイルが意図した通り動かない可能性があります。PBMのバージョンをあげてください。')
|
|
16
|
+
end
|
|
17
|
+
|
|
12
18
|
ProconBypassMan::ButtonsSettingConfiguration.switch_new_context(:validation) do |new_instance|
|
|
13
19
|
yaml = YAML.load_file(setting_path) or raise "読み込みに失敗しました"
|
|
14
20
|
new_instance.instance_eval(yaml["setting"])
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module ProconBypassMan
|
|
2
|
+
class ButtonsSettingConfiguration
|
|
3
|
+
class MetadataLoader
|
|
4
|
+
EMPTY_VERSION = '0.0.0'
|
|
5
|
+
|
|
6
|
+
# @param [String] setting_path
|
|
7
|
+
# @return [MetadataLoader]
|
|
8
|
+
def self.load(setting_path: )
|
|
9
|
+
self.new(setting_path)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# @param [String] setting_path
|
|
13
|
+
def initialize(setting_path)
|
|
14
|
+
content = File.read(setting_path)
|
|
15
|
+
if(matched = content.match(/metadata-required_pbm_version: ([\d.]+)/))
|
|
16
|
+
@required_pbm_version = matched[1]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @return [String]
|
|
21
|
+
def required_pbm_version
|
|
22
|
+
return EMPTY_VERSION unless defined?(@required_pbm_version)
|
|
23
|
+
return @required_pbm_version if @required_pbm_version
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -12,7 +12,7 @@ module ProconBypassMan
|
|
|
12
12
|
def valid?
|
|
13
13
|
@errors = Hash.new {|h,k| h[k] = [] }
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
warn_blank_prefix_keys
|
|
16
16
|
validate_config_of_button_lonely
|
|
17
17
|
validate_verify_button_existence
|
|
18
18
|
validate_flip_and_remap_are_hate_each_other
|
|
@@ -56,10 +56,10 @@ module ProconBypassMan
|
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
# @return [void]
|
|
60
|
+
def warn_blank_prefix_keys
|
|
60
61
|
if @prefix_keys.empty?
|
|
61
|
-
|
|
62
|
-
@errors[:prefix_keys] << "prefix_keys_for_changing_layerに値が入っていません。"
|
|
62
|
+
ProconBypassMan.logger.warn "prefix_keys_for_changing_layerに値が入っていません。"
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
# 子プロセスで実行する
|
|
1
2
|
class ProconBypassMan::BypassCommand
|
|
2
|
-
include ProconBypassMan::SignalHandler
|
|
3
|
-
|
|
4
3
|
module WILL_TERMINATE_TOKEN
|
|
5
4
|
TERMINATE = :terminate
|
|
6
5
|
RESTART = :restart
|
|
@@ -25,7 +24,7 @@ class ProconBypassMan::BypassCommand
|
|
|
25
24
|
|
|
26
25
|
# gadget => procon
|
|
27
26
|
# 遅くていい
|
|
28
|
-
ProconBypassMan.logger.info "Thread1を起動します"
|
|
27
|
+
ProconBypassMan.logger.info "[BYPASS] Thread1を起動します"
|
|
29
28
|
|
|
30
29
|
cycle_sleep = ProconBypassMan::CycleSleep.new(cycle_interval: 1, execution_cycle: ProconBypassMan.config.bypass_mode.gadget_to_procon_interval)
|
|
31
30
|
|
|
@@ -46,14 +45,14 @@ class ProconBypassMan::BypassCommand
|
|
|
46
45
|
Process.kill "TERM", Process.ppid
|
|
47
46
|
end
|
|
48
47
|
|
|
49
|
-
ProconBypassMan.logger.info "Thread1を終了します"
|
|
48
|
+
ProconBypassMan.logger.info "[BYPASS] Thread1を終了します"
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
# procon => gadget
|
|
53
52
|
# シビア
|
|
54
53
|
t2 = Thread.new do
|
|
55
54
|
bypass = ProconBypassMan::Bypass::ProconToSwitch.new(gadget: @gadget, procon: @procon)
|
|
56
|
-
process = BlueGreenProcess.new(worker_instance: bypass, max_work:
|
|
55
|
+
process = BlueGreenProcess.new(worker_instance: bypass, max_work: 1000)
|
|
57
56
|
loop do
|
|
58
57
|
if $will_terminate_token
|
|
59
58
|
if $will_terminate_token == WILL_TERMINATE_TOKEN::TERMINATE
|
|
@@ -66,8 +65,8 @@ class ProconBypassMan::BypassCommand
|
|
|
66
65
|
process.work
|
|
67
66
|
|
|
68
67
|
process_switching_time_before_work = BlueGreenProcess.performance.process_switching_time_before_work
|
|
69
|
-
if process_switching_time_before_work > 0.
|
|
70
|
-
ProconBypassMan.
|
|
68
|
+
if process_switching_time_before_work > 0.2
|
|
69
|
+
ProconBypassMan::SendWarningCommand.execute(warning: "[PERFORMANCE] BlueGreenProcess.performance.process_switching_time_before_work: #{process_switching_time_before_work}", stdout: false)
|
|
71
70
|
end
|
|
72
71
|
|
|
73
72
|
rescue EOFError => e
|
|
@@ -81,25 +80,49 @@ class ProconBypassMan::BypassCommand
|
|
|
81
80
|
process.shutdown
|
|
82
81
|
break
|
|
83
82
|
end
|
|
83
|
+
|
|
84
|
+
ProconBypassMan.logger.info "[BYPASS] Thread2を終了します"
|
|
84
85
|
end
|
|
85
86
|
|
|
86
|
-
ProconBypassMan.logger.info "
|
|
87
|
+
ProconBypassMan.logger.info "BYPASSプロセスでgraceful shutdownの準備ができました"
|
|
87
88
|
begin
|
|
89
|
+
# TODO: 本当はいらないんだけど、なぜか反映されないのでここでも設定する
|
|
90
|
+
BlueGreenProcess.config.logger = ProconBypassMan.logger
|
|
91
|
+
|
|
88
92
|
while(readable_io = IO.select([self_read]))
|
|
89
93
|
signal = readable_io.first[0].gets.strip
|
|
90
|
-
|
|
94
|
+
case signal
|
|
95
|
+
when 'USR2'
|
|
96
|
+
ProconBypassMan.logger.debug "[BYPASS] BYPASSプロセスでUSR2シグナルを受け取りました"
|
|
97
|
+
raise ProconBypassMan::InterruptForRestart
|
|
98
|
+
when 'TERM'
|
|
99
|
+
ProconBypassMan.logger.debug "[BYPASS] BYPASSプロセスでTERMシグナルを受け取りました"
|
|
100
|
+
raise Interrupt
|
|
101
|
+
when 'INT'
|
|
102
|
+
ProconBypassMan.logger.debug "[BYPASS] BYPASSプロセスでINTシグナルを無視します"
|
|
103
|
+
end
|
|
91
104
|
end
|
|
92
105
|
rescue ProconBypassMan::InterruptForRestart
|
|
106
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセスの終了処理を開始します"
|
|
93
107
|
$will_terminate_token = WILL_TERMINATE_TOKEN::RESTART
|
|
108
|
+
BlueGreenProcess.terminate_workers_immediately
|
|
94
109
|
[t1, t2].each(&:join)
|
|
110
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセス内のThreadsが停止しました"
|
|
95
111
|
@gadget&.close
|
|
96
112
|
@procon&.close
|
|
113
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセスを終了します"
|
|
114
|
+
DRb.stop_service if defined?(DRb)
|
|
97
115
|
exit! 1 # child processなのでexitしていい
|
|
98
116
|
rescue Interrupt
|
|
117
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセスの終了処理を開始します"
|
|
99
118
|
$will_terminate_token = WILL_TERMINATE_TOKEN::TERMINATE
|
|
119
|
+
BlueGreenProcess.terminate_workers_immediately
|
|
100
120
|
[t1, t2].each(&:join)
|
|
121
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセス内のThreadsが停止しました"
|
|
101
122
|
@gadget&.close
|
|
102
123
|
@procon&.close
|
|
124
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセスを終了します"
|
|
125
|
+
DRb.stop_service if defined?(DRb)
|
|
103
126
|
exit! 1 # child processなのでexitしていい
|
|
104
127
|
end
|
|
105
128
|
end
|
|
@@ -29,18 +29,18 @@ class ProconBypassMan::Bypass::ProconToSwitch
|
|
|
29
29
|
self.bypass_value = ProconBypassMan::Bypass::BypassValue.new(nil)
|
|
30
30
|
|
|
31
31
|
next(run_callbacks(:work) {
|
|
32
|
-
next(false) if
|
|
32
|
+
next(false) if will_terminate?
|
|
33
33
|
|
|
34
34
|
raw_output = nil
|
|
35
35
|
measurement.record_read_time do
|
|
36
36
|
begin
|
|
37
|
-
return(false) if
|
|
37
|
+
return(false) if will_terminate?
|
|
38
38
|
raw_output = self.procon.read_nonblock(64)
|
|
39
39
|
rescue IO::EAGAINWaitReadable
|
|
40
40
|
sleep(0.002)
|
|
41
41
|
retry
|
|
42
42
|
rescue Errno::EIO, Errno::ENODEV, Errno::EPROTO, IOError, Errno::ESHUTDOWN, Errno::ETIMEDOUT => e
|
|
43
|
-
return(false) if
|
|
43
|
+
return(false) if will_terminate?
|
|
44
44
|
raise
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ class ProconBypassMan::Bypass::ProconToSwitch
|
|
|
52
52
|
ProconBypassMan::Retryable.retryable(tries: 5, on_no_retry: [Errno::EIO, Errno::ENODEV, Errno::EPROTO, IOError, Errno::ESHUTDOWN, Errno::ETIMEDOUT]) do
|
|
53
53
|
begin
|
|
54
54
|
# 終了処理を希望されているのでブロックを無視してメソッドを抜けてOK
|
|
55
|
-
return(false) if
|
|
55
|
+
return(false) if will_terminate? # rubocop:disable Lint/NoReturnInBeginEndBlocks
|
|
56
56
|
binary = ::ProconBypassMan::Procon::Rumbler.monitor do
|
|
57
57
|
ProconBypassMan::Processor.new(bypass_value.binary).process
|
|
58
58
|
end
|
|
@@ -69,11 +69,11 @@ class ProconBypassMan::Bypass::ProconToSwitch
|
|
|
69
69
|
|
|
70
70
|
next(true)
|
|
71
71
|
rescue IO::EAGAINWaitReadable
|
|
72
|
-
return(false) if
|
|
72
|
+
return(false) if will_terminate? # rubocop:disable Lint/NoReturnInBeginEndBlocks
|
|
73
73
|
measurement.record_write_error
|
|
74
74
|
raise CouldNotWriteToSwitchError
|
|
75
75
|
rescue Errno::EIO, Errno::ENODEV, Errno::EPROTO, IOError, Errno::ESHUTDOWN, Errno::ETIMEDOUT => e
|
|
76
|
-
return(false) if
|
|
76
|
+
return(false) if will_terminate? # rubocop:disable Lint/NoReturnInBeginEndBlocks
|
|
77
77
|
raise
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -89,7 +89,7 @@ class ProconBypassMan::Bypass::ProconToSwitch
|
|
|
89
89
|
|
|
90
90
|
# @return [void]
|
|
91
91
|
def direct_connect_switch_via_bluetooth
|
|
92
|
-
ProconBypassMan.logger.debug { "
|
|
92
|
+
ProconBypassMan.logger.debug { "[BYPASS] プロコンとSwitchを無線接続へ切り替えます" }
|
|
93
93
|
self.procon.write_nonblock(["010500000000000000003800"].pack("H*")) # home led off
|
|
94
94
|
self.procon.write_nonblock(["010600000000000000003800"].pack("H*")) # home led off
|
|
95
95
|
self.procon.write_nonblock(["010700000000000000003800"].pack("H*")) # home led off
|
|
@@ -107,4 +107,9 @@ class ProconBypassMan::Bypass::ProconToSwitch
|
|
|
107
107
|
|
|
108
108
|
ProconBypassMan.logger.debug { "<<< #{bypass_value.to_text}" }
|
|
109
109
|
end
|
|
110
|
+
|
|
111
|
+
# @return [Boolean]
|
|
112
|
+
def will_terminate?
|
|
113
|
+
$will_terminate_token
|
|
114
|
+
end
|
|
110
115
|
end
|
|
@@ -58,9 +58,9 @@ class ProconBypassMan::Bypass::SwitchToProcon
|
|
|
58
58
|
if ProconBypassMan.config.verbose_bypass_log
|
|
59
59
|
ProconBypassMan.logger.debug { ">>> #{bypass_value.to_text}" }
|
|
60
60
|
else
|
|
61
|
-
ProconBypassMan.cache.fetch key: 'bypass_log', expires_in: 1 do
|
|
62
|
-
|
|
63
|
-
end
|
|
61
|
+
# ProconBypassMan.cache.fetch key: 'bypass_log', expires_in: 1 do
|
|
62
|
+
# ProconBypassMan.logger.debug { ">>> #{bypass_value.to_text}" }
|
|
63
|
+
# end
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class ProconBypassMan::SendWarningCommand
|
|
2
|
+
# @param [String, Hash, Exception] warning
|
|
3
|
+
# @return [void]
|
|
4
|
+
def self.execute(warning: , stdout: true)
|
|
5
|
+
body =
|
|
6
|
+
case warning
|
|
7
|
+
when String, Hash
|
|
8
|
+
warning
|
|
9
|
+
else
|
|
10
|
+
warning.full_message
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
ProconBypassMan.logger.warn body
|
|
14
|
+
puts body if stdout
|
|
15
|
+
|
|
16
|
+
ProconBypassMan::ReportWarningJob.perform(warning)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -4,3 +4,4 @@ require "procon_bypass_man/commands/write_session_id_command"
|
|
|
4
4
|
require "procon_bypass_man/commands/write_device_id_command"
|
|
5
5
|
require "procon_bypass_man/commands/send_reload_config_event_command"
|
|
6
6
|
require "procon_bypass_man/commands/send_error_command"
|
|
7
|
+
require "procon_bypass_man/commands/send_warning_command"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module ProconBypassMan
|
|
2
|
+
module Plugin
|
|
3
|
+
module Splatoon3
|
|
4
|
+
module Macro
|
|
5
|
+
module RotationLeftStick
|
|
6
|
+
def self.display_name
|
|
7
|
+
:rotation_left_stick
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def self.steps
|
|
11
|
+
[:rotation_left_stick]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.description
|
|
15
|
+
'左スティックを1回転します'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -18,6 +18,7 @@ require_relative "plugin/splatoon3/macro/sokuwari_for_splash_bomb"
|
|
|
18
18
|
require_relative "plugin/splatoon3/macro/forward_ikarole"
|
|
19
19
|
require_relative "plugin/splatoon3/macro/charge_tansan_bomb"
|
|
20
20
|
require_relative "plugin/splatoon3/macro/dasei_cancel"
|
|
21
|
+
require_relative "plugin/splatoon3/macro/rotation_left_stick"
|
|
21
22
|
require_relative "plugin/splatoon3/mode/guruguru"
|
|
22
23
|
|
|
23
24
|
module ProconBypassMan
|
|
@@ -95,7 +95,7 @@ class ProconBypassMan::Procon::MacroBuilder
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# NOTE: マクロ構文で生成したいけど、スティックとボタン同時押しの構文が思いつかないので、ハードコードする
|
|
98
|
-
if
|
|
98
|
+
if /^forward_ikarole1/ =~ step
|
|
99
99
|
# NOTE: 0degはx: 1, y: 0, 90degはx: 0, y: 1, 180degはx: -1, y: 0.
|
|
100
100
|
# NOTE: スティックを前方に倒している状態で270度回転させる
|
|
101
101
|
for_forward_ikarole_steps = [
|
|
@@ -105,6 +105,11 @@ class ProconBypassMan::Procon::MacroBuilder
|
|
|
105
105
|
return { steps: for_forward_ikarole_steps }
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
if /^rotation_left_stick/ =~ step
|
|
109
|
+
roll_left_stick_steps = 0.step(359, 17).map { |x| ["tilt_left_stick_completely_to_#{x}deg".to_sym] }
|
|
110
|
+
return { steps: roll_left_stick_steps }
|
|
111
|
+
end
|
|
112
|
+
|
|
108
113
|
if %r!^(pressing_|toggle_|shake_left_stick_)! =~ step && (subjects = step.scan(%r!pressing_[^_]+|shake_left_stick|toggle_[^_]+!)) && (match = step.match(%r!_for_([\d_]+)(sec)?\z!))
|
|
109
114
|
if sec = match[1]
|
|
110
115
|
return {
|
|
@@ -9,6 +9,7 @@ module ProconBypassMan
|
|
|
9
9
|
Pbmenv.uninstall(pbm_version) # 途中でシャットダウンしてしまった、とか状態が途中の状態かもしれないので一旦消す
|
|
10
10
|
Pbmenv.install(pbm_version, enable_pbm_cloud: true)
|
|
11
11
|
Pbmenv.use(pbm_version)
|
|
12
|
+
Pbmenv.clean(10)
|
|
12
13
|
ProconBypassMan.logger.info "#{pbm_version}へアップグレードしました"
|
|
13
14
|
ProconBypassMan::ReportCompletedUpgradePbmJob.perform
|
|
14
15
|
`reboot` # symlinkの参照先が変わるのでrebootする必要がある
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
# フォアグラウンドで実行する
|
|
1
2
|
class ProconBypassMan::Runner
|
|
2
|
-
include ProconBypassMan::SignalHandler
|
|
3
|
-
|
|
4
3
|
def initialize(gadget: , procon: )
|
|
5
4
|
@gadget = gadget
|
|
6
5
|
@procon = procon
|
|
@@ -20,8 +19,9 @@ class ProconBypassMan::Runner
|
|
|
20
19
|
|
|
21
20
|
loop do
|
|
22
21
|
child_pid = Kernel.fork do
|
|
22
|
+
ProconBypassMan.logger.info "[BYPASS] BYPASSプロセスを起動します"
|
|
23
23
|
$will_terminate_token = false
|
|
24
|
-
ProconBypassMan.
|
|
24
|
+
ProconBypassMan.run_on_after_fork_of_bypass_process
|
|
25
25
|
ProconBypassMan::BypassCommand.new(gadget: @gadget, procon: @procon).execute # ここでblockingする
|
|
26
26
|
next
|
|
27
27
|
end
|
|
@@ -30,7 +30,13 @@ class ProconBypassMan::Runner
|
|
|
30
30
|
# TODO 子プロセスが消滅した時に、メインプロセスは生き続けてしまい、何もできなくなる問題がある
|
|
31
31
|
while(readable_io = IO.select([self_read]))
|
|
32
32
|
signal = readable_io.first[0].gets.strip
|
|
33
|
-
|
|
33
|
+
ProconBypassMan.logger.debug "[BYPASS] MASTERプロセスで#{signal}シグナルを受け取りました"
|
|
34
|
+
case signal
|
|
35
|
+
when 'USR2'
|
|
36
|
+
raise ProconBypassMan::InterruptForRestart
|
|
37
|
+
when 'INT', 'TERM'
|
|
38
|
+
raise Interrupt
|
|
39
|
+
end
|
|
34
40
|
end
|
|
35
41
|
rescue ProconBypassMan::InterruptForRestart
|
|
36
42
|
ProconBypassMan::PrintMessageCommand.execute(text: "設定ファイルの再読み込みを開始します")
|
|
@@ -40,17 +46,20 @@ class ProconBypassMan::Runner
|
|
|
40
46
|
ProconBypassMan::ButtonsSettingConfiguration::Loader.reload_setting
|
|
41
47
|
ProconBypassMan::SendReloadConfigEventCommand.execute
|
|
42
48
|
rescue ProconBypassMan::CouldNotLoadConfigError => error
|
|
43
|
-
ProconBypassMan::SendErrorCommand.execute(error: "設定ファイルが不正です。再読み込みができませんでした")
|
|
49
|
+
ProconBypassMan::SendErrorCommand.execute(error: "[MASTER] 設定ファイルが不正です。再読み込みができませんでした")
|
|
44
50
|
ProconBypassMan::ReportErrorReloadConfigJob.perform_async(error.message)
|
|
45
51
|
end
|
|
46
|
-
ProconBypassMan::PrintMessageCommand.execute(text: "バイパス処理を再開します")
|
|
52
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "[MASTER] バイパス処理を再開します")
|
|
47
53
|
rescue Interrupt
|
|
48
54
|
puts
|
|
49
|
-
ProconBypassMan::PrintMessageCommand.execute(text: "
|
|
55
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "[MASTER] BYPASSプロセスにTERMシグナルを送信します")
|
|
50
56
|
Process.kill("TERM", child_pid)
|
|
57
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "[MASTER] BYPASSプロセスの終了を待ちます")
|
|
51
58
|
Process.wait
|
|
52
59
|
break
|
|
53
60
|
end
|
|
54
61
|
end
|
|
62
|
+
|
|
63
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "[MASTER] メインプロセスを終了します")
|
|
55
64
|
end
|
|
56
65
|
end
|
data/lib/procon_bypass_man.rb
CHANGED
|
@@ -20,7 +20,6 @@ require_relative "procon_bypass_man/device_connection"
|
|
|
20
20
|
require_relative "procon_bypass_man/support/usb_device_controller"
|
|
21
21
|
require_relative "procon_bypass_man/support/device_procon_finder"
|
|
22
22
|
require_relative "procon_bypass_man/support/device_mouse_finder"
|
|
23
|
-
require_relative "procon_bypass_man/support/signal_handler"
|
|
24
23
|
require_relative "procon_bypass_man/support/callbacks"
|
|
25
24
|
require_relative "procon_bypass_man/support/yaml_loader"
|
|
26
25
|
require_relative "procon_bypass_man/support/yaml_writer"
|
|
@@ -39,7 +38,6 @@ require_relative "procon_bypass_man/support/analog_stick_hypotenuse_tilting_powe
|
|
|
39
38
|
require_relative "procon_bypass_man/support/never_exit_accidentally"
|
|
40
39
|
require_relative "procon_bypass_man/support/cycle_sleep"
|
|
41
40
|
require_relative "procon_bypass_man/support/can_over_process"
|
|
42
|
-
require_relative "procon_bypass_man/support/gc"
|
|
43
41
|
require_relative "procon_bypass_man/support/retryable"
|
|
44
42
|
require_relative "procon_bypass_man/support/renice_command"
|
|
45
43
|
require_relative "procon_bypass_man/procon_display"
|
|
@@ -182,14 +180,16 @@ module ProconBypassMan
|
|
|
182
180
|
end
|
|
183
181
|
|
|
184
182
|
# @return [void]
|
|
185
|
-
def self.
|
|
183
|
+
def self.run_on_after_fork_of_bypass_process
|
|
186
184
|
ProconBypassMan::ReniceCommand.change_priority(to: :high, pid: $$)
|
|
187
185
|
::GC.start
|
|
188
|
-
|
|
189
|
-
# GC対策することによって一時的に削除した機能
|
|
186
|
+
# GC対策することによって一時的に削除した機能. 後で有効にしたい
|
|
190
187
|
# ProconBypassMan::ProconDisplay::Server.start!
|
|
191
|
-
|
|
192
188
|
DRb.start_service if defined?(DRb)
|
|
189
|
+
|
|
190
|
+
# for libs setting
|
|
191
|
+
BlueGreenProcess.config.logger = ProconBypassMan.logger
|
|
192
|
+
|
|
193
193
|
BlueGreenProcess.configure do |config|
|
|
194
194
|
config.after_fork = -> {
|
|
195
195
|
DRb.start_service if defined?(DRb)
|
data/procon_bypass_man.gemspec
CHANGED
|
@@ -28,11 +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.
|
|
31
|
+
spec.add_dependency "pbmenv", ">= 0.1.11" # enable_pbm_cloud連携機能でPbmenv.install, .cleanを使っている.
|
|
32
32
|
spec.add_dependency "action_cable_client"
|
|
33
33
|
spec.add_dependency "sorted_set"
|
|
34
|
-
spec.add_dependency "blue_green_process"
|
|
35
|
-
# spec.add_dependency "blue_green_process"
|
|
34
|
+
spec.add_dependency "blue_green_process", '0.1.4.2'
|
|
36
35
|
|
|
37
36
|
# For more information and examples about making a new gem, checkout our
|
|
38
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.5'
|
|
16
16
|
end
|
|
17
17
|
rescue Bundler::Source::Git::GitCommandError => e
|
|
18
18
|
retry_count_on_git_command_error = retry_count_on_git_command_error + 1
|
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.5'
|
|
16
16
|
end
|
|
17
17
|
rescue Bundler::Source::Git::GitCommandError => e
|
|
18
18
|
retry_count_on_git_command_error = retry_count_on_git_command_error + 1
|
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.3.
|
|
4
|
+
version: 0.3.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jiikko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-02-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pbmenv
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.1.
|
|
19
|
+
version: 0.1.11
|
|
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.1.
|
|
26
|
+
version: 0.1.11
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: action_cable_client
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -56,16 +56,16 @@ dependencies:
|
|
|
56
56
|
name: blue_green_process
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - '='
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 0.1.4.2
|
|
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:
|
|
68
|
+
version: 0.1.4.2
|
|
69
69
|
description: A programmable converter for Nintendo Switch Pro Controller
|
|
70
70
|
email:
|
|
71
71
|
- n905i.1214@gmail.com
|
|
@@ -88,6 +88,8 @@ files:
|
|
|
88
88
|
- README.md
|
|
89
89
|
- Rakefile
|
|
90
90
|
- Steepfile
|
|
91
|
+
- benchmarks/README.md
|
|
92
|
+
- benchmarks/bypass.rb
|
|
91
93
|
- bin/console
|
|
92
94
|
- bin/dev_api_server.rb
|
|
93
95
|
- bin/generate_default_app
|
|
@@ -104,6 +106,7 @@ files:
|
|
|
104
106
|
- docs/setting/splatoon3_macro_dasei_cancel.md
|
|
105
107
|
- docs/setting/splatoon3_macro_forward_ikarole.md
|
|
106
108
|
- docs/setting/splatoon3_recommended_setting.md
|
|
109
|
+
- docs/setting/splatoon3_rotation_left_stick.md
|
|
107
110
|
- docs/setup_raspi.md
|
|
108
111
|
- docs/setup_raspi.mitamae.rb
|
|
109
112
|
- docs/setup_raspi_by_mitamae.md
|
|
@@ -126,10 +129,12 @@ files:
|
|
|
126
129
|
- lib/procon_bypass_man/background/jobs/report_procon_performance_measurements_job.rb
|
|
127
130
|
- lib/procon_bypass_man/background/jobs/report_reload_config_job.rb
|
|
128
131
|
- lib/procon_bypass_man/background/jobs/report_start_reboot_job.rb
|
|
132
|
+
- lib/procon_bypass_man/background/jobs/report_warning_job.rb
|
|
129
133
|
- lib/procon_bypass_man/background/jobs/sync_device_stats_job.rb
|
|
130
134
|
- lib/procon_bypass_man/buttons_setting_configuration.rb
|
|
131
135
|
- lib/procon_bypass_man/buttons_setting_configuration/layer.rb
|
|
132
136
|
- lib/procon_bypass_man/buttons_setting_configuration/loader.rb
|
|
137
|
+
- lib/procon_bypass_man/buttons_setting_configuration/metadata_loader.rb
|
|
133
138
|
- lib/procon_bypass_man/buttons_setting_configuration/param_normalizer.rb
|
|
134
139
|
- lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button.rb
|
|
135
140
|
- lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button_list.rb
|
|
@@ -150,6 +155,7 @@ files:
|
|
|
150
155
|
- lib/procon_bypass_man/commands/print_message_command.rb
|
|
151
156
|
- lib/procon_bypass_man/commands/send_error_command.rb
|
|
152
157
|
- lib/procon_bypass_man/commands/send_reload_config_event_command.rb
|
|
158
|
+
- lib/procon_bypass_man/commands/send_warning_command.rb
|
|
153
159
|
- lib/procon_bypass_man/commands/write_device_id_command.rb
|
|
154
160
|
- lib/procon_bypass_man/commands/write_session_id_command.rb
|
|
155
161
|
- lib/procon_bypass_man/configuration.rb
|
|
@@ -183,6 +189,7 @@ files:
|
|
|
183
189
|
- lib/procon_bypass_man/plugin/splatoon3/macro/jump_to_left_key.rb
|
|
184
190
|
- lib/procon_bypass_man/plugin/splatoon3/macro/jump_to_right_key.rb
|
|
185
191
|
- lib/procon_bypass_man/plugin/splatoon3/macro/jump_to_up_key.rb
|
|
192
|
+
- lib/procon_bypass_man/plugin/splatoon3/macro/rotation_left_stick.rb
|
|
186
193
|
- lib/procon_bypass_man/plugin/splatoon3/macro/sokuwari_for_splash_bomb.rb
|
|
187
194
|
- lib/procon_bypass_man/plugin/splatoon3/mode/guruguru.rb
|
|
188
195
|
- lib/procon_bypass_man/plugin/splatoon3/version.rb
|
|
@@ -256,7 +263,6 @@ files:
|
|
|
256
263
|
- lib/procon_bypass_man/support/cycle_sleep.rb
|
|
257
264
|
- lib/procon_bypass_man/support/device_mouse_finder.rb
|
|
258
265
|
- lib/procon_bypass_man/support/device_procon_finder.rb
|
|
259
|
-
- lib/procon_bypass_man/support/gc.rb
|
|
260
266
|
- lib/procon_bypass_man/support/http_client.rb
|
|
261
267
|
- lib/procon_bypass_man/support/load_agv.rb
|
|
262
268
|
- lib/procon_bypass_man/support/never_exit_accidentally.rb
|
|
@@ -268,7 +274,6 @@ files:
|
|
|
268
274
|
- lib/procon_bypass_man/support/retryable.rb
|
|
269
275
|
- lib/procon_bypass_man/support/safe_timeout.rb
|
|
270
276
|
- lib/procon_bypass_man/support/send_device_stats_http_client.rb
|
|
271
|
-
- lib/procon_bypass_man/support/signal_handler.rb
|
|
272
277
|
- lib/procon_bypass_man/support/update_remote_pbm_action_status_http_client.rb
|
|
273
278
|
- lib/procon_bypass_man/support/uptime.rb
|
|
274
279
|
- lib/procon_bypass_man/support/usb_device_controller.rb
|