I want to display custom text on my MAX7219 via ESPHome. So I created a input_text helper, which I want to update and the updates text should then be displayed on the matrix.
src/main.cpp: In lambda function:
src/main.cpp:262:59: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
it.printf(0, 0, digit_font, "%s", matrix_text->state);
^
src/main.cpp:262:59: warning: format '%s' expects argument of type 'char*', but argument 6 has type 'std::string {aka std::basic_string<char>}' [-Wformat=]
Can somebody tell my what I need to change in order to get this working?
Here its written AAAAAA. I have tried everything BOTTOM, CENTER, BASELINE, BOTTOM_RIGHT, but when i put any of this the letters disappear. Any thoughts?
Thanks
Cool! How I missed that! This really help with my issue - MAX7219 text alignment confused me
But I still confused which alignment does font has by default.
That’s why I love forums. Everyone helps everyone
I think all it should use TOP_LEFT, but maybe there are some more bugs here.
@machine2669 BTW: The text disappears on different text alignment, because the position must be adjusted as well. So if you for example set TOP_RIGHT, the text will be gone, since it starts on pixel 0 and from there the text grows to the left (so into a area, where is not pixels). I hope this is in any way understandable