Reset memory layout after drawing text
This commit is contained in:
parent
e62a7ed498
commit
d23814fefc
10
eink.hpp
10
eink.hpp
@ -164,9 +164,6 @@ class Eink {
|
|||||||
template <typename RleImage>
|
template <typename RleImage>
|
||||||
static void draw(const RleImage &rleImage)
|
static void draw(const RleImage &rleImage)
|
||||||
{
|
{
|
||||||
setRamXPos();
|
|
||||||
setRamYPos();
|
|
||||||
|
|
||||||
constexpr auto sendImageChannel = [](const auto command, const auto &image) {
|
constexpr auto sendImageChannel = [](const auto command, const auto &image) {
|
||||||
using image_t = std::remove_cvref_t<decltype(image)>;
|
using image_t = std::remove_cvref_t<decltype(image)>;
|
||||||
|
|
||||||
@ -189,9 +186,6 @@ class Eink {
|
|||||||
|
|
||||||
static void clear(const Color color = Color::WHITE)
|
static void clear(const Color color = Color::WHITE)
|
||||||
{
|
{
|
||||||
setRamXPos();
|
|
||||||
setRamYPos();
|
|
||||||
|
|
||||||
constexpr auto getFillData = [](const auto &color) -> std::pair<std::uint8_t, std::uint8_t> {
|
constexpr auto getFillData = [](const auto &color) -> std::pair<std::uint8_t, std::uint8_t> {
|
||||||
switch (color) {
|
switch (color) {
|
||||||
case Color::BLACK:
|
case Color::BLACK:
|
||||||
@ -284,6 +278,10 @@ class Eink {
|
|||||||
|
|
||||||
sendChannel(Cmd::WRITE_RAM_BLACK);
|
sendChannel(Cmd::WRITE_RAM_BLACK);
|
||||||
sendChannel(Cmd::WRITE_RAM_RED);
|
sendChannel(Cmd::WRITE_RAM_RED);
|
||||||
|
|
||||||
|
setRamRange();
|
||||||
|
setRamXPos();
|
||||||
|
setRamYPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Lut>
|
template <typename Lut>
|
||||||
|
Loading…
Reference in New Issue
Block a user