Skip to content

Commit 0dfb2fc

Browse files
committed
Fix logic for the held button release
1 parent f79f645 commit 0dfb2fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal/DualModeButton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ namespace DcsBios {
3030
if(mode != lastMode_)
3131
{
3232
// Switched seat. If we had a button held, make sure to release it
33-
if( lastState_ )
33+
if( lastState_ == LOW)
3434
{
3535
tryToSendDcsBiosMessage(lastMode_?msgMode2_:msgMode1_, "0");
3636
lastMode_ = mode;
37-
lastState_ = 0;
37+
lastState_ = HIGH;
3838
}
3939
}
4040

0 commit comments

Comments
 (0)