1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Enable reverse display of the Max7219 digit (#1234)

* add reverse option

* Update max7219digit.cpp

adding space for formatting

* Update esphome/components/max7219digit/display.py

Copy past error...

Co-authored-by: Otto Winter <otto@otto-winter.com>

Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
rspaargaren
2020-09-27 19:17:28 +02:00
committed by GitHub
parent 0e59243b83
commit 0ccfdd4711
3 changed files with 10 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ class MAX7219Component : public PollingComponent,
void set_scroll_delay(uint16_t delay) { this->scroll_delay_ = delay; };
void set_scroll(bool on_off) { this->scroll_ = on_off; };
void set_scroll_mode(uint8_t mode) { this->scroll_mode_ = mode; };
void set_reverse(bool on_off) { this->reverse_ = on_off; };
void send_char(byte chip, byte data);
void send64pixels(byte chip, const byte pixels[8]);
@@ -87,6 +88,7 @@ class MAX7219Component : public PollingComponent,
uint8_t intensity_; /// Intensity of the display from 0 to 15 (most)
uint8_t num_chips_;
bool scroll_;
bool reverse_;
bool update_{false};
uint16_t scroll_speed_;
uint16_t scroll_delay_;