handdrawn-watchface

Crates.iohanddrawn-watchface
lib.rshanddrawn-watchface
version2.1.1
sourcesrc
created_at2020-10-21 08:08:00.391169
updated_at2020-10-23 01:27:07.164102
descriptionHand-Drawn Watch Face for Mynewt on PineTime Smart Watch
homepage
repositoryhttps://github.com/lupyuen/handdrawn-watchface
max_upload_size
id303775
size11,333,574
Lup Yuen Lee (lupyuen)

documentation

https://docs.rs/handdrawn-watchface

README

Hand-Drawn Watch Face for Rust + Mynewt on PineTime Smart Watch

Hand-Drawn Watch Face for Rust + Mynewt on PineTime Smart Watch

Preview this Watch Face in your web browser

Hand-drawn Rust Watch Face for PineTime Smart Watch with LVGL and Mynewt...

  1. Bluetooth LE Time Sync

  2. Time only, no date

  3. Digits rendered as bitmaps (See the graphics assets)

Built with pinetime-watchface framework for watch faces.

To select this watch face in the pinetime-rust-mynewt firmware...

  1. Add handdrawn-watchface to pinetime-rust-mynewt/rust/app/Cargo.toml

  2. Set WatchFaceType in pinetime-rust-mynewt/rust/app/src/lib.rs

    /// Declare the Watch Face Type
    type WatchFaceType = handdrawn_watchface::HandDrawnWatchFace;
    

The bitmaps occupy 160 KB of ROM. To fit them into PineTime's 512 KB Flash ROM, the large title font needs to be removed from the PineTime firmware build, leaving only the small font. (No changes needed for the WebAssembly Simulator)

To remove the title font from the PineTime firmware build, edit pinetime-rust-mynewt/libs/pinetime_lvgl_mynewt/lv_conf.h and change...

#define LV_FONT_MONTSERRAT_48 1
...
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_48

To...

#define LV_FONT_MONTSERRAT_48 0
...
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_24

The WebAssembly Simulator for this watch face was auto-generated by a GitHub Actions Workflow: simulator.yml

Source code for the WebAssembly Simulator is at the mynewt branch of github.com/AppKaki/lvgl-wasm

Refer to the article...

"Create Your Own PineTime Watch Face in Rust... And Publish on crates.io"

Commit count: 103

cargo fmt