Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/spectra6/stripes.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
COLOURS = [0, 1, 2, 3, 5, 6]

for y in range(inky.height - 1):
c = y // (inky.height // 6)
c = min(y // (inky.height // 6), 5)
for x in range(inky.width - 1):
inky.set_pixel(x, y, COLOURS[c])

Expand Down
2 changes: 1 addition & 1 deletion inky/auto.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def auto(i2c_bus=None, ask_user=False, verbose=False):
if _eeprom.display_variant == 24:
return InkyJD79668(resolution=(400, 300))
if _eeprom.display_variant == 25:
return InkyE640(resolution=(400, 600))
return InkyE640(resolution=(600, 400))

if ask_user:
if verbose:
Expand Down
2 changes: 1 addition & 1 deletion inky/eeprom.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"Spectra 6 7.3 800 x 480 (E673)",
"Red/Yellow pHAT (JD79661)",
"Red/Yellow wHAT (JD79668)",
"Spectra 6 4.0 400 x 600 (E640)"
"Spectra 6 4.0 600 x 400 (E640)"
]


Expand Down
3 changes: 2 additions & 1 deletion inky/inky_e640.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

_SPI_CHUNK_SIZE = 4096

_RESOLUTION_4_0_INCH = (400, 600) # Inky Impression 7.3 (Spectra 6)"
_RESOLUTION_4_0_INCH = (600, 400) # Inky Impression 4.0 (Spectra 6)"

_RESOLUTION = {
_RESOLUTION_4_0_INCH: (_RESOLUTION_4_0_INCH[0], _RESOLUTION_4_0_INCH[1], 0, 0, 0, 0b01),
Expand Down Expand Up @@ -288,6 +288,7 @@ def show(self, busy_wait=True):
if self.rotation:
region = numpy.rot90(region, self.rotation // 90)

region = numpy.rot90(region, -1)
buf = region.flatten()

buf = ((buf[::2] << 4) & 0xF0) | (buf[1::2] & 0x0F)
Expand Down