Active Topics

 



Notices


Reply
Thread Tools
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#51
Originally Posted by daperl View Post
That's clean. But I'm still confused why the variable substitution operator (%) doesn't recognize a list as a sequence. That doesn't make sense to me. Does that make sense to you? And if so, why? Thanks.
I'm too much of a down-to-earth, pragmatic and occasional programmer to worry about philosophical issues - and Python has few of them (see the 'Zen of Python'), which is why I like it :-)

The question is intriguing though, and while I haven't (yet) found a definitive answer, I did find the discussion on this page quite enlightening:

http://jtauber.com/blog/2006/04/15/p...onstant_lists/
 

The Following User Says Thank You to fpp For This Useful Post:
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#52
I need your help people: I heavily modified the code using great PLOP's suggestions but now the clock keep crashing every 9th minutes...
I have no idea why the
x[15] a time.ctime() on the 9th minute made this expception...
Anyway, I think people can survive with a clock that crash each 9th minute....(09, 19, 29 etc)
Im pimping the clock with all the features that make China the big country that deserve to be. The cheap wood plastic case inspired me to add one of the stupidiest and tackyest feature:
let me introduce to the world the Moodorama .
@ Qwerty12, dont loose your time packaging this version until the annoyng 9minutebug will not have a solution
https://garage.maemo.org/frs/downloa...ock003.tar.bz2

Im testing some different input interfaces for setting the alarm clock:
tapping somewhere on the bottom should bring up a virtual keyboard i found somewhere, Ill probably use something like a semplified version of that.
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito
 

The Following 3 Users Say Thank You to ciroip For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#53
Originally Posted by fpp View Post
I'm too much of a down-to-earth, pragmatic and occasional programmer to worry about philosophical issues - and Python has few of them (see the 'Zen of Python'), which is why I like it :-)

The question is intriguing though, and while I haven't (yet) found a definitive answer, I did find the discussion on this page quite enlightening:

http://jtauber.com/blog/2006/04/15/p...onstant_lists/
Excellent post. Enlightening to say the least. Even though it didn't answer my question, I now have enough information to make up my own answer.
__________________
N9: Go white or go home
 
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#54
Originally Posted by nilchak View Post
Initially I thought that Alat was built in when I say the Alarm Off /On graphic.
But I guess that is only a graphic and is not a workable "switch as yet", Am I right ?

Also while I would love to have the alarm feature (I loved the clock so much - that I woke up quite a few times on the first night to look at the time in big clear letters - thus losing good sleep :-) , the nice clear interface made me think this would work very well as a stop-watch too - if that feature is built in (maybe).

Maybe clicking the full-screen button could start/stop the stopwatch - just a thought.

But I love this clock at last and having an alarm would make it replace the large statusbar alarm system for me (which bugs me in that it kills the sound on my tablet each time).
Right the alarm still dont work but is one of my highest priority
I have to decide how make people configure the time. Ill think about something.
When Ill be bored of the clock ill probably use the digits for a stopwatch, a counter (every tap +1)or use the number to interface finger friendly (tapping on top of each number the counter ad 1, tapping on the botton it decrease) or maybe dragging up and down. Ill see if it ill woks
thank you for the ideas
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito
 

The Following User Says Thank You to ciroip For This Useful Post:
Posts: 2 | Thanked: 3 times | Joined on Dec 2008
#55
Originally Posted by ciroip View Post
I need your help people: I heavily modified the code using great PLOP's suggestions but now the clock keep crashing every 9th minutes...
I have no idea why the
x[15] a time.ctime() on the 9th minute made this expception...
Anyway, I think people can survive with a clock that crash each 9th minute....(09, 19, 29 etc)
My bad, I've overlooked the range, it loaded from 0 to 8 before ^^.

Use

numeri = [pygame.image.load(path+str(x)+".png") for x in range(0,10)]

when you load the images and it will work.
 

The Following 2 Users Say Thank You to plop For This Useful Post:
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#56
Originally Posted by plop View Post
My bad, I've overlooked the range, it loaded from 0 to 8 before ^^.

Use

numeri = [pygame.image.load(path+str(x)+".png") for x in range(0,10)]

when you load the images and it will work.
thank you, perfect
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito
 

The Following User Says Thank You to ciroip For This Useful Post:
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#57
Another crappy release Just to show a bit the status.
The code really need to be checked and cleaned:
@ qwerty12: trust me, you dont want touch it.
Anyway the clock should be stable enough for a drive test.
The alarm should work. I decided to not use the maemo alarmd but to simple store the setting in a variable (the alarm need to be re-set every crash... )
For the python gurus out there: dont waste your time checking the code, is pure trash, Ill give a clean up asap
https://garage.maemo.org/frs/downloa...ock004.tar.bz2

The alarm sound loop every sec (more or less) following the screen refresh (WORK, STUPID CPU WORK!) The final version will probably refresh every 5 seconds.
Anyone know how control the N810 LED? Would be lovely to have a blinking alarm.
Buonanotte a tutti
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito
 

The Following 3 Users Say Thank You to ciroip For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#58
ciroip, you really don't want me to package it? I honestly don't mind doing so

Oh, N810 led can be controlled via dbus:
http://www.internettablettalk.com/fo...ad.php?t=17024

(But spare a thought for us N800 users please! )

Last edited by qwerty12; 2008-12-19 at 12:29.
 

The Following 2 Users Say Thank You to qwerty12 For This Useful Post:
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#59
Yes, please package it. Users will love having this in extras!
 

The Following 4 Users Say Thank You to pycage For This Useful Post:
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#60
Originally Posted by qwerty12 View Post
ciroip, you really don't want me to package it? I honestly don't mind doing so
I let you decide is just a sharp pain just reading that code, there are wacko use of variable names, random paths, python blasphemies and functions that overlap features. Is just acceptable to watch it run.
It will just save you a lot of headace wait for next release. Now I know how have the thing make some noise I can focus on cleaning up a bit the things. Beside the fun to misue python the application still really need a developer to rewrite everything from scratch
+ plus + my major concern is the way I keep opening new pygame screens for the alarm setting and reloading the graphics over and over.
I have no idea how much pyhton can let me write everything pass trough my mind without any conseguences on the system.
The weekend is here so ill probably have more time to work on the code.
So, If you are really bored or you love digg **** feel free to package it

(But spare a thought for us N800 users please! )
Do you really think I have idea of what is going on? I dont think Ill sacrifice the other tablet versions, (that is another reason why Im scared to use hardware buttons, I have no idea how that could work on different devices, since im writing everything without using any gui (and you are the one in charge of the minumun hildonizing to make it installable) should be pretty compatible with everything have a 800x480 screen that run python+pygame.

Oh, N810 led can be controlled via dbus:
http://www.internettablettalk.com/fo...ad.php?t=17024
Ill take a look and see how much I can understand. I want try an OLD trick popular in the amiga days to make the leds smoothly glowing...
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito

Last edited by ciroip; 2008-12-19 at 15:54.
 

The Following 3 Users Say Thank You to ciroip For This Useful Post:
Reply

Tags
clock, flip clock


 
Forum Jump


All times are GMT. The time now is 03:21.