Spiro

Programming

Even more Pebble adventures ! Now that Skylines was thriving in the Pebble appstore, I decided to generate a watchface for the new Pebble Time, so I had something to show off when my Pebble Time will arrive in August. And what better app could I implement than some colorfull spirographs ?

It took quite a while to finish this : as I didn't had my Pebble Time yet, I had no real hardware to test the app, so I had to rely solely on the Pebble emulator on my computer. Eventually, I came up with a first version which I published on the appstore. However, soon, different people remarked that the app was slow and crash prone. Turned out the app used quite some sine/cosine functions which were the cause of all those slowdowns. Hard to believe that my 20 year old HP pocket calculator was more powerfull than a wearable with a modern ARM chipset !

So it was clear I couldn't use sine/cosine functions. Pebble had a workaround in the SDK with sin_lookup functions which use a precalculated table to come up with this. However, this was mostly oriented to create the movement of analogue watches, and the generated values didn't make any sense to me. So I quickly programmed my own co/sine lookup table, and used the default hypotrochoids equations. This worked a lot better & quicker, but this needed also a lot of iterations to come up with a decent spirograph. And in some cases, the spirograph turned into gibberish. More debugging revealed that this was to events coming in when the Pebble was generating the spirograph, like the flick_wrist_to_update option I added to the watchface.

So eventually, I turned to the default Pebble SDK co/sine_lookup functions, and implemented my own hypotrochoids equations with it. This time, all worked well without any glitches. The result is Spiro, a colorfull watchface for the Pebble Time, and the original Pebble (only in B&W off course)..

Skylines

Programming

Now that my Pebble NMBS app is wrapped up, I decided to have a look at the SDK2 for Pebble, and build a watchface for it. I didn't need to search long for some inspiration for a new watchface : on the Moto360, someone made clever use of the black horizontal bezel at the bottom of the screen, adding some scenery to it, as if it was some shadow (default was a man sitting on a bench in the park). So I took the skyline of Prague, converted it to B&W, and I got my first watchface, which I called Skylines.

The app has been extended currently with skylines up to 30 cities from all over the world. I also included a random mode, where the skyline changes every two hours. Just like you're on a world trip ! I also added a Night mode, where the screen inverts and a beautifull night sky appears between 8pm and 6am.

All in all, programming in C went quite well, considering I didn't touched C during the last 20 years. Only problem was the implementation of the configuration window, which was a bit of a hassle. Turned out I defined my app as SDK3 compatible, which seemed the cause of the errors.

Lenthe

Babies

My daughter Lenthe is now 3 months old, and our sleep habits are slowly returning to their normal hours. I'm used to a limited hours of sleep, but 4 hours was way too less for me !

Pebble NMBS app, version 0.3

Programming

I just build version 0.3 of my Pebble NMBS app, which is the real first beta. I added the station choice as user configuration items in this version. It took quite a while to figure out how to implement this, as the CloudPebble emulator seems not to have the support for testing this. Anyhow, the next steps are adding app metadata, such as official icons and a screen example. And I'll probably need to change its name before I can release this app on the Pebble appstore.

I also remarked that there is already an NMBS app on the appstore although in French. Seems that both apps have quite some similarities, although my app shows more info ;) Anyhow, I like some competition.

After the appstore release, time to dig into PebbleSDK 3.0, so the app will have Timeline support when I'll receive my Pebble Time Steel !

Edit : and it's live on the appstore !

Jessie

Debian

I upgraded my desktop yesterday to Debian 'Jessie' 8.0. Can't say it went smoothly. First of all, lot of packages got deleted; no biggie there, easily reinstalled. However, the kernel didn't got upgraded, which caused quite some problems during first boot. The worst part however, was that I was using an incompatible Gnome theme. This did cause segfaults of many Gnome applications, such as gnome-terminal. Quite strange that Gnome cannot catch those kind of exceptions. I would expect that Gnome would revert to a default theme in those cases.

It took a while to find the cause of that (adding a new user and charging up a desktop succeeded fine, so I knew this was a user config error); in the end, the next couple of lines fixed all of my issues :

$ gsettings set org.gnome.desktop.interface gtk-theme Ambiance
$ gsettings set org.gnome.desktop.wm.preferences theme Radiance

Shame that Gnome 3 is so ugly. Why all that grey-black,and those rounded message boxes ? I really miss the days of Gnome 2's default look and the Ubuntu Netbook Remix interface...

Pages

Subscribe to Kristof.Willen.be RSS