diff --git a/bin/hidconsole b/bin/hidconsole index 2acd0508..f0b5599d 100755 --- a/bin/hidconsole +++ b/bin/hidconsole @@ -5,5 +5,6 @@ LIB=`readlink -f $(dirname "$Z")/../lib` export PYTHONPATH=$LIB export PYTHONUNBUFFERED=yes +NICE=`which nice 2>/dev/null` PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`} -exec $PYTHON -m hidapi.hidconsole "$@" +exec $NICE $PYTHON -m hidapi.hidconsole "$@" diff --git a/bin/scan-registers b/bin/scan-registers new file mode 100755 index 00000000..0bdca288 --- /dev/null +++ b/bin/scan-registers @@ -0,0 +1,23 @@ +#!/bin/sh + +if test -z "$1"; then + echo "Use: $0 " + exit 2 +fi + +Z=`readlink -f "$0"` +HC=`dirname "$Z"`/hidconsole + +z='0 1 2 3 4 5 6 7 8 9 a b c d e f' + +for x in $z; do + for y in $z; do + echo "10 0${1} 81${x}${y} 000000" + done +done | $HC --hidpp | grep -v ' 8F.. ..0[12]' | grep -B 1 '^>> ' + +for x in $z; do + for y in $z; do + echo "10 0${1} 83${x}${y} 000000" + done +done | $HC --hidpp | grep -v ' 8F.. ..0[12]' | grep -B 1 '^>> ' diff --git a/bin/solaar b/bin/solaar index 911e74c6..681e48b5 100755 --- a/bin/solaar +++ b/bin/solaar @@ -8,5 +8,6 @@ SHARE=`readlink -f $(dirname "$Z")/../share` export PYTHONPATH=$APP:$LIB export XDG_DATA_DIRS=${SHARE}_override:$SHARE:$XDG_DATA_DIRS +NICE=`which nice 2>/dev/null` PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`} -exec $PYTHON -m solaar "$@" +exec $NICE $PYTHON -m solaar "$@" diff --git a/bin/solaar-cli b/bin/solaar-cli index e2bb1310..a146c0e6 100755 --- a/bin/solaar-cli +++ b/bin/solaar-cli @@ -5,5 +5,6 @@ APP=`readlink -f $(dirname "$Z")/../app` LIB=`readlink -f $(dirname "$Z")/../lib` export PYTHONPATH=$APP:$LIB +NICE=`which nice 2>/dev/null` PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`} -exec $PYTHON -m solaar_cli "$@" +exec $NICE $PYTHON -m solaar_cli "$@"