View Single Post
Old 04-24-2012, 02:21 AM   #1
kiri87
Member
kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.
 
Posts: 16
Karma: 25544
Join Date: Feb 2012
Device: Kindle 3
kTimepiece - A clock application for kindle

Here is a little application I've been working on this weekend. It's just something I wanted on my kindle for a long time. It basically draws a simple clock on screen, and updates it every second/minute.
Most of the code is based on geekmaster's dithermatron, although I admit that I using just a little of the magic that the code offers.
The center of the clock is cleared and the hands are redrawn at each update; the background is drawn from an external file when you start the app.
(After the screensaver kicks in, in no longer gets updated, so it would be a good idea to use ~disableScreensaver to prevent that. ) - not anymore.
The background image location is hardcoded, so you have to put the binary and the .png file on the root folder. (/mnt/us/)
I know it's not very advanced, (it's kinda reinventing the wheel), and there are still things that could improve, but I decided to share this with you.

Update: Added launchpad actions to start/kill clock, and prevent screensaver. Use T S to start and T Q to quit.

TODO:
- Keep track of the pixels drawn in the previous loop, so only those are cleared.
- Flash the central part each hour to remove ghosting.
- Un-hardcode the background image location, so it can be moved to a separate folder.

Enjoy.
Attached Thumbnails
Click image for larger version

Name:	screen_shot-22728.gif
Views:	1246
Size:	28.1 KB
ID:	85657   Click image for larger version

Name:	screen_shot-50078.gif
Views:	1191
Size:	51.6 KB
ID:	85660  
Attached Files
File Type: zip kTimepiece.zip (165.3 KB, 536 views)

Last edited by kiri87; 04-29-2012 at 03:33 PM.
kiri87 is offline   Reply With Quote