Skip to content

Commit

Permalink
Merge pull request #3737 from giig1967g/bugfix/3736
Browse files Browse the repository at this point in the history
Fixed #3736
  • Loading branch information
TD-er committed Aug 5, 2021
2 parents 6829f22 + 7fd9895 commit 0df609e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/source/Plugin/P009_commands.repl
Expand Up @@ -127,6 +127,7 @@
| bitmask:
| - if not present assume to operate in all pins
| - if present is used as a mask (1=update, 0=do not update)
| - pins are numbered from right to left (i.e. 87654321)
| - if number of bit lower than number of pins, then padded with 0
| - if number of bit higher than number of pins, then it's truncated
","
Expand All @@ -140,13 +141,14 @@
| - mcpgpioRange,3,12,1,525 or mcpgpioRange,3,12,1,0b0100001101
| mask = '0100001101'
| write pattern after mask = 'x1xxxx11x1' where x indicates that the pin will not be changed
| (only pin 1,3,4,9 will be changed)
|
| - mcpgpioRange,3,12,1,973 or mcpgpioRange,3,12,1,0b1111001101
| mask = 973 = '1111001101'
| write pattern after mask = '1111xx11x1' where x indicates that the pin will not be changed
"
"
``MCPGPIOrange,<MCPGPIO start pin>,<MCPGPIO end pin>,<write pattern> [,optional bitmask]``
``MCPGPIOpattern,<MCPGPIO start pin>,<MCPGPIO end pin>,<write pattern> [,optional bitmask]``

| MCPGPIO start pin: 0 ... 255
|
Expand Down
4 changes: 3 additions & 1 deletion docs/source/Plugin/P019_commands.repl
Expand Up @@ -128,6 +128,7 @@
| bitmask:
| - if not present assume to operate in all pins
| - if present is used as a mask (1=update, 0=do not update)
| - pins are numbered from right to left (i.e. 87654321)
| - if number of bit lower than number of pins, then padded with 0
| - if number of bit higher than number of pins, then it's truncated
","
Expand All @@ -141,13 +142,14 @@
| - pcfgpioRange,3,12,1,525 or pcfgpioRange,3,12,1,0b0100001101
| mask = '0100001101'
| write pattern after mask = 'x1xxxx11x1' where x indicates that the pin will not be changed
| (only pin 1,3,4,9 will be changed)
|
| - pcfgpioRange,3,12,1,973 or pcfgpioRange,3,12,1,0b1111001101
| mask = 973 = '1111001101'
| write pattern after mask = '1111xx11x1' where x indicates that the pin will not be changed
"
"
``PCFGPIOrange,<PCFGPIO start pin>,<PCFGPIO end pin>,<write pattern> [,optional bitmask]``
``PCFGPIOpattern,<PCFGPIO start pin>,<PCFGPIO end pin>,<write pattern> [,optional bitmask]``

| PCFGPIO start pin: 0 ... 255
|
Expand Down
4 changes: 4 additions & 0 deletions src/_P019_PCF8574.ino
Expand Up @@ -349,6 +349,10 @@ boolean Plugin_019(uint8_t function, struct EventStruct *event, String& string)
// Reset SafeButton counter
PCONFIG_LONG(3) = 0;

// @giig1967g-20210804: reset timer for long press
PCONFIG_LONG(2) = millis();
PCONFIG(6) = false;

const unsigned long debounceTime = timePassedSince(PCONFIG_LONG(0));

if (debounceTime >= (unsigned long)lround(PCONFIG_FLOAT(0))) // de-bounce check
Expand Down

0 comments on commit 0df609e

Please sign in to comment.