Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Force disconnect of sixaxis (big hack, but works for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Jan 30, 2013
1 parent 55912a0 commit c2f4ed9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sixad/sixad-sixaxis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@ int main(int argc, char *argv[])

delete ufd;

// hack for force disconnect
char cmd[32] = { 0 };
strcpy(cmd, "hcitool dc ");
strcat(cmd, mac);

usleep(10*1000);
syslog(LOG_INFO, "Force disconnect of \"%s\"", mac);
system(cmd);

if (debug) syslog(LOG_INFO, "Done");

return 0;
Expand Down

0 comments on commit c2f4ed9

Please sign in to comment.