|
2009-02-09
, 16:19
|
Posts: 631 |
Thanked: 837 times |
Joined on May 2007
@ Milton, Ontario, Canada
|
#203
|
The Following User Says Thank You to jolouis For This Useful Post: | ||
|
2009-02-09
, 17:13
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#204
|
ciroip, the progress looks awesome, can't wait to give the thing a try on my tablet here! Did you ever get around to solving the power issues (stop updating/etc when the tablet dims) or was that part of the battery monitoring stuff that you gave up on? Just curious...
[...]..
(and when's the "widget" based on this badboy for that new awesome looking liqbase coming out?? ;o) )
The Following User Says Thank You to ciroip For This Useful Post: | ||
|
2009-02-09
, 21:46
|
Posts: 631 |
Thanked: 837 times |
Joined on May 2007
@ Milton, Ontario, Canada
|
#205
|
pygame.time.set_timer(CLOCK_EVENT, 10000) # Main LOOP 'trigger event' each 60 secs
ctime = time.ctime() pygame.time.set_timer(CLOCK_EVENT, (60-int(str(ctime[17])+str(ctime[18])))*1000)
elif event.type == ci.CLOCK_EVENT: ####################### UPDATE ############### # And again, here clear the old timer, and update it after clock redraw to make sure it occurs # again at exactly the right time #Clear the current timer ci.pygame.time.set_timer(ci.CLOCK_EVENT, 0) ci_clock.clock() #OK, update has done, so recalculate time till next minute and use that to set next event ctime = time.ctime() ci.pygame.time.set_timer(ci.CLOCK_EVENT, (60-int(str(ctime[17])+str(ctime[18])))*1000) ###################### DONE UPDATE #############
|
2009-02-09
, 21:59
|
|
Posts: 1,635 |
Thanked: 1,816 times |
Joined on Apr 2008
@ Manchester, England
|
#206
|
liqbase: I salivate everytime I watch Gary's works. I really wish I could use some of his code, (or let him use something ) but I believe he is a perfectionist and he probably dont want release his beasts too early
|
2009-02-10
, 01:17
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#207
|
Hey Ciro,
, as I noticed your were updating the clock display every 10 seconds which was wasting CPU:
in ci_init.py, you had
last time I looked 10,000 milliseconds != 60 seconds ;-) Anyways, not sure why you went to that approach instead of the more accurate one suggested earlier:Code:pygame.time.set_timer(CLOCK_EVENT, 10000) # Main LOOP 'trigger event' each 60 secs
[...]
The Following User Says Thank You to ciroip For This Useful Post: | ||
|
2009-02-10
, 01:42
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#208
|
not a perfectionist, I just make sure I can handle everything required first.
The little clock you see on the video is actually called "ciroclock.c" in source here.
It will be filled up with your data and stuff and will be your own personalized example of using liqbase
|
2009-02-15
, 00:09
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#209
|
|
2009-02-17
, 21:26
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#210
|
How did you get those custom Panel tabs on left side?