lorraine 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lorraine/command.rb +4 -4
- data/lib/lorraine/version.rb +1 -1
- metadata +1 -1
data/lib/lorraine/command.rb
CHANGED
@@ -44,8 +44,8 @@ module Lorraine
|
|
44
44
|
method_option :remote, type: :boolean, aliases: "-r", desc: "Interact over the network.", default: false
|
45
45
|
def interactive
|
46
46
|
say "Opening a connection to the LED monstrosity...", :yellow
|
47
|
-
|
48
|
-
|
47
|
+
c = Lorraine::Connection.new
|
48
|
+
sleep 5
|
49
49
|
say "... opened.", :green
|
50
50
|
while true
|
51
51
|
response = ask(">> ")
|
@@ -54,8 +54,8 @@ module Lorraine
|
|
54
54
|
else
|
55
55
|
pixel, r, g, b = response.split(" ")
|
56
56
|
puts response
|
57
|
-
|
58
|
-
|
57
|
+
m = Lorraine::Message.new :set_pixel, pixel, (r * 4095).to_i, (g * 4095).to_i, (b * 4095).to_i
|
58
|
+
c.write_message(m)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/lib/lorraine/version.rb
CHANGED