arduino_firmata 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/arduino_firmata/arduino.rb +8 -8
- data/lib/arduino_firmata/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69707c79dd76c49a994b409b2d851d8b1efda32d
|
4
|
+
data.tar.gz: 085a7a2e407f6c844c68bab794f4560b7caa5e6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2147b27f71082dc32ceedaf0215928087d79008fbb590ff27b12020bb5796de67eb96f028f9335d4dbf3d04db7e82724aced6df0e234d13a2f1242ea821033e1
|
7
|
+
data.tar.gz: 3994d4c4d371e011b7b7e4ac5126a11dcbe23f2ea82d67a49ffb9435e6af2d8b0a8a0a5d1d94eb6ce6e77159d2a5867959e732c4b5fd06bd98d099c6a2aea36a
|
data/History.txt
CHANGED
@@ -44,6 +44,13 @@ module ArduinoFirmata
|
|
44
44
|
@thread_status = false
|
45
45
|
end
|
46
46
|
|
47
|
+
loop do
|
48
|
+
write REPORT_VERSION
|
49
|
+
sleep 0.5
|
50
|
+
break if @version
|
51
|
+
end
|
52
|
+
sleep 0.5 if old_arduino_device?
|
53
|
+
|
47
54
|
(0...6).each do |i|
|
48
55
|
write(REPORT_ANALOG | i)
|
49
56
|
write 1
|
@@ -52,13 +59,6 @@ module ArduinoFirmata
|
|
52
59
|
write(REPORT_DIGITAL | i)
|
53
60
|
write 1
|
54
61
|
end
|
55
|
-
|
56
|
-
loop do
|
57
|
-
write REPORT_VERSION
|
58
|
-
sleep 0.5
|
59
|
-
break if @version
|
60
|
-
end
|
61
|
-
sleep 0.5 if old_arduino_device?
|
62
62
|
end
|
63
63
|
|
64
64
|
def run(&block)
|
@@ -71,7 +71,7 @@ module ArduinoFirmata
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def old_arduino_device?
|
74
|
-
File.basename(@serialport_name)
|
74
|
+
File.basename(@serialport_name) =~ /^tty\.usbserial/ ? true : false
|
75
75
|
end
|
76
76
|
|
77
77
|
def close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arduino_firmata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|