mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-07 21:33:32 +02:00
tm1637 - support 6 character displays (#1803)
This commit is contained in:
@@ -253,7 +253,7 @@ uint8_t TM1637Display::print(uint8_t start_pos, const char* str) {
|
|||||||
pos--;
|
pos--;
|
||||||
this->buffer_[pos] |= 0b10000000;
|
this->buffer_[pos] |= 0b10000000;
|
||||||
} else {
|
} else {
|
||||||
if (pos >= 4) {
|
if (pos >= 6) {
|
||||||
ESP_LOGE(TAG, "String is too long for the display!");
|
ESP_LOGE(TAG, "String is too long for the display!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class TM1637Display : public PollingComponent {
|
|||||||
GPIOPin *clk_pin_;
|
GPIOPin *clk_pin_;
|
||||||
uint8_t intensity_;
|
uint8_t intensity_;
|
||||||
optional<tm1637_writer_t> writer_{};
|
optional<tm1637_writer_t> writer_{};
|
||||||
uint8_t buffer_[4] = {0};
|
uint8_t buffer_[6] = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tm1637
|
} // namespace tm1637
|
||||||
|
|||||||
Reference in New Issue
Block a user