InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.64k stars 907 forks source link

Add a "PineBoy" watch face in a style of Fallout's PipBoy #1750

Open ironsmile opened 1 year ago

ironsmile commented 1 year ago

The watch face includes everything that the Digital watch face provides and more. Most notably it makes a difference between "enabled", "disabled" and "paired" states of the Bluetooth. Next, it includes the battery charge as a text too.

This face tries to display a Pip Boy image from the flash memory. It searches for /imgs/pine-boy-icon.bin. If no such file is found then it displays a simple rectangle instead.

Note that the Pip Boy image is NOT included and users are expected to add it by themselves using the resources upload mechanism provided by companion apps.

This is how the face looks like when the a boy image has been uploaded

InfiniSim_2023-04-23_105148

And here it is without one

InfiniSim_2023-04-23_105546

And lastly, here's a photo of it running on an actual watch

first-version-1024

Instructions For Adding An Icon

Find yourself the boy image you would want to display. A good resolution for an image would be 42x82px.

Then use lv_img_conv or the lvgl online convertor to convert it to a .bin file. You have to use the color format "CF_TRUE_COLOR" or "CF_TRUE_COLOR_ALPHA" and output format "Binary RGB565 Swap".

Then create a resource file which includes the converted image under the name /imgs/pine-boy-icon.bin. This is my resources.json:

{
    "resources": [
        {
            "filename": "imgs/pine-boy-icon.bin",
            "path": "/imgs/pine-boy-icon.bin"
        }
    ],
    "obsolete_files": []
}

And lastly use a companion app to send the the resource image to the watch. I've used Watchmate on my PinePhone and it works great.

github-actions[bot] commented 1 year ago

Build checks have not completed. Possible reasons for this are:

  1. The checks need to be approved by a maintainer
  2. The branch has conflicts
  3. The firmware build has failed
ironsmile commented 1 year ago

I rebased the code to the latest main branch.

JF002 commented 1 year ago

@ironsmile Thank you for this contribution, the watch face looks really good !

Poslovitch commented 11 months ago

I'm interested in this watchface. Is there anything I could do to help it get merged?

ironsmile commented 11 months ago

Unfortunately my PineTime broke recently. I will have to either fix it or get a new one before I could be of much help.

Commenter25 commented 6 months ago

Could the color be configurable, at the very least to amber like New Vegas? And (if one was willing to use up the resources space) could the image be animated? (this is more a curiosity of what's possible than a request)