View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#178
I've packaged this one (after numerous structural changes) but on a N800, it will crash with:

/usr/bin/flipclock:3: RuntimeWarning: import cdrom: No module named cdrom
from pygame.locals import *
/usr/bin/flipclock:3: RuntimeWarning: import joystick: No module named joystick
from pygame.locals import *
Traceback (most recent call last):
File "/usr/bin/flipclock", line 45, in <module>
flipclock.ci_alarm.light_sensor()
File "/usr/lib/python2.5/site-packages/flipclock/ci_alarm.py", line 102, in light_sensor
lux = file("/sys/devices/platform/i2c_omap.2/i2c-0/0-0029/lux","r")
IOError: [Errno 2] No such file or directory: '/sys/devices/platform/i2c_omap.2/i2c-0/0-0029/lux'
Despite me having set sw_led to 0.

Never mind, changed ci_alarm from:
def light_sensor():
lux = file("/sys/devices/platform/i2c_omap.2/i2c-0/0-0029/lux","r")
ci.luxlevel=int(lux.read())
to
def light_sensor():
if ci.sw_led==1:
lux = file("/sys/devices/platform/i2c_omap.2/i2c-0/0-0029/lux","r")
ci.luxlevel=int(lux.read())

Last edited by qwerty12; 2009-01-24 at 08:44.
 

The Following 2 Users Say Thank You to qwerty12 For This Useful Post: