pebble-hacks / aviator

Aviator Watchface
24 stars 3 forks source link

"Show Hands" setting #2

Closed orviwan closed 10 years ago

orviwan commented 10 years ago

This setting should display minute and hour hands (arrows) on the clock face.

The rotation code doesn't work correctly and is currently commented out.

Jnmattern commented 10 years ago

Hi again,

I've played with GPaths to try to display the second and minute hands but they are too tiny and looks really awful after rotations. I also tried to draw predefined bitmaps for the first 8 seconds/minutes (0 to 7), and that does not look good at all either.

I think the best here is to use circles for the minute et second hands instead of arrows, as they would always look the same wherever they are drawn, but it would slightly differ from the original concept. I thought about a 3 pixel radius white filled circle for the minute hand and a 2 pixel black filled/white outlined circle for the second hand.

Just tell me what you think, I can code this quite easily when I fond some time!

orviwan commented 10 years ago

Yes please!

I was going to try paths next, but it would take me a while I'm sure.

Feel free to mail me an example when you get chance.

Thanks

Ps. Was my attempt at rotbitmap even close? I'd love to know what I was doing wrong.

On 20 Jan 2014, at 18:07, Jnmattern notifications@github.com wrote:

Hi again,

I've played with GPaths to try to display the second and minute hands but they are too tiny and looks really awful after rotations. I also tried to draw predefined bitmaps for the first 8 seconds/minutes (0 to 7), and at does not look good at all either.

I think the best here is to use circles for the minute et second hands instead of arrows, as they would always look the same wherever they are drawn, but it would slightly differ from the original concept. I thought about a 3 pixel radius white filled circle for the minute hand and a 2 pixel black filled/white outlined circle for the second hand.

Just tell me what you think, I can code this quite easily when I fond some time!

— Reply to this email directly or view it on GitHubhttps://github.com/pebble-hacks/aviator/issues/2#issuecomment-32782841 .

Jnmattern commented 10 years ago

Ok, I'll give it a try when I have time. Also, don't take this personally or badly (I don't even know if it sounds correct in english - BTW, I'm French :o) ), but would you mind if I rewrite some parts of your code? Some things are confusing to me, and I think some parts could be simpler and easier to read with a bit of revamping.

Just tell me, I'll spend about 8 hours in trains on wednesday and thursday so I could play a little bit with this!

orviwan commented 10 years ago

Your English is great! Better than many English people :)

Please feel free to make it better, I threw it together bit by bit and I'm not a software developer. I know a bit of C#, JavaScript and php, just enough to make things hard to read.

I definitely won't take it personally and it will help me improve my own skills.

Thanks!

On 20 Jan 2014, at 18:57, Jnmattern notifications@github.com wrote:

Ok, I'll give it a try when I have time. Also, don't take this personally or badly (I don't even know if it sounds correct in english - BTW, I'm French :o) ), but would you mind if I rewrite some parts of your code? Some things are confusing to me, and I think some parts could be simpler and easier to read with a bit of revamping.

Just tell me, I'll spend about 8 hours in trains on wednesday and thursday so I could play a little bit with this!

— Reply to this email directly or view it on GitHubhttps://github.com/pebble-hacks/aviator/issues/2#issuecomment-32786786 .

Jnmattern commented 10 years ago

Le 20 janv. 2014 à 20:16, orviwan notifications@github.com a écrit :

Your English is great! Better than many English people :)

I'm flattered, but you'd better not ear me speak english then :)

Please feel free to make it better, I threw it together bit by bit and I'm not a software developer. I know a bit of C#, JavaScript and php, just enough to make things hard to read.

I don't know C#, but I do know Javascript and php. Php can be rather good looking and straightforward, but Javascript is just brainfuck :o) I'll try to rewrite everything from the start, keeping the functionalities.

I definitely won't take it personally and it will help me improve my own skills.

I'm flattered again, but I really don't feel like a "best practice" coder!

Thanks!

You welcome, all this stuff reminds me of my youth when developing was my everyday job. It's good to get my hand dirty again!

Cheers,

Jnm.

On 20 Jan 2014, at 18:57, Jnmattern notifications@github.com wrote:

Ok, I'll give it a try when I have time. Also, don't take this personally or badly (I don't even know if it sounds correct in english - BTW, I'm French :o) ), but would you mind if I rewrite some parts of your code? Some things are confusing to me, and I think some parts could be simpler and easier to read with a bit of revamping.

Just tell me, I'll spend about 8 hours in trains on wednesday and thursday so I could play a little bit with this!

— Reply to this email directly or view it on GitHubhttps://github.com/pebble-hacks/aviator/issues/2#issuecomment-32786786 . — Reply to this email directly or view it on GitHub.

cjwilliams commented 10 years ago

BTW, I checked and although we plan to deprecate rot_bitmap_layer in the future because of high CPU usage, we don't have a viable replacement for 2.0, so it is still available and not deprecated (yet). I've logged a bug internally for the documentation that is missing from the API docs

Jnmattern commented 10 years ago

Ok, I've pushed a version including the minute & second hands as little circles. It's not as good looking as arrows, but it always look the same :)

Now I'll try using the rot_bitmap_layers, to see what it looks like, but if you compile and install the wtachface using the current source code and enable minute & second hands display you'll see that sometimes it freezes a little bit then jumps several seconds forward (at least on my pebble), so I think I'll have a deeper look at the code and try to optimize a little bit. Maybe one way to optimize is to use one unique Layer and draw digits using graphics_draw_bitmaps_in_rect instead of a bunch of BitmapLayers for each digit.

I'll investigate!

Off-topic, but I couldn't figure out why the zulu_tick_time is not correctly set if the section is commented out. I tried different things and without a useless call to localtime or APP_LOG (which I think calls localtime, explaining why it makes it work) the displayed zulu time is the same as the local one. Cherie, if you happen to read this, maybe you could show it to the devs. I'm not sure it's a bug, but there is something really strange. See lines 532 to 538 in Aviator.c.

orviwan commented 10 years ago

This is great! I'm going to have to wrap my head around the math.

I'm not sure about the optimisations side of things, but I'm happy for you to proceed if it will make things more efficient.

Worth noting this will be Hours/Minutes hands, I assume it's just easier to test with Minutes/Seconds.

I suppose we could have a Second hand, if seconds and hands are both enabled in the settings.

I'm glad the Zulu time issue wasn't just me, I thought I was going insane :)

Jnmattern commented 10 years ago

Yeah, sorry for the seconds, this was to test it and I forgot to rename and change to hours, sorry, I'll do this. I'll also try to reproduce the zulu time problem on a separate watchface to try to isolate the cause.

BTW, I reworked the background images (but they're on my personal computer, not on this work laptop) as I noticed when working on the minute hands that the watch dial isn't round (taller than it is wider). I will upload them asap, though not critical :)

Jnm.

orviwan commented 10 years ago

Fixed and awesome!