|
It is currently Wed Jul 06, 2011 7:12 pm
|
View unanswered posts | View active topics
 |
|
 |
|
| Author |
Message |
|
hudson
|
Post subject: Flip clock, animated (Day 21)  Posted: Sat May 14, 2011 3:13 pm |
Joined: Sun Feb 27, 2011 11:32 am Posts: 71
|
Today is an update to Thursday's flip clock, now with animated flipping effects. To make it more realistic the numbers must pass through all intermediate ones when the mode is switched, sort of like the old-style train station displays. I figured out how to read the resources structure at 0x40000 in spiflash. It turns out that it was much easier than I had thought: typedef struct { uint8_t type; // 00 == NULL, 01 == image, 02 == font uint32_t offset; // in big endian. uint8_t height; uint8_t width; uint8_t unknown2; // always 0? } __attribute__((__packed__)) inpulse_resource_t;
static uint32_t get_image_offset( PulseResource id ) { inpulse_resource_t resource; spiflash_read( SPIFLASH_BASE + id * sizeof(resource), &resource, sizeof(resource) );
// Should probably check resource.type == 01 return resource.offset; }
Video: http://www.flickr.com/photos/osr/571984 ... 084215019/Source: https://bitbucket.org/hudson/watches/src/tip/flip-anim/
|
|
|
|
 |
|
hetugi
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Sun May 22, 2011 2:23 am |
Joined: Sun May 22, 2011 1:59 am Posts: 3
|
|
Please give me more information about compil.
When I did "C:\Python26\python.exe compileandload.py -c", the result was compile failed.
I got src from "http://inpulsewatch.com/watchapps.asp" and replaced src & resources folders.
I can't find app_resources.h What should I do?
----------------------------------------------- Error log ----------------------------------------------- use correct syntax all .c files must be in src/ and all .h files in include/ Use a flat directory structure, no directories in src/ or include/ at this moment File added: include\pulse_os.h File added: include\pulse_types.h File added: src\draw.c File added: src\draw.h File added: src\flip.c File added: src\main.c File added: src\main.h File added: src\Makefile File added: src\resources.h File added: src\spiflash.h
uuID= d7acc674-adf2-44ca-9ccb-ebad5218539a
arm-none-eabi-gcc -o build/pulse_app -Iinclude -std=gnu99 -g -Os -Wall -Wno-format -fno-builtin -mcpu=arm7tdmi-s -march=armv4t -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -DNDEBUG -Wno-unused-parameter -Tlib/obj/firmware.ld -Wl,--cref -Wl,--gc-sections -Wl,-Map=build/pulse_app.map,-\( lib/libapp_common.a lib/libbtstack.a lib/libdebug.a lib/libkernel.a lib/libpulse_os.a lib/libpulse_protocol.a lib/libpulse_widgets.a lib/obj/irq.o lib/obj/kernel_struct.o src/draw.c src/flip.c src/main.c -lgcc -Wl,-\) In file included from src/draw.c:4: src/draw.h:10: fatal error: resources.h: No such file or directory compilation terminated. In file included from src/flip.c:5: src/main.h:11: fatal error: app_resources.h: No such file or directory compilation terminated. In file included from src/main.c:13: src/main.h:11: fatal error: app_resources.h: No such file or directory compilation terminated. make: *** [pulse_app] Error 1
compile failed.
Compile failed. See error report above
-----------------------------------------------
Last edited by hetugi on Mon May 23, 2011 5:47 am, edited 2 times in total.
|
|
|
|
 |
|
hudson
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Sun May 22, 2011 6:56 am |
Joined: Sun Feb 27, 2011 11:32 am Posts: 71
|
hetugi wrote: I can't find app_resources.h app_resources.h is not checked in since it is built by the resource packer. The file that you seem to be missing is resources.h. Did you do an 'hg clone" from ajwitte's tree or mine?
|
|
|
|
 |
|
hetugi
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Mon May 23, 2011 5:57 am |
Joined: Sun May 22, 2011 1:59 am Posts: 3
|
|
Thank you for answering. >Did you do an 'hg clone" from ajwitte's tree or mine? Yes.
>The file that you seem to be missing is resources.h. You're right. I wrote a wrong log.
>app_resources.h is not checked in since it is built by the resource packer. Thank you for teaching. I did not know "resource packer". I examine the usage of "resource packer". \pulse_sdk\tools\resource_packer
------------------------ Correct log ------------------------ src/draw.h:10: fatal error: app_resources.h: No such file or directory compilation terminated. In file included from src/flip.c:5: src/main.h:11: fatal error: app_resources.h: No such file or directory compilation terminated. In file included from src/main.c:13: src/main.h:11: fatal error: app_resources.h: No such file or directory compilation terminated. ------------------------
|
|
|
|
 |
|
hetugi
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Wed May 25, 2011 6:05 am |
Joined: Sun May 22, 2011 1:59 am Posts: 3
|
|
I'm sorry for questioning many times.
I can't find "spi_resources.h"
I use C:\Python26\python.exe tools/resource_packer/resource_packer.py Get "inpulse_resources.bin" "app_resources.h" However , I can't find "spi_resources.h".
What should I do next ?
--------- Err log --------- src/spiflash.h:20: fatal error: spi_resources.h: No such file or directory
|
|
|
|
 |
|
Eric
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Wed May 25, 2011 6:44 am |
Joined: Mon Feb 14, 2011 7:07 pm Posts: 172
|
Hi Hetugi, are you simply trying to load this app on your watch, or are you aiming to customize it in some way? If you just want to load it on your watch, you can find the binary directly here: https://bitbucket.org/ajwitte/watches/s ... flip-anim/
_________________ ---
Lead designer of inPulse
|
|
|
|
 |
|
setyono
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Tue Jun 14, 2011 7:09 pm |
Joined: Mon May 16, 2011 4:13 pm Posts: 4
|
|
Sorry for the total newbie question... Can you please direct me to a guide for installing the .bin file? Using a mac here.
Also, does installing these watch apps mean I won't get notifications from blackberry anymore? And how would I go back to install the notification app again?
Thanks
Robin
|
|
|
|
 |
|
Eric
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Thu Jun 16, 2011 4:32 pm |
Joined: Mon Feb 14, 2011 7:07 pm Posts: 172
|
We're going to be releasing a Blackberry app that allows you to easily install these apps on your watch (and then switch back to the notifications app). Might be best to hold out for that! If you'd like to get started right away, you could check out the getting started guide www.getinPulse.com/guide and select the guide for your OS.
_________________ ---
Lead designer of inPulse
|
|
|
|
 |
|
Johan
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Thu Jun 16, 2011 5:07 pm |
Joined: Fri Mar 04, 2011 8:54 pm Posts: 82
|
|
Since Android has now overtaken RIM in number of smartphone users, you might want to consider changing your focus. If RIM doesn't change their strategy soon, we'll all be talking soon how a Blackberry phone used to be a cool gadget to have. While we used to swear by Blackberry, none of the phones on our corporate plan are actually a Blackberry (nearly all iPhones or Android).
_________________
 Get the most out of your watch - http://www.inpulsewatch.com
|
|
|
|
 |
|
setyono
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Fri Jun 17, 2011 5:31 am |
Joined: Mon May 16, 2011 4:13 pm Posts: 4
|
|
Eric, is the timeframe of the app release like a "hold your breath" time frame, or the "RIM is rumored to be making BBM available for androids in the near future" kind of of time frame? Wouldn't want to wait too long
I did some programming back in the days, and the watch seems like a fun project to get back to some minor programing projects... If only i can find the time *sigh*
(to answer my question, at this stage, installing any other app will make me lose the notifications, correct?)
thanks
Robin
|
|
|
|
 |
|
Eric
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Fri Jun 17, 2011 8:37 am |
Joined: Mon Feb 14, 2011 7:07 pm Posts: 172
|
|
Installing a different watch app will usually halt notifications, unless the developer has taken them into consideration and displays them on screen.
We're talking a small number of weeks here, not some kind of RIM 'sure playbooks can run angry birds...' thing. Though I really do want to be able to run angry birds on my PB!
_________________ ---
Lead designer of inPulse
|
|
|
|
 |
|
setyono
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Sat Jun 18, 2011 3:52 am |
Joined: Mon May 16, 2011 4:13 pm Posts: 4
|
Eric, thanks for the info. I finally managed to upload the .bin files through windows. Uploading the resources.bin on mac somehow kept failing. Anyway, you might want to update the getting started guide for mac to include how to upload packaged files as well (they are available for windows and linux, but it wasn't explained in the mac section  ) Thanks
|
|
|
|
 |
|
Eric
|
Post subject: Re: Flip clock, animated (Day 21)  Posted: Mon Jun 20, 2011 7:40 pm |
Joined: Mon Feb 14, 2011 7:07 pm Posts: 172
|
|
Good point, Setyono! We need to update those docs in general as well...
_________________ ---
Lead designer of inPulse
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|