procon_bypass_man 0.1.6 → 0.1.10

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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +41 -16
  3. data/.github/workflows/ruby.yml +34 -0
  4. data/.gitignore +4 -0
  5. data/.rubocop.yml +2 -0
  6. data/.ruby-version +1 -1
  7. data/CHANGELOG.md +17 -0
  8. data/Gemfile +4 -0
  9. data/Gemfile.lock +57 -6
  10. data/README.md +18 -10
  11. data/Rakefile +10 -1
  12. data/Steepfile +39 -0
  13. data/bin/report_receive_server.rb +11 -0
  14. data/docs/setup_raspi.md +12 -7
  15. data/docs/setup_raspi.mitamae.rb +60 -0
  16. data/docs/setup_raspi_by_mitamae.md +14 -0
  17. data/lib/procon_bypass_man/analog_stick_position.rb +8 -0
  18. data/lib/procon_bypass_man/boot_message.rb +40 -0
  19. data/lib/procon_bypass_man/buttons_setting_configuration.rb +100 -0
  20. data/lib/procon_bypass_man/bypass/usb_hid_logger.rb +20 -0
  21. data/lib/procon_bypass_man/bypass.rb +61 -29
  22. data/lib/procon_bypass_man/callbacks.rb +70 -0
  23. data/lib/procon_bypass_man/configuration/layer.rb +50 -4
  24. data/lib/procon_bypass_man/configuration/loader.rb +8 -8
  25. data/lib/procon_bypass_man/configuration/validator.rb +1 -1
  26. data/lib/procon_bypass_man/configuration.rb +68 -64
  27. data/lib/procon_bypass_man/device_connector.rb +13 -30
  28. data/lib/procon_bypass_man/io_monitor.rb +7 -4
  29. data/lib/procon_bypass_man/on_memory_cache.rb +34 -0
  30. data/lib/procon_bypass_man/outbound/base.rb +40 -0
  31. data/lib/procon_bypass_man/outbound/error_reporter.rb +13 -0
  32. data/lib/procon_bypass_man/outbound/reporter.rb +12 -0
  33. data/lib/procon_bypass_man/outbound/usb_hid_data_reporter.rb +13 -0
  34. data/lib/procon_bypass_man/procon/analog_stick_cap.rb +88 -0
  35. data/lib/procon_bypass_man/procon/button_collection.rb +14 -6
  36. data/lib/procon_bypass_man/procon/debug_dumper.rb +17 -0
  37. data/lib/procon_bypass_man/procon/layer_changeable.rb +2 -2
  38. data/lib/procon_bypass_man/procon/macro_registry.rb +2 -2
  39. data/lib/procon_bypass_man/procon/mode_registry.rb +4 -4
  40. data/lib/procon_bypass_man/procon/press_button_aware.rb +13 -0
  41. data/lib/procon_bypass_man/procon/pressed_button_helper.rb +0 -10
  42. data/lib/procon_bypass_man/procon/user_operation.rb +14 -3
  43. data/lib/procon_bypass_man/procon.rb +23 -5
  44. data/lib/procon_bypass_man/runner.rb +36 -48
  45. data/lib/procon_bypass_man/uptime.rb +15 -0
  46. data/lib/procon_bypass_man/version.rb +1 -1
  47. data/lib/procon_bypass_man.rb +26 -33
  48. data/project_template/README.md +17 -0
  49. data/project_template/app.rb +20 -0
  50. data/project_template/setting.yml +35 -0
  51. data/project_template/systemd_units/pbm.service +13 -0
  52. data/project_template/systemd_units/pbm_web.service +11 -0
  53. data/project_template/web.rb +16 -0
  54. data/sig/README.rb +4 -0
  55. data/sig/main.rbs +507 -0
  56. metadata +30 -5
  57. data/examples/pbm.service +0 -27
  58. data/examples/simple.rb +0 -13
