arduino_firmata 0.2.2 → 0.2.3

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.
@@ -1,3 +1,7 @@
1
+ === 0.2.3 2013-01-23
2
+
3
+ * fix sysex command
4
+
1
5
  === 0.2.2 2013-01-13
2
6
 
3
7
  * fix readme
@@ -85,7 +85,7 @@ module ArduinoFirmata
85
85
  write SYSTEM_RESET
86
86
  end
87
87
 
88
- def sysex(command, data)
88
+ def sysex(command, data=[])
89
89
  ## http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
90
90
  raise ArgumentError, 'command must be Number' unless command.kind_of? Fixnum
91
91
  raise ArgumentError, 'data must be 7bit-Number or Those Array' unless [Fixnum, Array].include? data.class
@@ -176,7 +176,7 @@ module ArduinoFirmata
176
176
  if input_data == END_SYSEX
177
177
  @parsing_sysex = false
178
178
  sysex_command = @stored_input_data[0]
179
- sysex_data = @stored_input_data[1..@sysex_bytes_read]
179
+ sysex_data = @stored_input_data[1...@sysex_bytes_read]
180
180
  emit :sysex, sysex_command, sysex_data
181
181
  else
182
182
  @stored_input_data[@sysex_bytes_read] = input_data
@@ -1,4 +1,4 @@
1
1
 
2
2
  module ArduinoFirmata
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arduino_firmata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-12 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: serialport