Restart if after 10 minutes no connection

This commit is contained in:
Djuri 2023-11-26 00:51:54 +01:00
parent 5f971cfee3
commit 8ed4bb8aa6
10 changed files with 215 additions and 30 deletions

View file

@ -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();
}
}
}