Restart if after 10 minutes no connection
This commit is contained in:
parent
5f971cfee3
commit
8ed4bb8aa6
10 changed files with 215 additions and 30 deletions
|
@ -18,7 +18,7 @@ void buttonTask(void *parameter)
|
|||
|
||||
if (!digitalRead(MCP_INT_PIN))
|
||||
{
|
||||
uint pin = mcp.getLastInterruptPin();
|
||||
uint pin = mcp1.getLastInterruptPin();
|
||||
|
||||
switch (pin)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ void buttonTask(void *parameter)
|
|||
break;
|
||||
}
|
||||
}
|
||||
mcp.clearInterrupts();
|
||||
mcp1.clearInterrupts();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ void buttonTask(void *parameter)
|
|||
// Very ugly, but for some reason this is necessary
|
||||
while (!digitalRead(MCP_INT_PIN))
|
||||
{
|
||||
mcp.clearInterrupts();
|
||||
mcp1.clearInterrupts();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue