bin/ scripts updated

This commit is contained in:
Daniel Pavel 2012-12-10 15:36:10 +02:00
parent fa72b89b3a
commit 8b90e99658
4 changed files with 29 additions and 3 deletions

View File

@ -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 "$@"

23
bin/scan-registers Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
if test -z "$1"; then
echo "Use: $0 <device number 1..6>"
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 '^>> '

View File

@ -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 "$@"

View File

@ -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 "$@"