LED matrix on/off added
This commit is contained in:
parent
a4419ab6f0
commit
381286331f
@ -34,6 +34,12 @@ const FONT_CHAR_INFO *ActiveFontCharInfo = ActiveFontInfo->Descriptors;
|
|||||||
void init_matrix_display(bool reverse) {
|
void init_matrix_display(bool reverse) {
|
||||||
ESP_LOGI(TAG, "Initializing LED Matrix display");
|
ESP_LOGI(TAG, "Initializing LED Matrix display");
|
||||||
matrix.begin(displaybuf, LED_MATRIX_WIDTH, LED_MATRIX_HEIGHT);
|
matrix.begin(displaybuf, LED_MATRIX_WIDTH, LED_MATRIX_HEIGHT);
|
||||||
|
|
||||||
|
if (MatrixDisplayIsOn)
|
||||||
|
matrix.on();
|
||||||
|
else
|
||||||
|
matrix.off();
|
||||||
|
|
||||||
if (reverse)
|
if (reverse)
|
||||||
matrix.reverse();
|
matrix.reverse();
|
||||||
matrix.clear();
|
matrix.clear();
|
||||||
@ -52,6 +58,10 @@ void refreshTheMatrixDisplay(bool nextPage) {
|
|||||||
// set display on/off according to current device configuration
|
// set display on/off according to current device configuration
|
||||||
if (MatrixDisplayIsOn != cfg.screenon) {
|
if (MatrixDisplayIsOn != cfg.screenon) {
|
||||||
MatrixDisplayIsOn = cfg.screenon;
|
MatrixDisplayIsOn = cfg.screenon;
|
||||||
|
if (MatrixDisplayIsOn)
|
||||||
|
matrix.on();
|
||||||
|
else
|
||||||
|
matrix.off();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextPage) {
|
if (nextPage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user