Skip to content

Commit 04ad77d

Browse files
committed
Make Cover delay a template parameter
1 parent 0af94e2 commit 04ad77d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal/Switches.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace DcsBios {
6363
};
6464
typedef Switch2PosT<> Switch2Pos;
6565

66-
template <unsigned long pollIntervalMs = POLL_EVERY_TIME>
66+
template <unsigned long pollIntervalMs = POLL_EVERY_TIME, unsigned long coverDelayMs = 200>
6767
class SwitchWithCover2PosT : PollingInput, public ResettableInput
6868
{
6969
private:
@@ -107,7 +107,7 @@ namespace DcsBios {
107107
(millis() - lastDebounceTime) > debounceDelay_)
108108
{
109109
// Switch has debounced and changed state
110-
if( millis() - lastSwitchStateTime > 200 )
110+
if( millis() - lastSwitchStateTime > coverDelayMs )
111111
{
112112
// Switch/cover delay has been satisfied.
113113
if( state )

0 commit comments

Comments
 (0)