seriamp 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/seriamp/version.rb +1 -1
- data/lib/seriamp/yamaha/client.rb +3 -0
- data/lib/seriamp/yamaha/cmd.rb +14 -4
- data/seriamp.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7afd42caaa8f0dd5815e908b40bfccd8ca042769fea3af431ae334b3d44aa140
|
4
|
+
data.tar.gz: af4041b6faf2f07ce204a15b99d4cc51b6f4bdfacc5c016006588d096513adef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c09d03fe9b24e521eadffef9dc94305f61b90005e9719c349d9dba9ab7cb327a632352a62a3d2831f215374343147e3195fd958e01c4d750cce0a7ee4b7a8fda
|
7
|
+
data.tar.gz: a5a4f1b992fc6459ed7fa605daecc0715acb5e5938246b9915eb6af32415162b18650a6c45066602c22c27cf15f4879d91f63ab4b75eb05df82c02c0ee12760d
|
data/lib/seriamp/version.rb
CHANGED
data/lib/seriamp/yamaha/cmd.rb
CHANGED
@@ -80,6 +80,10 @@ module Seriamp
|
|
80
80
|
which = 'main'
|
81
81
|
end
|
82
82
|
prefix = "set_#{which}"
|
83
|
+
if value.nil?
|
84
|
+
puts client.send("last_#{which}_volume_db")
|
85
|
+
return
|
86
|
+
end
|
83
87
|
value = value.downcase
|
84
88
|
if value == 'up'
|
85
89
|
# Just like with remote, the first volume up or down command
|
@@ -90,9 +94,12 @@ module Seriamp
|
|
90
94
|
client.public_send("#{which}_volume_down")
|
91
95
|
client.public_send("#{which}_volume_down")
|
92
96
|
else
|
93
|
-
if %w(. -).include?(value)
|
97
|
+
if %w(. - mute).include?(value)
|
94
98
|
method = "#{prefix}_mute"
|
95
99
|
value = true
|
100
|
+
elsif value == 'unmute'
|
101
|
+
method = "#{prefix}_mute"
|
102
|
+
value = false
|
96
103
|
else
|
97
104
|
method = "#{prefix}_volume_db"
|
98
105
|
if value[0] == ','
|
@@ -105,13 +112,16 @@ module Seriamp
|
|
105
112
|
when 'input'
|
106
113
|
which = args.shift&.downcase
|
107
114
|
if %w(main zone2 zone3).include?(which)
|
108
|
-
method = "set_#{which}_input"
|
109
115
|
input = args.shift
|
110
116
|
else
|
111
|
-
method = 'set_main_input'
|
112
117
|
input = which
|
118
|
+
which = 'main'
|
119
|
+
end
|
120
|
+
if input.nil?
|
121
|
+
puts client.public_send("last_#{which}_input_name")
|
122
|
+
return
|
113
123
|
end
|
114
|
-
client.public_send(
|
124
|
+
client.public_send("set_#{which}_input", input)
|
115
125
|
when 'program'
|
116
126
|
value = args.shift.downcase
|
117
127
|
client.set_program(value)
|
data/seriamp.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seriamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serialport
|