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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e495b6d197443936697c620c697dec82640f0b1b
4
- data.tar.gz: 30e02c800b3f2485a97e466340dab340a3321e97
3
+ metadata.gz: cbdf41012f7de5e11af7808b8930f252d50e475a
4
+ data.tar.gz: 0c86f23bc3507db3e4d4c69847d780e54a59b21f
5
5
  SHA512:
6
- metadata.gz: 1be5f82302e648f361826aaa72ba19b5ec525423d07e90973a61dca150736a08c70d184ef64f6728e77fb03e5c9b91ab8978e0a90c76493313640bde2e1e6096
7
- data.tar.gz: 49ca2121d814250646cfc05a1dd05b2eff4d3c00a1404e47f4791df482ad090669afeeb7f2d0cdfc56f9b3122e8a8416de1a4bfabee0e19408508373e28373eb
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 `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec SSD1306` to use the gem in this directory, ignoring other installed copies of this gem.
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
 
@@ -199,11 +199,23 @@ module SSD1306
199
199
  raise 'Contrast not yet implemented'
200
200
  end
201
201
 
202
- # TODO: Implement Dimming functionality
202
+ # Dim the display
203
203
  def dim(dim)
204
- raise 'Dim not implemented yet'
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,
@@ -1,3 +1,3 @@
1
1
  module SSD1306
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
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.0
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: 2016-11-01 00:00:00.000000000 Z
12
+ date: 2017-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler