@@ -48,7 +48,7 @@ ResetInput::ResetInput() {
48
48
#else
49
49
_pin = PIN_RECONFIGURE;
50
50
#endif
51
-
51
+ _ledFeedbackPin = LED_RECONFIGURE;
52
52
_expired = false ;
53
53
_startPressed = 0 ;
54
54
_fireEvent = false ;
@@ -67,11 +67,14 @@ void ResetInput::begin() {
67
67
}
68
68
#ifdef ARDUINO_OPTA
69
69
pinMode (_pin, INPUT);
70
+ if (_getPid_ () != OPTA_WIFI_PID){
71
+ _ledFeedbackPin = GREEN_LED;
72
+ }
70
73
#else
71
74
pinMode (_pin, INPUT_PULLUP);
72
75
#endif
73
- pinMode (LED_RECONFIGURE , OUTPUT);
74
- digitalWrite (LED_RECONFIGURE , LED_OFF);
76
+ pinMode (_ledFeedbackPin , OUTPUT);
77
+ digitalWrite (_ledFeedbackPin , LED_OFF);
75
78
attachInterrupt (digitalPinToInterrupt (_pin),_pressedCallback, CHANGE);
76
79
}
77
80
@@ -81,7 +84,7 @@ bool ResetInput::isEventFired() {
81
84
LEDFeedbackClass::getInstance ().stop ();
82
85
#endif
83
86
if (micros () - _startPressed > RESET_HOLD_TIME){
84
- digitalWrite (LED_RECONFIGURE , LED_OFF);
87
+ digitalWrite (_ledFeedbackPin , LED_OFF);
85
88
_expired = true ;
86
89
}
87
90
}
@@ -111,9 +114,9 @@ void ResetInput::_pressedCallback() {
111
114
LEDFeedbackClass::getInstance ().stop ();
112
115
#endif
113
116
_startPressed = micros ();
114
- digitalWrite (LED_RECONFIGURE , LED_ON);
117
+ digitalWrite (_ledFeedbackPin , LED_ON);
115
118
} else {
116
- digitalWrite (LED_RECONFIGURE , LED_OFF);
119
+ digitalWrite (_ledFeedbackPin , LED_OFF);
117
120
if (_startPressed != 0 && _expired){
118
121
_fireEvent = true ;
119
122
}else {
0 commit comments