Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename send_byte_array

  • Loading branch information...
commit 1c4753abae9f163cf688246f8ab56b4d47e2eaa3 1 parent 34d9502
@quimarche authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 trudy.rb
View
12 trudy.rb
@@ -28,8 +28,8 @@ def queue
@queue ||= client.queue(QUEUE_NAME)
end
- def send_packet packet
- packet.pack('c*')
+ def send_byte_array byte_array
+ byte_array.pack('c*')
end
def trudy_file fileName
@@ -108,12 +108,12 @@ def trudy_packet_reboot_block
get '/vl/p4.jsp' do
if params[:st] == 0
- send_packet trudy_packet_ping PING_SECONDS
+ send_byte_array trudy_packet_ping PING_SECONDS
else
if queue.message_count > 0
- send_packet trudy_packet_message queue.pop[:payload]
+ send_byte_array trudy_packet_message queue.pop[:payload]
else
- send_packet trudy_packet_ambient AMBIENT_FREQUENCY
+ send_byte_array trudy_packet_ambient AMBIENT_FREQUENCY
end
end
end
@@ -123,7 +123,7 @@ def trudy_packet_reboot_block
end
get '/:filename.nab' do
- send_packet trudy_packet_choreography params[:filename]
+ send_byte_array trudy_packet_choreography params[:filename]
end
get '/:filename' do
Please sign in to comment.
Something went wrong with that request. Please try again.