data/sig/main.rbs ADDED
@@ -0,0 +1,507 @@
1
+ interface _Symolize
2
+ def to_sym: () -> ::Symbol
3
+ end
4
+
5
+ interface _Pluginable
6
+ def name: () -> _Symolize
7
+ def respond_to?: (::Symbol) -> bool
8
+ end
9
+
10
+ module ProconBypassMan
11
+ class ProConRejected < StandardError
12
+ end
13
+
14
+ class CouldNotLoadConfigError < StandardError
15
+ end
16
+
17
+ class FirstConnectionError < StandardError
18
+ end
19
+
20
+ class EternalConnectionError < StandardError
21
+ end
22
+
23
+ def self.configure: (?setting_path: untyped? setting_path) { () -> untyped } -> untyped
24
+
25
+ def self.run: (?setting_path: untyped? setting_path) { () -> untyped } -> untyped
26
+
27
+ def self.logger=: (untyped logger) -> untyped
28
+
29
+ # @return [Logger]
30
+ def self.logger: () -> untyped
31
+
32
+ def self.pid_path: () -> untyped
33
+
34
+ def self.reset!: () -> untyped
35
+
36
+ def self.root: () -> untyped
37
+
38
+ def self.root=: (untyped path) -> untyped
39
+
40
+ def self.digest_path: () -> ::String
41
+ end
42
+
43
+ class ProconBypassMan::Bypass
44
+ attr_accessor gadget: untyped
45
+
46
+ attr_accessor procon: untyped
47
+
48
+ attr_accessor monitor: untyped
49
+
50
+ def initialize: (gadget: untyped gadget, procon: untyped procon, monitor: untyped monitor) -> untyped
51
+
52
+ # ゆっくりでいい
53
+ def send_gadget_to_procon!: () -> (nil | untyped)
54
+
55
+ def send_procon_to_gadget!: () -> (nil | untyped)
56
+ end
57
+
58
+ class AnalogStickPosition
59
+ attr_accessor x: Integer
60
+ attr_accessor y: Integer
61
+
62
+ def initialize: (x: Integer, y: Integer) -> untyped
63
+ end
64
+
65
+ module ProconBypassMan
66
+ class ButtonsSettingConfiguration
67
+ attr_accessor layers: untyped
68
+
69
+ attr_accessor setting_path: untyped
70
+
71
+ attr_accessor mode_plugins: untyped
72
+
73
+ attr_accessor macro_plugins: untyped
74
+
75
+ attr_accessor context: untyped
76
+
77
+ attr_accessor current_context_key: untyped
78
+
79
+ attr_accessor neutral_position: AnalogStickPosition
80
+
81
+ def self.instance: () -> untyped
82
+
83
+ def self.switch_new_context: (untyped key) { (untyped) -> untyped } -> untyped
84
+
85
+ def initialize: () -> untyped
86
+
87
+ MODES: ::Array[untyped]
88
+
89
+ def layer: (untyped direction, ?mode: (_Pluginable) mode) { () -> untyped } -> untyped
90
+
91
+ def install_mode_plugin: (untyped klass) -> untyped
92
+
93
+ def install_macro_plugin: (untyped klass) -> untyped
94
+
95
+ def prefix_keys_for_changing_layer: (untyped buttons) -> untyped
96
+
97
+ def prefix_keys: () -> untyped
98
+
99
+ def reset!: () -> untyped
100
+ end
101
+ end
102
+
103
+ module ProconBypassMan
104
+ class ButtonsSettingConfiguration
105
+ class Layer
106
+ attr_accessor mode: untyped
107
+
108
+ attr_accessor flips: untyped
109
+
110
+ attr_accessor macros: untyped
111
+
112
+ attr_accessor remaps: untyped
113
+
114
+ def initialize: (?mode: ::Symbol mode) -> untyped
115
+
116
+ # @param [Symbol] button
117
+ def flip: (untyped button, ?if_pressed: bool if_pressed, ?force_neutral: untyped? force_neutral, ?flip_interval: untyped? flip_interval) -> untyped
118
+
119
+ PRESET_MACROS: ::Array[untyped]
120
+
121
+ def macro: (untyped name, if_pressed: untyped if_pressed) -> untyped
122
+
123
+ def remap: (untyped button, to: untyped to) -> untyped
124
+
125
+ # @return [Array]
126
+ def flip_buttons: () -> untyped
127
+
128
+ def instance_eval: ()?{ () -> nil } -> untyped
129
+ end
130
+ end
131
+ end
132
+
133
+ module ProconBypassMan
134
+ class ButtonsSettingConfiguration
135
+ module Loader
136
+ def self.load: (setting_path: untyped setting_path) -> untyped
137
+
138
+ def self.reload_setting: () -> untyped
139
+ end
140
+ end
141
+ end
142
+
143
+ module ProconBypassMan
144
+ class ButtonsSettingConfiguration
145
+ class Validator
146
+ def initialize: (untyped config) -> untyped
147
+
148
+ # @return [Boolean]
149
+ def valid?: () -> untyped
150
+
151
+ # @return [Boolean]
152
+ def invalid?: () -> untyped
153
+
154
+ # @return [Hash]
155
+ def errors: () -> untyped
156
+
157
+ private
158
+
159
+ def validate_config_of_button_lonely: () -> untyped
160
+
161
+ def validate_require_prefix_keys: () -> untyped
162
+
163
+ def validate_verify_button_existence: () -> untyped
164
+
165
+ def validate_flip_and_remap_are_hate_each_other: () -> untyped
166
+ end
167
+ end
168
+ end
169
+
170
+ class ProconBypassMan::Configuration
171
+ module ClassAttributes
172
+ def root: () -> untyped
173
+
174
+ def logger: () -> untyped
175
+
176
+ def error_logger: () -> untyped
177
+
178
+ def pid_path: () -> untyped
179
+
180
+ def digest_path: () -> untyped
181
+
182
+ def cache: () -> untyped
183
+
184
+ def config: () -> untyped
185
+ end
186
+
187
+ attr_reader api_server: untyped
188
+
189
+ attr_accessor enable_critical_error_logging: untyped
190
+
191
+ def root=: (untyped path) -> untyped
192
+
193
+ def root: () -> untyped
194
+
195
+ def api_server=: (untyped api_server) -> untyped
196
+
197
+ def logger=: (untyped logger) -> untyped
198
+
199
+ def logger: () -> untyped
200
+
201
+ def error_logger: () -> untyped
202
+
203
+ def digest_path: () -> ::String
204
+
205
+ # @return [String] pbm-webの接続先
206
+ def internal_api_servers: () -> untyped
207
+ end
208
+
209
+
210
+ class ProconBypassMan::DeviceConnector
211
+ class BytesMismatchError < StandardError
212
+ end
213
+
214
+ class Value
215
+ attr_accessor read_from: untyped
216
+
217
+ attr_accessor values: untyped
218
+
219
+ def initialize: (values: untyped values, read_from: untyped read_from) -> untyped
220
+ end
221
+
222
+ PROCON_PATH: ::String
223
+
224
+ PROCON2_PATH: ::String
225
+
226
+ # 画面で再接続ができたが状況は変わらない
227
+ def self.reset_connection!: () -> untyped
228
+
229
+ def self.connect: () -> ::Array[untyped]
230
+
231
+ def initialize: (?throw_error_if_timeout: bool throw_error_if_timeout, ?throw_error_if_mismatch: bool throw_error_if_mismatch, ?enable_at_exit: bool enable_at_exit) -> untyped
232
+
233
+ def add: (untyped values, read_from: untyped read_from) -> untyped
234
+
235
+ def drain_all: () -> untyped
236
+
237
+ # switchに任意の命令を入力して、switchから読み取る
238
+ def write_switch: (untyped data, ?only_write: bool only_write) -> untyped
239
+
240
+ def write_procon: (untyped data, ?only_write: bool only_write) -> untyped
241
+
242
+ def read_procon: (?only_read: bool only_read) -> untyped
243
+
244
+ def read_switch: (?only_read: bool only_read) -> untyped
245
+
246
+ def from_device: (untyped item) -> untyped
247
+
248
+ # fromの対になる
249
+ def to_device: (untyped item) -> untyped
250
+
251
+ def switch: () -> untyped
252
+
253
+ def procon: () -> untyped
254
+
255
+ def is_available_device?: (untyped path) -> (::FalseClass | ::TrueClass | untyped)
256
+
257
+ def to_bin: (untyped string) -> untyped
258
+
259
+ def init_devices: () -> untyped
260
+ end
261
+
262
+ module ProconBypassMan
263
+ class Counter
264
+ attr_accessor label: untyped
265
+
266
+ attr_accessor table: untyped
267
+
268
+ attr_accessor previous_table: untyped
269
+
270
+ def initialize: (label: untyped label) -> untyped
271
+
272
+ # アクティブなバケットは1つだけ
273
+ def record: (untyped event_name) -> untyped
274
+
275
+ def formated_previous_table: () -> ::String
276
+ end
277
+
278
+ module IOMonitor
279
+ def self.new: (label: untyped label) -> untyped
280
+
281
+ # @return [Array<Counter>]
282
+ def self.targets: () -> untyped
283
+
284
+ # ここで集計する
285
+ def self.start!: () -> untyped
286
+
287
+ def self.reset!: () -> untyped
288
+ end
289
+ end
290
+
291
+ class ProconBypassMan::Processor
292
+ # @return [String] binary
293
+ def initialize: (untyped binary) -> untyped
294
+
295
+ # @return [String] 加工後の入力データ
296
+ def process: () -> untyped
297
+ end
298
+
299
+ class ProconBypassMan::Procon
300
+ attr_accessor user_operation: untyped
301
+
302
+ def self.reset!: () -> untyped
303
+
304
+ def initialize: (untyped binary) -> untyped
305
+
306
+ def status: () -> untyped
307
+
308
+ def ongoing_macro: () -> untyped
309
+
310
+ def ongoing_mode: () -> untyped
311
+
312
+ def current_layer_key: () -> untyped
313
+
314
+ def current_layer: () -> untyped
315
+
316
+ def apply!: () -> (nil | untyped)
317
+
318
+ # @return [String<binary>]
319
+ def to_binary: () -> untyped
320
+
321
+ private
322
+
323
+ def method_missing: (untyped name) -> untyped
324
+ end
325
+
326
+ class ProconBypassMan::Procon::ButtonCollection
327
+ class Button
328
+ attr_accessor byte_position: untyped
329
+
330
+ attr_accessor bit_position: untyped
331
+
332
+ def initialize: (untyped key) -> untyped
333
+ end
334
+
335
+ # ) ZR R SR(right) SL(right) A B X Y
336
+ # ) Grip (none) Cap Home ThumbL ThumbR + -
337
+ # ) ZL L SL(left) SR(left) Left Right Up Down
338
+ # ) analog[0]
339
+ # ) analog[1]
340
+ # ) analog[2]
341
+ # ) analog[3]
342
+ # ) analog[4]
343
+ # ) analog[5]
344
+ BYTES_MAP: untyped
345
+
346
+ BUTTONS_MAP: untyped
347
+
348
+ BUTTONS: untyped
349
+
350
+ def self.load: (untyped button_key) -> untyped
351
+ end
352
+
353
+ class ProconBypassMan::Procon
354
+ module Data
355
+ NO_ACTION: untyped
356
+ end
357
+ end
358
+
359
+ class ProconBypassMan::Procon
360
+ class FlipCache
361
+ def self.fetch: (key: untyped key, expires_in: untyped expires_in) { () -> untyped } -> untyped
362
+
363
+ # for testing
364
+ def self.reset!: () -> untyped
365
+ end
366
+ end
367
+
368
+ module ProconBypassMan::Procon::LayerChangeable
369
+ def next_layer_key: () -> untyped
370
+
371
+ def change_layer?: () -> untyped
372
+
373
+ def pressed_next_layer?: () -> untyped
374
+ end
375
+
376
+ class ProconBypassMan::Procon::MacroRegistry
377
+ class Macro
378
+ attr_accessor name: untyped
379
+
380
+ attr_accessor steps: untyped
381
+
382
+ def initialize: (name: untyped name, steps: untyped steps) -> untyped
383
+
384
+ def next_step: () -> untyped
385
+
386
+ def finished?: () -> untyped
387
+
388
+ def ongoing?: () -> untyped
389
+ end
390
+
391
+ PRESETS: ::Hash[untyped, untyped]
392
+
393
+ def self.install_plugin: (untyped klass) -> untyped
394
+
395
+ def self.load: (untyped name) -> untyped
396
+
397
+ def self.reset!: () -> untyped
398
+
399
+ def self.plugins: () -> untyped
400
+ end
401
+
402
+ class ProconBypassMan::Procon::ModeRegistry
403
+ class Mode
404
+ attr_accessor name: untyped
405
+
406
+ attr_accessor binaries: untyped
407
+
408
+ attr_accessor source_binaries: untyped
409
+
410
+ def initialize: (name: untyped name, binaries: untyped binaries) -> untyped
411
+
412
+ def next_binary: () -> untyped
413
+ end
414
+
415
+ PRESETS: ::Hash[untyped, untyped]
416
+
417
+ def self.install_plugin: (untyped klass) -> untyped
418
+
419
+ def self.load: (untyped name) -> untyped
420
+
421
+ def self.reset!: () -> untyped
422
+
423
+ def self.plugins: () -> untyped
424
+ end
425
+
426
+ module ProconBypassMan::Procon::PushedButtonHelper
427
+ module Static
428
+ def pressed_button?: (untyped button) -> untyped
429
+ end
430
+
431
+ module Dynamic
432
+ def compile_if_not_compile_yet!: () -> untyped
433
+ end
434
+ end
435
+
436
+ class ProconBypassMan::Procon
437
+ class UserOperation
438
+ include LayerChangeable
439
+
440
+ include PushedButtonHelper::Static
441
+
442
+ extend PushedButtonHelper::Dynamic
443
+
444
+ attr_reader binary: untyped
445
+
446
+ def initialize: (untyped binary) -> untyped
447
+
448
+ ZERO_BIT: untyped
449
+
450
+ ASCII_ENCODING: ::String
451
+
452
+ # @depilicate
453
+ def binary=: (untyped binary) -> untyped
454
+
455
+ def set_no_action!: () -> untyped
456
+
457
+ def unpress_button: (untyped button) -> untyped
458
+
459
+ def press_button: (untyped button) -> untyped
460
+
461
+ def press_button_only: (untyped button) -> untyped
462
+
463
+ def merge: (target_binary: untyped target_binary) -> untyped
464
+ end
465
+ end
466
+
467
+ class ProconBypassMan::Runner
468
+ class InterruptForRestart < StandardError
469
+ end
470
+
471
+ def initialize: () -> untyped
472
+
473
+ def run: () -> untyped
474
+
475
+ private
476
+
477
+ def main_loop: () -> untyped
478
+
479
+ def first_negotiation: () -> untyped
480
+
481
+ def handle_signal: (untyped sig) -> untyped
482
+
483
+ # @return [void]
484
+ def print_booted_message: () -> untyped
485
+ end
486
+
487
+ module ProconBypassMan
488
+ class Timer
489
+ class Timeout < StandardError
490
+ end
491
+
492
+ # 5秒後がタイムアウト
493
+ def initialize: (?timeout: untyped timeout) -> untyped
494
+
495
+ def throw_if_timeout!: () -> untyped
496
+ end
497
+ end
498
+
499
+ module ProconBypassMan
500
+ class Uptime
501
+ def self.from_boot: () -> untyped
502
+ end
503
+ end
504
+
505
+ module ProconBypassMan
506
+ VERSION: ::String
507
+ end
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.6
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiikko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-10-28 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,36 +29,60 @@ files:
28
29
  - LICENSE.txt
