IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
267 stars 43 forks source link

RX Feedback LED wrong polarity #71

Closed hosentraeger closed 2 years ago

hosentraeger commented 2 years ago

Bug Report

Board

Current behavior

LED is ON when idle, OFF when I press a remote's button

Expected behavior

should be vice versa, as FEEDBACK_LED_IS_ACTIVE_LOW was given

Additional context

I've noticed in IRFeedbackLED.hpp:

#  if defined(__AVR__) // As far as I know, there is no active-low built in LED for AVR platform boards
    digitalWriteFast(IRMP_FEEDBACK_LED_PIN, aSwitchLedOn);
#  else

My diy board has active-low built in LED :-( Any objections to implement

#    if defined(FEEDBACK_LED_IS_ACTIVE_LOW)
    digitalWriteFast(IRMP_FEEDBACK_LED_PIN, !aSwitchLedOn);
#    else
    digitalWriteFast(IRMP_FEEDBACK_LED_PIN, aSwitchLedOn);
#    endif

?

checklist:

Thank you!

ArminJo commented 2 years ago

Thanks for reporting 👍