SSD1306 0.6.0 → 0.6.1
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 +4 -4
- data/README.md +1 -1
- data/lib/SSD1306/display.rb +14 -2
- data/lib/SSD1306/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: cbdf41012f7de5e11af7808b8930f252d50e475a
|
4
|
+
data.tar.gz: 0c86f23bc3507db3e4d4c69847d780e54a59b21f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5f1a62b30ae541404e21a48809cdeaf4daac0072003b4a597cde0bdb2196a5d318934eb416840c052e8147a60c74ed943cb963e426b748cdb8170bcb7f4644
|
7
|
+
data.tar.gz: a34668b89dff06795aae6c9814f3f7257396c96f8a925a942b2b35b853d264cc82198e547de061553a6eb0c2586658ae4ae3c2d1d13ff6ebd7f2757fc9c2bc1e
|
data/README.md
CHANGED
@@ -74,7 +74,7 @@ Check out the source code for additional information.
|
|
74
74
|
|
75
75
|
## Development
|
76
76
|
|
77
|
-
After checking out the repo, run `
|
77
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests. Run `bundle exec SSD1306` to use the gem in this directory, ignoring other installed copies of this gem.
|
78
78
|
|
79
79
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
80
80
|
|
data/lib/SSD1306/display.rb
CHANGED
@@ -199,11 +199,23 @@ module SSD1306
|
|
199
199
|
raise 'Contrast not yet implemented'
|
200
200
|
end
|
201
201
|
|
202
|
-
#
|
202
|
+
# Dim the display
|
203
203
|
def dim(dim)
|
204
|
-
|
204
|
+
# dim = true: display is dimmed
|
205
|
+
# dim = false: display is normal
|
206
|
+
contrast = 0 # assume dim
|
207
|
+
unless dim
|
208
|
+
if @vccstate == SSD1306_EXTERNALVCC
|
209
|
+
contrast = 0x9F
|
210
|
+
else
|
211
|
+
contrast = 0xCF
|
212
|
+
end
|
213
|
+
end
|
214
|
+
self.command SSD1306_SETCONTRAST
|
215
|
+
self.command contrast
|
205
216
|
end
|
206
217
|
|
218
|
+
|
207
219
|
protected
|
208
220
|
|
209
221
|
# This skips to a newline if the byte is a LF newline,
|
data/lib/SSD1306/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SSD1306
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xavier Bick
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|