ST7789 using array instead of numpy #368
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change results in a ~10x speed-up for ShowImage() calls (from ~20ms to 2ms on pi2),
...as measured by wrapping deleted-lines/inserted-lines with something like:
t0 = time.time()
and
print("elapsed: ", time.time() - t0)
The original goal was to do-away with our dependency on 'numpy', but picamera still requires it.
Still, this 'hack' gets us closer to not needing numpy and makes the interface feel a touch more 'snappy' on both pi2 and pi0.
Leaving this here because it's what I'm using from this point forward (and I'll forget about sharing it if not reminded), for others to consider. (btw: I also found many ways to do the same thing which were 2 orders of magnitude slower than this hack).