Fixes LED issues as discussed in #562

Removing MY_LED_BLINKING_FEATURE, as we now are
using MY_DEFAULT_LED_xx_PIN defines to enable
LED blinking feature.

updated Gateway sketches to not refer to
MY_LED_BLINKING_FEATURE any more

fixes #562
This commit is contained in:
Thomas Mørch
2016-08-20 09:35:49 +02:00
parent c925dd6f5e
commit 15b46f8023
15 changed files with 216 additions and 276 deletions
+10 -4
View File
@@ -18,20 +18,26 @@
*/
#include "MyIndication.h"
#ifdef MY_LEDS_BLINKING_FEATURE
#if defined(MY_DEFAULT_TX_LED_PIN)|| defined(MY_DEFAULT_RX_LED_PIN) || defined(MY_DEFAULT_ERR_LED_PIN)
#include "MyLeds.h"
#endif
void setIndication( const indication_t ind )
{
#ifdef MY_LEDS_BLINKING_FEATURE
#if defined(MY_DEFAULT_TX_LED_PIN)
if ((INDICATION_TX == ind) || (INDICATION_GW_TX == ind))
{
ledsBlinkTx(1);
} else if ((INDICATION_RX == ind) || (INDICATION_GW_RX == ind))
} else
#endif
#if defined(MY_DEFAULT_RX_LED_PIN)
if ((INDICATION_RX == ind) || (INDICATION_GW_RX == ind))
{
ledsBlinkRx(1);
} else if (ind > INDICATION_ERR_START)
} else
#endif
#if defined(MY_DEFAULT_ERR_LED_PIN)
if (ind > INDICATION_ERR_START)
{
// Number of blinks indicates which error occurred.
ledsBlinkErr(ind-INDICATION_ERR_START);