hdaps-gl and lis3lv02d

I have an accelerometer in my hp compaq nc2400 laptop which I was trying to access with hdaps-gl. However, since hdaps-gl is written for thinkpad accelerometers, it did not work out of the box and I had to adjust the code to match the path to the ‘position’ file containing the coordinates of the device. I made a PKGBUILD that patches the link to the ‘position’ file in hdaps-gl.c. The program runs now, the orientation is still wrong and the sensitivity is too high though.

I might have a look at it soon again and fix it. Here is the PKGBUILD:

# Contributor: Tomas Kramar
# Edited by panuh to suit lis3lv02d

pkgname=hdaps-gl-lis3lv02d
pkgver=0.0.1
pkgrel=2
pkgdesc=’Thinkpad Accelerometer OpenGL monitor patched for lis3lv02d in hp compaq notebook’
arch=(‘i686′ ‘x86_64′)
url=’http://hdaps.sourceforge.net’
license=(‘GPL’)
depends=(‘freeglut’)
source=(“http://downloads.sourceforge.net/sourceforge/hdaps/${pkgname}-${pkgver}.tar.gz”)
md5sums=(‘e0924c964c70f5b4d8ee8de67108c6a9′)

build()
{
cd $startdir/src/${pkgname}-${pkgver}
sed -i “s/hdaps\/position/lis3lv02d\/position/” hdaps-gl.c
make || return 1
mkdir -p $startdir/pkg/usr/bin
install hdaps-gl $startdir/pkg/usr/bin/hdaps-gl
}

Have fun.

Leave a Reply

You must be logged in to post a comment.