MajicDesigns / MD_Parola

Library for modular scrolling LED matrix text displays
GNU Lesser General Public License v2.1
438 stars 135 forks source link

Starting from version 3.4 Matrix.setIntensity doesn't work anymore ? #73

Closed woeperbe closed 4 years ago

woeperbe commented 4 years ago

IMPORTANT

Before submitting this issue [ ] Have you tried using the latest version of the library? [ ] Have you checked this has not already been submitted and/or resolved? [ ] If you are requesting help a better choice may be the Arduino forum

Subject of the issue

Describe your issue here.

Your Environment

Library Version: 3.4 and up Arduino IDE version: Latest Hardware model/type: NodeMcu OS and Version:Windows 10

Steps to Reproduce

Comiple with 3.4 and up

Actual Behaviour

Intensity is always the same independed what value setup in the function

Code Demonstrating the Issue

void SetLuminance(void) {

    int ch = RealHour(hour());

    if (EEP.brightness[ch] == 0) {
        Matrix.displayShutdown(true);
    };
    if (EEP.brightness[ch] == 1) {
        Matrix.displayShutdown(false);
        Matrix.setIntensity(EEP.lumlow);

        Serial.printf("Intensity set to %d\r\n", EEP.lumlow);
    };
    if (EEP.brightness[ch] == 2) {
        Matrix.displayShutdown(false);
        Matrix.setIntensity(EEP.lumhigh);
        Serial.printf("Intensity set to %d\r\n", EEP.lumhigh);
    };

}
MajicDesigns commented 4 years ago

What values are you actually setting and what is the resistor value being used for the max7219 intensity?

woeperbe commented 4 years ago

i use FC16 modules and changed nothing compared to using 3.3 where it works normally I use values 0 and 3 to test the difference

woeperbe commented 4 years ago

I tested again and again: it works with 3.3 and not with 3.4 and 3.5

MicroSur commented 4 years ago

Uncomment in MD_Parola.h : inline void setIntensity(uint8_t intensity) { _intensity = intensity; _MX->control(_zoneStart, _zoneEnd, MD_MAX72XX::INTENSITY, _intensity); }

woeperbe commented 4 years ago

This change made it work again ! Thanks for your quick service

MajicDesigns commented 4 years ago

Yes, for some reason that got commented out. No idea how or why that happened (but I have had a few contributors between versions). Tells me I need to check very carefully from now on as I found a few other things commented out as well. Will be reverted in the next release (3.5.1) after I do a more comprehensive check.

woeperbe commented 4 years ago

thanks again for your quick reaction