maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Flip clock pre pre pre pre release (https://talk.maemo.org/showthread.php?t=25582)

fpp 2008-12-17 21:06

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by daperl (Post 249994)
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/

ciroip 2008-12-17 22:05

Re: Flip clock pre pre pre pre release
 
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...:mad:
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
https://garage.maemo.org/frs/downloa...03_sschot1.jpg
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.

daperl 2008-12-17 22:10

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by fpp (Post 250381)
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. :cool:

ciroip 2008-12-17 22:20

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by nilchak (Post 250348)
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

plop 2008-12-17 23:27

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by ciroip (Post 250409)
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...:mad:
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.

ciroip 2008-12-18 15:15

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by plop (Post 250440)
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 :)

ciroip 2008-12-19 09:12

Re: Flip clock pre pre pre pre release
 
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
https://garage.maemo.org/frs/downloa...eenshot004.jpg
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

qwerty12 2008-12-19 12:26

Re: Flip clock pre pre pre pre release
 
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! :))

pycage 2008-12-19 13:08

Re: Flip clock pre pre pre pre release
 
Yes, please package it. Users will love having this in extras! :)

ciroip 2008-12-19 15:40

Re: Flip clock pre pre pre pre release
 
Quote:

Originally Posted by qwerty12 (Post 250846)
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 :)

Quote:

(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.

Quote:

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...


All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8