Skip to content

Commit

Permalink
Moved emulator code to rm-hull/luma.emulator github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-hull committed Feb 17, 2017
1 parent b448bee commit 9b0db9c
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 400 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ChangeLog
| Version | Description | Date |
+============+=====================================================================+============+
| *Upcoming* | * Fix bug in seven_segment transform (display correct char) | |
| | * Moved emulator code to ``rm-hull/luma.emulator`` github repo | |
+------------+---------------------------------------------------------------------+------------+
| **0.1.15** | * Require at least Pillow 4.0.0 | 2017/02/11 |
| | * Configurable ``transfer_size`` on SPI writes | |
Expand Down
15 changes: 0 additions & 15 deletions doc/api-documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,48 @@ API Documentation
:undoc-members:
:show-inheritance:


:mod:`luma.core.device`
"""""""""""""""""""""""
.. automodule:: luma.core.device
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.emulator`
"""""""""""""""""""""""""
.. automodule:: luma.core.emulator
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.error`
""""""""""""""""""""""
.. automodule:: luma.core.error
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.mixin`
""""""""""""""""""""""
.. automodule:: luma.core.mixin
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.render`
"""""""""""""""""""""""
.. automodule:: luma.core.render
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.serial`
"""""""""""""""""""""""
.. automodule:: luma.core.serial
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.threadpool`
"""""""""""""""""""""""""""
.. automodule:: luma.core.threadpool
:members:
:undoc-members:
:show-inheritance:


:mod:`luma.core.virtual`
""""""""""""""""""""""""
.. automodule:: luma.core.virtual
Expand Down
23 changes: 22 additions & 1 deletion luma/core/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import atexit

from luma.core.serial import i2c
from luma.core.serial import i2c, noop
from luma.core import mixin
import luma.core.const

Expand Down Expand Up @@ -85,3 +85,24 @@ def cleanup(self):
self.hide()
self.clear()
self._serial_interface.cleanup()


class dummy(device):
"""
Pseudo-device that acts like a physical display, except that it does nothing
other than retain a copy of the displayed image. It is mostly useful for
testing. Supports 24-bit color depth.
"""
def __init__(self, width=128, height=64, rotate=0, mode="RGB", **kwargs):
super(dummy, self).__init__(serial_interface=noop())
self.capabilities(width, height, rotate, mode)
self.image = None

def display(self, image):
"""
Takes a :py:mod:`PIL.Image` and makes a copy of it for later
use/inspection.
"""
assert(image.size == self.size)

self.image = self.preprocess(image).copy()
273 changes: 0 additions & 273 deletions luma/core/emulator.py

This file was deleted.

Binary file removed tests/reference/anim.gif
Binary file not shown.
Binary file removed tests/reference/capture.png
Binary file not shown.

0 comments on commit 9b0db9c

Please sign in to comment.