betabrite 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -0
- data/README.txt +1 -1
- data/lib/betabrite/base.rb +1 -1
- data/lib/betabrite/files/text.rb +4 -4
- data/lib/betabrite/memory.rb +1 -1
- data/lib/betabrite/string.rb +8 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -55,7 +55,7 @@ it. So subsequent executions of your script do not require allocating memory.
|
|
55
55
|
Here is an example of allocating memory on the sign:
|
56
56
|
|
57
57
|
bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
|
58
|
-
sign.
|
58
|
+
sign.allocate do |memory|
|
59
59
|
memory.text('A', 4096)
|
60
60
|
memory.string('0', 64)
|
61
61
|
end
|
data/lib/betabrite/base.rb
CHANGED
data/lib/betabrite/files/text.rb
CHANGED
@@ -89,11 +89,11 @@ module BetaBrite
|
|
89
89
|
|
90
90
|
def checksum(string)
|
91
91
|
total = 0
|
92
|
-
|
93
|
-
total +=
|
94
|
-
|
92
|
+
string.unpack('C*').each { |i|
|
93
|
+
total += i
|
94
|
+
}
|
95
95
|
|
96
|
-
sprintf("%
|
96
|
+
sprintf("%04X", total)
|
97
97
|
end
|
98
98
|
|
99
99
|
Mode.constants.each do |constant|
|
data/lib/betabrite/memory.rb
CHANGED
data/lib/betabrite/string.rb
CHANGED
@@ -2,8 +2,10 @@ module BetaBrite
|
|
2
2
|
# This class encapsulates a string and attributes about the string such as
|
3
3
|
# color, character set, and also contains special characters.
|
4
4
|
class String
|
5
|
+
UP_ARROW = 0xc4.chr
|
6
|
+
DOWN_ARROW = 0xc5.chr
|
5
7
|
LEFT_ARROW = 0xc6.chr
|
6
|
-
RIGHT_ARROW =
|
8
|
+
RIGHT_ARROW = 0xc7.chr
|
7
9
|
PACKMAN = 0xc8.chr
|
8
10
|
SAIL_BOAT = 0xc9.chr
|
9
11
|
BALL = 0xca.chr
|
@@ -22,6 +24,11 @@ module BetaBrite
|
|
22
24
|
PRINTER = 0xd7.chr
|
23
25
|
NOTE = 0xd8.chr
|
24
26
|
INFINITY = 0xd9.chr
|
27
|
+
RETURN_ARROW = 0xda.chr
|
28
|
+
SM_UP_ARROW = 0xdb.chr
|
29
|
+
SM_DOWN_ARROW = 0xdc.chr
|
30
|
+
SM_LEFT_ARROW = 0xdd.chr
|
31
|
+
SM_RIGHT_ARROW = 0xde.chr
|
25
32
|
class Color
|
26
33
|
RED = '1'
|
27
34
|
GREEN = '2'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: betabrite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-02-
|
12
|
+
date: 2008-02-15 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|