nxt 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 +15 -0
- data/README.md +45 -0
- data/lib/communication/bluetooth_communication.rb +85 -0
- data/lib/communication/serial_port_profile.rb +71 -0
- data/lib/nxt.rb +111 -20
- data/lib/ruby-nxt.sublime-project +8 -0
- data/lib/ruby-nxt.sublime-workspace +288 -0
- data/lib/telegrams/commands/direct/get_battery_level.rb +8 -0
- data/lib/telegrams/commands/direct/get_current_program_name.rb +8 -0
- data/lib/{nxt/commands/sound.rb → telegrams/commands/direct/get_input_values.rb} +0 -0
- data/lib/{nxt/commands/tone.rb → telegrams/commands/direct/keep_alive.rb} +0 -0
- data/lib/telegrams/commands/direct/ls_get_status.rb +0 -0
- data/lib/telegrams/commands/direct/ls_read.rb +0 -0
- data/lib/telegrams/commands/direct/ls_write.rb +0 -0
- data/lib/telegrams/commands/direct/message_read.rb +0 -0
- data/lib/telegrams/commands/direct/message_write.rb +0 -0
- data/lib/telegrams/commands/direct/output_state.rb +229 -0
- data/lib/telegrams/commands/direct/play_sound_file.rb +38 -0
- data/lib/telegrams/commands/direct/play_tone.rb +34 -0
- data/lib/telegrams/commands/direct/replies/get_battery_level_reply.rb +28 -0
- data/lib/telegrams/commands/direct/replies/get_current_program_name_reply.rb +30 -0
- data/lib/telegrams/commands/direct/replies/play_sound_file_reply.rb +13 -0
- data/lib/telegrams/commands/direct/replies/play_tone_reply.rb +14 -0
- data/lib/telegrams/commands/direct/replies/reset_motor_position_reply.rb +13 -0
- data/lib/telegrams/commands/direct/replies/set_input_mode_reply.rb +11 -0
- data/lib/telegrams/commands/direct/replies/set_output_state_reply.rb +11 -0
- data/lib/telegrams/commands/direct/replies/start_program_reply.rb +13 -0
- data/lib/telegrams/commands/direct/replies/stop_program_reply.rb +13 -0
- data/lib/telegrams/commands/direct/replies/stop_sound_playback_reply.rb +13 -0
- data/lib/telegrams/commands/direct/reset_input_scaled_value.rb +0 -0
- data/lib/telegrams/commands/direct/reset_motor_position.rb +8 -0
- data/lib/telegrams/commands/direct/set_input_mode.rb +101 -0
- data/lib/telegrams/commands/direct/set_output_state.rb +29 -0
- data/lib/telegrams/commands/direct/start_program.rb +30 -0
- data/lib/telegrams/commands/direct/stop_program.rb +9 -0
- data/lib/telegrams/commands/direct/stop_sound_playback.rb +8 -0
- data/lib/telegrams/commands/direct_command.rb +8 -0
- data/lib/telegrams/commands/direct_command_reply.rb +10 -0
- data/lib/telegrams/commands/message_translator.rb +46 -0
- data/lib/telegrams/commands/system/get_device_info.rb +8 -0
- data/lib/telegrams/commands/system/replies/get_device_info_reply.rb +41 -0
- data/lib/telegrams/commands/system_command.rb +8 -0
- data/lib/telegrams/messages/error.rb +0 -0
- data/lib/telegrams/messages/message.rb +0 -0
- data/lib/telegrams/messages/success.rb +0 -0
- data/lib/telegrams/no_message_reply.rb +10 -0
- data/lib/telegrams/reply.rb +82 -0
- data/lib/telegrams/respondable_telegram.rb +29 -0
- data/lib/telegrams/telegram.rb +14 -0
- data/spec/communication/bluetooth_communication_spec.rb +170 -0
- data/spec/communication/serial_port_profile_spec.rb +139 -0
- data/spec/helper.rb +1 -0
- data/spec/nxt_spec.rb +438 -0
- data/spec/telegrams/commands/direct/get_battery_level_spec.rb +26 -0
- data/spec/telegrams/commands/direct/get_current_program_name_spec.rb +26 -0
- data/spec/telegrams/commands/direct/output_state_spec.rb +198 -0
- data/spec/telegrams/commands/direct/play_sound_file_spec.rb +75 -0
- data/spec/telegrams/commands/direct/play_tone_spec.rb +63 -0
- data/spec/telegrams/commands/direct/replies/get_battery_level_reply_spec.rb +40 -0
- data/spec/telegrams/commands/direct/replies/get_current_program_name_reply_spec.rb +33 -0
- data/spec/telegrams/commands/direct/replies/play_sound_file_reply_spec.rb +13 -0
- data/spec/telegrams/commands/direct/replies/play_tone_reply_spec.rb +14 -0
- data/spec/telegrams/commands/direct/replies/reset_motor_position_reply_spec.rb +13 -0
- data/spec/telegrams/commands/direct/replies/set_input_mode_reply_spec.rb +12 -0
- data/spec/telegrams/commands/direct/replies/set_output_state_reply_spec.rb +12 -0
- data/spec/telegrams/commands/direct/replies/start_program_reply_spec.rb +12 -0
- data/spec/telegrams/commands/direct/replies/stop_program_reply_spec.rb +13 -0
- data/spec/telegrams/commands/direct/replies/stop_sound_playback_reply_spec.rb +13 -0
- data/spec/telegrams/commands/direct/reset_motor_position_spec.rb +31 -0
- data/spec/telegrams/commands/direct/set_input_mode_spec.rb +122 -0
- data/spec/telegrams/commands/direct/set_output_state_spec.rb +72 -0
- data/spec/telegrams/commands/direct/start_program_spec.rb +58 -0
- data/spec/telegrams/commands/direct/stop_program_spec.rb +34 -0
- data/spec/telegrams/commands/direct/stop_sound_playback_spec.rb +34 -0
- data/spec/telegrams/commands/direct_command_reply_spec.rb +7 -0
- data/spec/telegrams/commands/direct_command_spec.rb +34 -0
- data/spec/telegrams/commands/system/get_device_info_spec.rb +16 -0
- data/spec/telegrams/commands/system/replies/get_device_info_reply_spec.rb +63 -0
- data/spec/telegrams/commands/system_command_spec.rb +26 -0
- data/spec/telegrams/no_message_reply_spec.rb +12 -0
- data/spec/telegrams/reply_spec.rb +63 -0
- data/spec/telegrams/respondable_telegram_spec.rb +66 -0
- data/spec/telegrams/telegram_spec.rb +38 -0
- metadata +97 -116
- data/README.markdown +0 -52
- data/Rakefile +0 -35
- data/lib/nxt/commands/base.rb +0 -51
- data/lib/nxt/commands/input.rb +0 -60
- data/lib/nxt/commands/output.rb +0 -105
- data/lib/nxt/commands/program.rb +0 -70
- data/lib/nxt/connectors/base.rb +0 -35
- data/lib/nxt/connectors/input/color.rb +0 -30
- data/lib/nxt/connectors/input/touch.rb +0 -11
- data/lib/nxt/connectors/input/ultrasonic.rb +0 -11
- data/lib/nxt/connectors/output/motor.rb +0 -114
- data/lib/nxt/errors.rb +0 -25
- data/lib/nxt/exceptions.rb +0 -26
- data/lib/nxt/interfaces/base.rb +0 -36
- data/lib/nxt/interfaces/serial_port.rb +0 -88
- data/lib/nxt/interfaces/usb.rb +0 -8
- data/lib/nxt/nxt_brick.rb +0 -167
- data/lib/nxt/patches/module.rb +0 -22
- data/lib/nxt/patches/string.rb +0 -29
- data/lib/nxt/utils/accessors.rb +0 -24
- data/spec/matchers.rb +0 -7
- data/spec/nxt/connectors/output/motor_spec.rb +0 -55
- data/spec/nxt/interfaces/serial_port_spec.rb +0 -73
- data/spec/nxt/nxt_brick_spec.rb +0 -199
- data/spec/spec_helper.rb +0 -4
@@ -0,0 +1,34 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
|
3
|
+
require './lib/telegrams/commands/direct_command'
|
4
|
+
|
5
|
+
|
6
|
+
describe DirectCommand do
|
7
|
+
before do
|
8
|
+
@command = DirectCommand.new
|
9
|
+
end
|
10
|
+
|
11
|
+
it "must have a command type of 0x00" do
|
12
|
+
@command.type.must_equal 0x00
|
13
|
+
end
|
14
|
+
|
15
|
+
it "must start out with its type at the first byte" do
|
16
|
+
@command.as_bytes[0].must_equal @command.type
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "when NOT wanting to wait for a reply" do
|
20
|
+
it "must have a first byte of 0x80" do
|
21
|
+
no_wait_command = DirectCommand.new false
|
22
|
+
no_wait_command.as_bytes[0].must_equal 0x80
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "must have a readable command property" do
|
27
|
+
@command.command
|
28
|
+
end
|
29
|
+
|
30
|
+
it "must default command to nil" do
|
31
|
+
@command.command.must_be_nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
require './lib/telegrams/commands/system/get_device_info'
|
3
|
+
|
4
|
+
describe GetDeviceInfo do
|
5
|
+
it "must not accept a require_response override" do
|
6
|
+
-> { GetDeviceInfo.new false }.must_raise ArgumentError
|
7
|
+
end
|
8
|
+
|
9
|
+
it "must require a response" do
|
10
|
+
GetDeviceInfo.new.require_response?.must_equal true
|
11
|
+
end
|
12
|
+
|
13
|
+
it "must have a command of 0x9B" do
|
14
|
+
GetDeviceInfo.new.command.must_equal 0x9B
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
require './lib/telegrams/commands/system/replies/get_device_info_reply'
|
3
|
+
|
4
|
+
def get_msb_and_lsb(number)
|
5
|
+
lsb = number & 0xff
|
6
|
+
msb = (number >> 8) & 0xff
|
7
|
+
{ :msb => msb, :lsb => lsb }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe GetDeviceInfoReply do
|
11
|
+
before do
|
12
|
+
reply_to_command_status_bytes = [0x02, 0x9B, 0x00]
|
13
|
+
@nxt_brick_name = "MyNXTBrick"
|
14
|
+
nxt_brick_name_bytes = @nxt_brick_name.ljust(15, "\0").unpack("C*")
|
15
|
+
@bt_address = "\x01\x02\x03\x04\x05\x06\x00"
|
16
|
+
bt_address_bytes = @bt_address.unpack('C*')
|
17
|
+
@signal_strength = 100
|
18
|
+
signal_strength_hash = get_msb_and_lsb(@signal_strength)
|
19
|
+
|
20
|
+
@free_user_flash_memory = 512 # 0.5 KB
|
21
|
+
free_user_flash_memory_hash = get_msb_and_lsb(@free_user_flash_memory)
|
22
|
+
|
23
|
+
@reply_bytes = reply_to_command_status_bytes # 0-2
|
24
|
+
@reply_bytes = @reply_bytes.concat nxt_brick_name_bytes # 3-17
|
25
|
+
@reply_bytes = @reply_bytes.concat bt_address_bytes # 18-24
|
26
|
+
@reply_bytes = @reply_bytes << signal_strength_hash[:lsb] # 25
|
27
|
+
@reply_bytes = @reply_bytes.concat [0x00, 0x00] # 26-27 more lsb's
|
28
|
+
@reply_bytes = @reply_bytes << signal_strength_hash[:msb] # 28
|
29
|
+
@reply_bytes = @reply_bytes << free_user_flash_memory_hash[:lsb] # 29
|
30
|
+
@reply_bytes = @reply_bytes << free_user_flash_memory_hash[:msb]# 30
|
31
|
+
@reply_bytes = @reply_bytes.concat [0x00, 0x00] # 31-32
|
32
|
+
|
33
|
+
@reply = GetDeviceInfoReply.new(@reply_bytes)
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "when constructing the get device info reply" do
|
37
|
+
it "must raise an argument exception if the command is not get device user info" do
|
38
|
+
@reply_bytes[1] = 0x00
|
39
|
+
-> { GetDeviceInfoReply.new(@reply_bytes) }.must_raise ArgumentError
|
40
|
+
end
|
41
|
+
|
42
|
+
it "must be successful with successful reply" do
|
43
|
+
@reply.success?.must_equal true
|
44
|
+
end
|
45
|
+
|
46
|
+
it "must set the nxt_brick_name" do
|
47
|
+
@reply.nxt_brick_name.must_equal @nxt_brick_name
|
48
|
+
end
|
49
|
+
|
50
|
+
it "must set the Bluetooth Address bt_address property" do
|
51
|
+
@reply.bt_address.must_equal "btspp://010203040506"
|
52
|
+
end
|
53
|
+
|
54
|
+
it "must set the signal_strength" do
|
55
|
+
@reply.signal_strength.must_equal @signal_strength
|
56
|
+
end
|
57
|
+
|
58
|
+
it "must set the free_user_flash_memory_bytes" do
|
59
|
+
@reply.free_user_flash_memory_bytes.must_equal @free_user_flash_memory
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
|
3
|
+
require './lib/telegrams/commands/system_command'
|
4
|
+
|
5
|
+
|
6
|
+
describe SystemCommand do
|
7
|
+
before do
|
8
|
+
@command = SystemCommand.new
|
9
|
+
end
|
10
|
+
|
11
|
+
it "must have a command type of 0x01" do
|
12
|
+
@command.type.must_equal 0x01
|
13
|
+
end
|
14
|
+
|
15
|
+
it "must start out with its type at the first byte" do
|
16
|
+
@command.as_bytes[0].must_equal @command.type
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "when NOT wanting to wait for a reply" do
|
20
|
+
it "must have a first byte of 0x81" do
|
21
|
+
no_wait_command = SystemCommand.new false
|
22
|
+
no_wait_command.as_bytes[0].must_equal 0x81
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
require './lib/telegrams/no_message_reply'
|
3
|
+
|
4
|
+
describe NoMessageReply do
|
5
|
+
it "should accept the bytes as the argument to the constructor" do
|
6
|
+
NoMessageReply.new([0x02, 0x11, 0x00]).type.must_equal 0x02
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return an empty string, even if the message bytes are present" do
|
10
|
+
NoMessageReply.new([0x02, 0x11, 0x00, 0x01, 0x02]).message.must_equal ''
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
|
3
|
+
require './lib/telegrams/reply'
|
4
|
+
|
5
|
+
describe Reply do
|
6
|
+
before do
|
7
|
+
@reply = Reply.new([0x02, 0x11, 0x00])
|
8
|
+
end
|
9
|
+
describe "when constructing a reply" do
|
10
|
+
it "must have a command type of 0x02, which is reply" do
|
11
|
+
@reply.type.must_equal 0x02
|
12
|
+
end
|
13
|
+
|
14
|
+
it "must raise an ArgumentError if the bytes is null" do
|
15
|
+
-> { Reply.new(nil) }.must_raise ArgumentError
|
16
|
+
end
|
17
|
+
|
18
|
+
it "must raise an ArgumentError if the bytes is less than 3 length (type, command, status)" do
|
19
|
+
-> { Reply.new([0x02, 0x00]) }.must_raise ArgumentError
|
20
|
+
end
|
21
|
+
|
22
|
+
it "must raise an ArgumentError if it is not a reply telegram" do
|
23
|
+
-> { Reply.new([0x01, 0x01, 0x00]) }.must_raise ArgumentError
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#success?" do
|
29
|
+
it "must return true when status is 0x00" do
|
30
|
+
@reply.success?.must_equal true
|
31
|
+
end
|
32
|
+
|
33
|
+
it "must return false when the status is not 0x00" do
|
34
|
+
Reply.new([0x02, 0x11, 0x01]).success?.must_equal false
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "#message_bytes" do
|
39
|
+
it "must have an empty array when there is no message" do
|
40
|
+
@reply.message_bytes.must_equal []
|
41
|
+
end
|
42
|
+
|
43
|
+
it "must have the 4th through remaining message bytes when there is a message" do
|
44
|
+
Reply.new([0x02, 0x11, 0x00, 0x01, 0x02]).message_bytes.must_equal [0x01, 0x02]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#message" do
|
49
|
+
it "must just return the bytes of the message in the base Reply class" do
|
50
|
+
Reply.new([0x02, 0x11, 0x00, 0x01, 0x02]).message.must_equal [0x01, 0x02]
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "#status_description" do
|
55
|
+
it "must return empty string if there is no matching code" do
|
56
|
+
Reply.new([0x02, 0x11, 0xfa]).status_description.must_equal ''
|
57
|
+
end
|
58
|
+
|
59
|
+
it "must return the string for the status when there is a matching code" do
|
60
|
+
Reply.new([0x02, 0x11, 0x00]).status_description.must_equal 'Success'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
|
3
|
+
require './lib/telegrams/respondable_telegram'
|
4
|
+
|
5
|
+
class MockRespondableTelegram < RespondableTelegram
|
6
|
+
def initialize(response_required=true)
|
7
|
+
super
|
8
|
+
@type = 0x06
|
9
|
+
@command = 0x07
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
describe RespondableTelegram do
|
15
|
+
before do
|
16
|
+
@telegram = RespondableTelegram.new
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "when using the require_password? property" do
|
20
|
+
it "can access the require_response? property" do
|
21
|
+
@telegram.require_response?
|
22
|
+
end
|
23
|
+
|
24
|
+
it "defaults require_response? to true" do
|
25
|
+
@telegram.require_response?.must_equal true
|
26
|
+
end
|
27
|
+
|
28
|
+
it "can change require_response? default through initializer" do
|
29
|
+
t = RespondableTelegram.new false
|
30
|
+
t.require_response?.must_equal false
|
31
|
+
end
|
32
|
+
|
33
|
+
it "can set the require_response directly" do
|
34
|
+
@telegram.require_response = false
|
35
|
+
@telegram.require_response?.must_equal false
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "must have a readable command property" do
|
40
|
+
@telegram.command
|
41
|
+
end
|
42
|
+
|
43
|
+
it "must default command to nil" do
|
44
|
+
@telegram.command.must_be_nil
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "when using the telegram as a collection of bytes" do
|
48
|
+
describe "when wanting a reply from this telegram" do
|
49
|
+
it "will leave the type in the first byte field alone" do
|
50
|
+
mrt = MockRespondableTelegram.new true
|
51
|
+
mrt.as_bytes[0].must_equal 0x06
|
52
|
+
end
|
53
|
+
end
|
54
|
+
describe "when NOT wanting to wait for a reply" do
|
55
|
+
it "will mask the type with 0x80 to indicate NOT to wait for a reply" do
|
56
|
+
mrt = MockRespondableTelegram.new false
|
57
|
+
mrt.as_bytes[0].must_equal 0x86
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
it "must have the command as the second byte" do
|
62
|
+
mrt = MockRespondableTelegram.new
|
63
|
+
mrt.as_bytes[1].must_equal 0x07
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require './spec/helper'
|
2
|
+
|
3
|
+
require './lib/telegrams/telegram'
|
4
|
+
|
5
|
+
describe Telegram do
|
6
|
+
before do
|
7
|
+
@telegram = Telegram.new
|
8
|
+
@type_value = 0x77
|
9
|
+
@telegram.instance_eval("@type = #{@type_value}")
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
describe "when accessing the type property" do
|
14
|
+
it "allows read access" do
|
15
|
+
@telegram.type.must_equal @type_value
|
16
|
+
end
|
17
|
+
|
18
|
+
it "does not allow write access" do
|
19
|
+
-> { @telegram.type = "biz buzz" }.must_raise NoMethodError
|
20
|
+
@telegram.type.must_equal @type_value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
describe "when getting the telegram as bytes" do
|
26
|
+
it "must return the type value as the first element of the array" do
|
27
|
+
@telegram.as_bytes[0].must_equal @type_value
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
describe "when working with a telegram" do
|
33
|
+
it "specifies a maximum size of 64 bytes" do
|
34
|
+
@telegram.max_size_in_bytes.must_equal 64
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
metadata
CHANGED
@@ -1,21 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tony Heupel
|
9
|
-
- Nathan Kleyn <nathan@unfinitydesign.com>
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain: []
|
13
|
-
date: 2013-
|
11
|
+
date: 2013-06-01 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
15
13
|
- !ruby/object:Gem::Dependency
|
16
14
|
name: serialport
|
17
15
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
16
|
requirements:
|
20
17
|
- - ~>
|
21
18
|
- !ruby/object:Gem::Version
|
@@ -23,165 +20,149 @@ dependencies:
|
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
23
|
requirements:
|
28
24
|
- - ~>
|
29
25
|
- !ruby/object:Gem::Version
|
30
26
|
version: 1.0.4
|
31
27
|
- !ruby/object:Gem::Dependency
|
32
|
-
name:
|
28
|
+
name: guard-minitest
|
33
29
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
30
|
requirements:
|
36
31
|
- - ~>
|
37
32
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
39
|
-
type: :runtime
|
40
|
-
prerelease: false
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 3.2.2
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: ruby-usb
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.1
|
55
|
-
type: :runtime
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.2.1
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: rspec
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ~>
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 2.8.0
|
71
|
-
type: :development
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 2.8.0
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
|
-
name: pry
|
81
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.9.8.4
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 0.9.8.4
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: yard
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ~>
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 0.7.5
|
33
|
+
version: 0.5.0
|
103
34
|
type: :development
|
104
35
|
prerelease: false
|
105
36
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
37
|
requirements:
|
108
38
|
- - ~>
|
109
39
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
40
|
+
version: 0.5.0
|
111
41
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
42
|
+
name: rb-fsevent
|
113
43
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
44
|
requirements:
|
116
45
|
- - ~>
|
117
46
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
47
|
+
version: '0.9'
|
119
48
|
type: :development
|
120
49
|
prerelease: false
|
121
50
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
51
|
requirements:
|
124
52
|
- - ~>
|
125
53
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
127
|
-
description: Control
|
128
|
-
|
54
|
+
version: '0.9'
|
55
|
+
description: Control a Lego Minstorms NXT 2.0 Brick See http://github.com/tchype/ruby-nxt
|
56
|
+
for more information.
|
57
|
+
email: tony@heupel.net
|
129
58
|
executables: []
|
130
59
|
extensions: []
|
131
60
|
extra_rdoc_files:
|
132
|
-
- README.
|
61
|
+
- README.md
|
133
62
|
files:
|
134
|
-
- README.
|
135
|
-
-
|
136
|
-
- lib/
|
137
|
-
- lib/nxt/commands/input.rb
|
138
|
-
- lib/nxt/commands/output.rb
|
139
|
-
- lib/nxt/commands/program.rb
|
140
|
-
- lib/nxt/commands/sound.rb
|
141
|
-
- lib/nxt/commands/tone.rb
|
142
|
-
- lib/nxt/connectors/base.rb
|
143
|
-
- lib/nxt/connectors/input/color.rb
|
144
|
-
- lib/nxt/connectors/input/touch.rb
|
145
|
-
- lib/nxt/connectors/input/ultrasonic.rb
|
146
|
-
- lib/nxt/connectors/output/motor.rb
|
147
|
-
- lib/nxt/errors.rb
|
148
|
-
- lib/nxt/exceptions.rb
|
149
|
-
- lib/nxt/interfaces/base.rb
|
150
|
-
- lib/nxt/interfaces/serial_port.rb
|
151
|
-
- lib/nxt/interfaces/usb.rb
|
152
|
-
- lib/nxt/nxt_brick.rb
|
153
|
-
- lib/nxt/patches/module.rb
|
154
|
-
- lib/nxt/patches/string.rb
|
155
|
-
- lib/nxt/utils/accessors.rb
|
63
|
+
- README.md
|
64
|
+
- lib/communication/bluetooth_communication.rb
|
65
|
+
- lib/communication/serial_port_profile.rb
|
156
66
|
- lib/nxt.rb
|
157
|
-
-
|
158
|
-
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
67
|
+
- lib/ruby-nxt.sublime-project
|
68
|
+
- lib/ruby-nxt.sublime-workspace
|
69
|
+
- lib/telegrams/commands/direct/get_battery_level.rb
|
70
|
+
- lib/telegrams/commands/direct/get_current_program_name.rb
|
71
|
+
- lib/telegrams/commands/direct/get_input_values.rb
|
72
|
+
- lib/telegrams/commands/direct/keep_alive.rb
|
73
|
+
- lib/telegrams/commands/direct/ls_get_status.rb
|
74
|
+
- lib/telegrams/commands/direct/ls_read.rb
|
75
|
+
- lib/telegrams/commands/direct/ls_write.rb
|
76
|
+
- lib/telegrams/commands/direct/message_read.rb
|
77
|
+
- lib/telegrams/commands/direct/message_write.rb
|
78
|
+
- lib/telegrams/commands/direct/output_state.rb
|
79
|
+
- lib/telegrams/commands/direct/play_sound_file.rb
|
80
|
+
- lib/telegrams/commands/direct/play_tone.rb
|
81
|
+
- lib/telegrams/commands/direct/replies/get_battery_level_reply.rb
|
82
|
+
- lib/telegrams/commands/direct/replies/get_current_program_name_reply.rb
|
83
|
+
- lib/telegrams/commands/direct/replies/play_sound_file_reply.rb
|
84
|
+
- lib/telegrams/commands/direct/replies/play_tone_reply.rb
|
85
|
+
- lib/telegrams/commands/direct/replies/reset_motor_position_reply.rb
|
86
|
+
- lib/telegrams/commands/direct/replies/set_input_mode_reply.rb
|
87
|
+
- lib/telegrams/commands/direct/replies/set_output_state_reply.rb
|
88
|
+
- lib/telegrams/commands/direct/replies/start_program_reply.rb
|
89
|
+
- lib/telegrams/commands/direct/replies/stop_program_reply.rb
|
90
|
+
- lib/telegrams/commands/direct/replies/stop_sound_playback_reply.rb
|
91
|
+
- lib/telegrams/commands/direct/reset_input_scaled_value.rb
|
92
|
+
- lib/telegrams/commands/direct/reset_motor_position.rb
|
93
|
+
- lib/telegrams/commands/direct/set_input_mode.rb
|
94
|
+
- lib/telegrams/commands/direct/set_output_state.rb
|
95
|
+
- lib/telegrams/commands/direct/start_program.rb
|
96
|
+
- lib/telegrams/commands/direct/stop_program.rb
|
97
|
+
- lib/telegrams/commands/direct/stop_sound_playback.rb
|
98
|
+
- lib/telegrams/commands/direct_command.rb
|
99
|
+
- lib/telegrams/commands/direct_command_reply.rb
|
100
|
+
- lib/telegrams/commands/message_translator.rb
|
101
|
+
- lib/telegrams/commands/system/get_device_info.rb
|
102
|
+
- lib/telegrams/commands/system/replies/get_device_info_reply.rb
|
103
|
+
- lib/telegrams/commands/system_command.rb
|
104
|
+
- lib/telegrams/messages/error.rb
|
105
|
+
- lib/telegrams/messages/message.rb
|
106
|
+
- lib/telegrams/messages/success.rb
|
107
|
+
- lib/telegrams/no_message_reply.rb
|
108
|
+
- lib/telegrams/reply.rb
|
109
|
+
- lib/telegrams/respondable_telegram.rb
|
110
|
+
- lib/telegrams/telegram.rb
|
111
|
+
- spec/communication/bluetooth_communication_spec.rb
|
112
|
+
- spec/communication/serial_port_profile_spec.rb
|
113
|
+
- spec/helper.rb
|
114
|
+
- spec/nxt_spec.rb
|
115
|
+
- spec/telegrams/commands/direct/get_battery_level_spec.rb
|
116
|
+
- spec/telegrams/commands/direct/get_current_program_name_spec.rb
|
117
|
+
- spec/telegrams/commands/direct/output_state_spec.rb
|
118
|
+
- spec/telegrams/commands/direct/play_sound_file_spec.rb
|
119
|
+
- spec/telegrams/commands/direct/play_tone_spec.rb
|
120
|
+
- spec/telegrams/commands/direct/replies/get_battery_level_reply_spec.rb
|
121
|
+
- spec/telegrams/commands/direct/replies/get_current_program_name_reply_spec.rb
|
122
|
+
- spec/telegrams/commands/direct/replies/play_sound_file_reply_spec.rb
|
123
|
+
- spec/telegrams/commands/direct/replies/play_tone_reply_spec.rb
|
124
|
+
- spec/telegrams/commands/direct/replies/reset_motor_position_reply_spec.rb
|
125
|
+
- spec/telegrams/commands/direct/replies/set_input_mode_reply_spec.rb
|
126
|
+
- spec/telegrams/commands/direct/replies/set_output_state_reply_spec.rb
|
127
|
+
- spec/telegrams/commands/direct/replies/start_program_reply_spec.rb
|
128
|
+
- spec/telegrams/commands/direct/replies/stop_program_reply_spec.rb
|
129
|
+
- spec/telegrams/commands/direct/replies/stop_sound_playback_reply_spec.rb
|
130
|
+
- spec/telegrams/commands/direct/reset_motor_position_spec.rb
|
131
|
+
- spec/telegrams/commands/direct/set_input_mode_spec.rb
|
132
|
+
- spec/telegrams/commands/direct/set_output_state_spec.rb
|
133
|
+
- spec/telegrams/commands/direct/start_program_spec.rb
|
134
|
+
- spec/telegrams/commands/direct/stop_program_spec.rb
|
135
|
+
- spec/telegrams/commands/direct/stop_sound_playback_spec.rb
|
136
|
+
- spec/telegrams/commands/direct_command_reply_spec.rb
|
137
|
+
- spec/telegrams/commands/direct_command_spec.rb
|
138
|
+
- spec/telegrams/commands/system/get_device_info_spec.rb
|
139
|
+
- spec/telegrams/commands/system/replies/get_device_info_reply_spec.rb
|
140
|
+
- spec/telegrams/commands/system_command_spec.rb
|
141
|
+
- spec/telegrams/no_message_reply_spec.rb
|
142
|
+
- spec/telegrams/reply_spec.rb
|
143
|
+
- spec/telegrams/respondable_telegram_spec.rb
|
144
|
+
- spec/telegrams/telegram_spec.rb
|
162
145
|
homepage: http://github.com/tchype/ruby-nxt
|
163
146
|
licenses: []
|
147
|
+
metadata: {}
|
164
148
|
post_install_message:
|
165
149
|
rdoc_options: []
|
166
150
|
require_paths:
|
167
151
|
- lib
|
168
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
153
|
requirements:
|
171
154
|
- - ! '>='
|
172
155
|
- !ruby/object:Gem::Version
|
173
156
|
version: '0'
|
174
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
158
|
requirements:
|
177
159
|
- - ! '>='
|
178
160
|
- !ruby/object:Gem::Version
|
179
161
|
version: '0'
|
180
162
|
requirements: []
|
181
163
|
rubyforge_project:
|
182
|
-
rubygems_version:
|
164
|
+
rubygems_version: 2.0.3
|
183
165
|
signing_key:
|
184
|
-
specification_version:
|
185
|
-
summary: Control
|
166
|
+
specification_version: 4
|
167
|
+
summary: Control a Lego Minstorms NXT 2.0 Brick
|
186
168
|
test_files: []
|
187
|
-
has_rdoc:
|