Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lilygo_t5_47_display.h #3

Open
wants to merge 5 commits into
base: lilygo-t5-47-always-on
Choose a base branch
from
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 esphome/components/lilygo_t5_47/display/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def to_code(config):

if CONF_LAMBDA in config:
lambda_ = await cg.process_lambda(
config[CONF_LAMBDA], [(display.DisplayBufferRef, "it")], return_type=cg.void
config[CONF_LAMBDA], [(display.DisplayRef, "it")], return_type=cg.void
)
cg.add(var.set_writer(lambda_))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include "esphome/components/display/display_color_utils.h"
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/core/version.h"

namespace esphome {
namespace lilygo_t5_47 {

class LilygoT547Display : public PollingComponent, public display::DisplayBuffer {
class LilygoT547Display : public display::Display {
public:
float get_setup_priority() const override;

Expand Down Expand Up @@ -43,6 +44,9 @@ class LilygoT547Display : public PollingComponent, public display::DisplayBuffer
void flush_screen_changes();
void power_on();
void power_off();
#if ESPHOME_VERSION_CODE >= VERSION_CODE(2022,6,0)
display::DisplayType get_display_type() override { return display::DisplayType::DISPLAY_TYPE_BINARY; }
#endif

protected:
void HOT draw_absolute_pixel_internal(int x, int y, Color color) override;
Expand Down