SSD1306 0.2.4 → 0.2.5

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: ded35d654d9ff9fe0136f638f07b7c13a72777e2
4
- data.tar.gz: 9385253fe85888d9a516da521435f5430305dda4
3
+ metadata.gz: b6d42b986aaacb5f0d756d3abbd9bafba0079889
4
+ data.tar.gz: f65508e7a8655c2e4a88d6c5e69eadc3ac4704f0
5
5
  SHA512:
6
- metadata.gz: 853472176c216de4be237e56c310651c01232bf4e10a336670441be469372295e77eba1721d7db29528770dc772f7f07f1771059e42b8ccc7127d989ffda98bb
7
- data.tar.gz: 690a244105a8cae78a308cacda91cf2ad70dbace83e919a68767fe2ee646cd62e7c8d70fca8cdb98b87b797697a53fbf7b0268b3a69f20a3be875a31b8b9d5a8
6
+ metadata.gz: 2edcec2a33610182ae4290a02a0e42609e52da0017ebaf4f7983f51c8ae9d64fce286b259a2de641a6efab829a3dcf315d2f40f0cc1a5c07639bb249a51b0be8
7
+ data.tar.gz: b713ec26480b3471409ae12689af1ab0cd46e5b604a2ec4cc1d2b53b3ff431868d8bd0f4874c4a5b3d6b5a850b9a5cf3eda6ce3ed4e246654db3e625e20f4292
@@ -146,12 +146,12 @@ module SSD1306
146
146
  image.image_type = BilevelType
147
147
  pix = image.export_pixels
148
148
  index = 0
149
- for page in 0..(@pages - 1)
150
- for x in 0..(@width - 1)
149
+ for page in 0...@pages
150
+ for x in 0...@width
151
151
  bits = 0
152
152
  for bit in [0, 1, 2, 3, 4, 5, 6, 7]
153
153
  bits = bits << 1
154
- bits |= pix[(page*8*(@width-1)) + x + (bit*(@width-1))] == 0 ? 0 : 1
154
+ bits |= pix[(page*8*@width) + x + ((7-bit)*@width)] == 0 ? 0 : 1
155
155
  end
156
156
  @buffer[index] = bits
157
157
  index += 1
@@ -1,3 +1,3 @@
1
1
  module SSD1306
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xavier Bick