ceol 0.3.0 → 0.5.0
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/CHANGELOG.md +10 -0
- data/Gemfile.lock +2 -1
- data/README.md +11 -6
- data/exe/ceol +20 -7
- data/lib/ceol/controller.rb +20 -0
- data/lib/ceol/version.rb +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: a2a5aa992ad16be21f836b774c88cace93a3c8fb6c64ef4d3340961f9281b521
|
4
|
+
data.tar.gz: 378be26839349d32caf4efd125586039907b223bca148e1d0103bb8b584025e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e66003118be686ed253ad0cab5103657db60ce71cab631f9e279d8c00ab398afa25124a3cfb38d39f8ff9e2c5afaf4e762e24a609ec8908c17bfa0b5b59c564
|
7
|
+
data.tar.gz: 423a9a572f10012b5f7d871a1e1ea5745d41a96c78f0367bb8fa43b08b78760cd983d9fcb62e8368bd8e3534e9a4d059f706169890a6228f2a639178018f810a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.5.0] - 2022-11-05
|
4
|
+
|
5
|
+
- Add `mute` and `unmute` commands
|
6
|
+
- Add command to set volume directly
|
7
|
+
|
8
|
+
## [0.4.0] - 2022-10-19
|
9
|
+
|
10
|
+
- Add `digital` command to select digital in
|
11
|
+
- Add `analog` command to select analog 1 in
|
12
|
+
|
3
13
|
## [0.3.0] - 2022-10-19
|
4
14
|
|
5
15
|
- Add `on` command to change power to on
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -33,12 +33,17 @@ or define a `CEOL_IPADDR` environment variable with the ip address of your CEOL
|
|
33
33
|
In the command line run the executable:
|
34
34
|
|
35
35
|
```
|
36
|
-
$ ceol +
|
37
|
-
$ ceol ++
|
38
|
-
$ ceol -
|
39
|
-
$ ceol --
|
40
|
-
$ ceol
|
41
|
-
$ ceol
|
36
|
+
$ ceol + # Turns the volume up by 1
|
37
|
+
$ ceol ++ # Turns the volume up by 2 and so on
|
38
|
+
$ ceol - # Turns the volume down by 1
|
39
|
+
$ ceol -- # Turns the volume down by 2 and so on
|
40
|
+
$ ceol 12 # Sets the volume to 12 (or any other value in the range 0..60)
|
41
|
+
$ ceol off # Powers off to standby
|
42
|
+
$ ceol on # Powers on from standby
|
43
|
+
$ ceol digital # Selects digital in
|
44
|
+
$ ceol analog # Selects analog 1 in
|
45
|
+
$ ceol mute # Mutes output
|
46
|
+
$ ceol unmute # Unmutes output
|
42
47
|
```
|
43
48
|
|
44
49
|
## Development
|
data/exe/ceol
CHANGED
@@ -10,15 +10,28 @@ Ceol::Controller.control do |controller|
|
|
10
10
|
controller.off
|
11
11
|
when "on"
|
12
12
|
controller.on
|
13
|
+
when "digital"
|
14
|
+
controller.digital_in
|
15
|
+
when "analog"
|
16
|
+
controller.analog_1
|
17
|
+
when "mute"
|
18
|
+
controller.mute
|
19
|
+
when "unmute"
|
20
|
+
controller.unmute
|
13
21
|
else
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
begin
|
23
|
+
volume = Integer(commands, 10).clamp(0..60)
|
24
|
+
controller.volume = volume
|
25
|
+
rescue ArgumentError
|
26
|
+
commands.each_char do |command|
|
27
|
+
case command
|
28
|
+
when "+"
|
29
|
+
controller.volume_up
|
30
|
+
when "-"
|
31
|
+
controller.volume_down
|
32
|
+
end
|
33
|
+
sleep(0.5)
|
20
34
|
end
|
21
|
-
sleep(0.5)
|
22
35
|
end
|
23
36
|
end
|
24
37
|
end
|
data/lib/ceol/controller.rb
CHANGED
@@ -28,6 +28,22 @@ module Ceol
|
|
28
28
|
connection.close unless connection.nil?
|
29
29
|
end
|
30
30
|
|
31
|
+
def analog_1
|
32
|
+
write("SIAUXB")
|
33
|
+
end
|
34
|
+
|
35
|
+
def digital_in
|
36
|
+
write("SIAUXD")
|
37
|
+
end
|
38
|
+
|
39
|
+
def mute
|
40
|
+
write("MUON")
|
41
|
+
end
|
42
|
+
|
43
|
+
def unmute
|
44
|
+
write("MUOFF")
|
45
|
+
end
|
46
|
+
|
31
47
|
def off
|
32
48
|
write("PWSTANDBY")
|
33
49
|
end
|
@@ -36,6 +52,10 @@ module Ceol
|
|
36
52
|
write("PWON")
|
37
53
|
end
|
38
54
|
|
55
|
+
def volume=(volume)
|
56
|
+
write("MV#{volume.clamp(0..60)}")
|
57
|
+
end
|
58
|
+
|
39
59
|
def volume_down
|
40
60
|
write("MVDOWN")
|
41
61
|
end
|
data/lib/ceol/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ceol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rasmus Bang Grouleff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|