Changeset 82 in flair-bin for trunk/tools/scripts


Ignore:
Timestamp:
Jan 8, 2019, 5:45:01 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

support for multiple ds3 in usb

Location:
trunk/tools/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/scripts/dualshock3.sh

    r66 r82  
    33
    44#on kernel >=4.13, ds3 is seen as a mouse
    5 /usr/bin/xinput set-prop 'Sony PLAYSTATION(R)3 Controller' 'Device Enabled' 0
     5#search every ds3 connected and disable them
     6for id in `xinput --list|grep 'Sony PLAYSTATION(R)3 Controller'|perl -ne 'while (m/id=(\d+)/g){print "$1\n";}'`; do
     7    xinput set-prop $id 'Device Enabled' 0
     8done
    69
    710#This script is the only one that calls itself with sudo.
  • trunk/tools/scripts/dualshock3_local_usb.sh

    r28 r82  
    11#! /bin/bash
    2 ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_usb.sh 127.0.0.1
     2${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_usb.sh 127.0.0.1 $*
  • trunk/tools/scripts/dualshock3_usb.sh

    r28 r82  
    33
    44# $1 is the drone ip
    5 if [ "$#" -ne 1 ] ; then
    6   echo "Usage: $0 drone_ip_address"
     5if [ "$#" -gt 2 ] ; then
     6  echo "Usage: $0 drone_ip_address (drone_port, default 20000)"
    77  exit 1
    88fi
    99
    10 $FLAIR_ROOT/flair-bin/tools/scripts/dualshock3.sh -a ${1}:20000 -c usb -t 100 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
     10# use default port
     11PORT=${2}
     12if [ "$#" -eq 1 ] ; then
     13  PORT="20000"
     14fi
    1115
     16$FLAIR_ROOT/flair-bin/tools/scripts/dualshock3.sh -a ${1}:$PORT -c usb -t 100 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
     17
Note: See TracChangeset for help on using the changeset viewer.