29
30
  - README.md
30
31
  - Rakefile
32
+ - Steepfile
31
33
  - bin/console
34
+ - bin/report_receive_server.rb
32
35
  - bin/setup
33
36
  - docs/how_to_connect_procon.md
34
37
  - docs/setup_raspi.md
35
- - examples/pbm.service
38
+ - docs/setup_raspi.mitamae.rb
39
+ - docs/setup_raspi_by_mitamae.md
36
40
  - examples/practical/app.rb
37
41
  - examples/practical/setting.yml
38
- - examples/simple.rb
39
42
  - lib/procon_bypass_man.rb
43
+ - lib/procon_bypass_man/analog_stick_position.rb
44
+ - lib/procon_bypass_man/boot_message.rb
45
+ - lib/procon_bypass_man/buttons_setting_configuration.rb
40
46
  - lib/procon_bypass_man/bypass.rb
47
+ - lib/procon_bypass_man/bypass/usb_hid_logger.rb
48
+ - lib/procon_bypass_man/callbacks.rb
41
49
  - lib/procon_bypass_man/configuration.rb
42
50
  - lib/procon_bypass_man/configuration/layer.rb
43
51
  - lib/procon_bypass_man/configuration/loader.rb
44
52
  - lib/procon_bypass_man/configuration/validator.rb
