Reset memory layout after drawing text

This commit is contained in:
BlackMark 2022-06-04 18:56:50 +02:00
parent e62a7ed498
commit d23814fefc

View File

@ -164,9 +164,6 @@ class Eink {
template <typename RleImage>
static void draw(const RleImage &rleImage)
{
setRamXPos();
setRamYPos();
constexpr auto sendImageChannel = [](const auto command, const auto &image) {
using image_t = std::remove_cvref_t<decltype(image)>;
@ -189,9 +186,6 @@ class Eink {
static void clear(const Color color = Color::WHITE)
{
setRamXPos();
setRamYPos();
constexpr auto getFillData = [](const auto &color) -> std::pair<std::uint8_t, std::uint8_t> {
switch (color) {
case Color::BLACK:
@ -284,6 +278,10 @@ class Eink {
sendChannel(Cmd::WRITE_RAM_BLACK);
sendChannel(Cmd::WRITE_RAM_RED);
setRamRange();
setRamXPos();
setRamYPos();
}
template <typename Lut>