Skip to content

Commit

Permalink
Change state too when start is pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
hax0kartik committed Aug 23, 2020
1 parent 19a9a80 commit 2f1ff82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ void sockrwThread(void *arg)
{
if(events[1] != -1)
svcSignalEvent(events[1]);
tag_state = NFC_TagState_OutOfRange;
}
}
MyThread_Exit();
Expand Down Expand Up @@ -225,6 +226,11 @@ void handle_commands(sockThreadStruct *data)
{
if(data->connected)
{
if(tag_state == NFC_TagState_OutOfRange)
{
cmdbuf[1] = 1;
cmdbuf[2] = NFC_TagState_OutOfRange;
}
sockSendRecvData(data, cmdbuf);
break;
}
Expand Down

0 comments on commit 2f1ff82

Please sign in to comment.