45
53
  - lib/procon_bypass_man/device_connector.rb
46
54
  - lib/procon_bypass_man/io_monitor.rb
55
+ - lib/procon_bypass_man/on_memory_cache.rb
56
+ - lib/procon_bypass_man/outbound/base.rb
57
+ - lib/procon_bypass_man/outbound/error_reporter.rb
58
+ - lib/procon_bypass_man/outbound/reporter.rb
59
+ - lib/procon_bypass_man/outbound/usb_hid_data_reporter.rb
47
60
  - lib/procon_bypass_man/processor.rb
48
61
  - lib/procon_bypass_man/procon.rb
62
+ - lib/procon_bypass_man/procon/analog_stick_cap.rb
49
63
  - lib/procon_bypass_man/procon/button_collection.rb
50
64
  - lib/procon_bypass_man/procon/data.rb
65
+ - lib/procon_bypass_man/procon/debug_dumper.rb
51
66
  - lib/procon_bypass_man/procon/flip_cache.rb
52
67
  - lib/procon_bypass_man/procon/layer_changeable.rb
53
68
  - lib/procon_bypass_man/procon/macro_registry.rb
54
69
  - lib/procon_bypass_man/procon/mode_registry.rb
70
+ - lib/procon_bypass_man/procon/press_button_aware.rb
55
71
  - lib/procon_bypass_man/procon/pressed_button_helper.rb
56
72
  - lib/procon_bypass_man/procon/user_operation.rb
57
73
  - lib/procon_bypass_man/runner.rb
58
74
  - lib/procon_bypass_man/timer.rb
75
+ - lib/procon_bypass_man/uptime.rb
59
76
  - lib/procon_bypass_man/version.rb
60
77
  - procon_bypass_man.gemspec
78
+ - project_template/README.md
79
+ - project_template/app.rb
80
+ - project_template/setting.yml
81
+ - project_template/systemd_units/pbm.service
82
+ - project_template/systemd_units/pbm_web.service
83
+ - project_template/web.rb
84
+ - sig/README.rb
85
+ - sig/main.rbs
61
86
  homepage: https://github.com/splaplapla/procon_bypass_man
62
87
  licenses:
63
88
  - MIT
@@ -79,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
104
  - !ruby/object:Gem::Version
80
105
  version: '0'
81
106
  requirements: []
82
- rubygems_version: 3.2.15
107
+ rubygems_version: 3.2.22
83
108
  signing_key:
84
109
  specification_version: 4
85
110
  summary: extension for Nintendo Switch Pro Controller
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
-