Coder Social home page Coder Social logo

clach04 / watchface_rockeyaoe Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 304 KB

Idea from https://www.reddit.com/r/pebble/comments/3qcy9t/watchface_request_simple_time_date_with_specific/

License: Apache License 2.0

CSS 23.86% HTML 12.20% C 41.63% JavaScript 8.87% C++ 8.79% Python 4.66%

watchface_rockeyaoe's Introduction

Watchface Framework

Working, ready to build Bare-Bones watch face for Pebble (OG/Classic, Time, and Round) Aplite, Basalt, and Chalk. With configuration and settings support.

Instructions

  1. Copy (or clone) into your project. Click https://cloudpebble.net/ide/import/github/clach04/watchface_framework/ to import
  2. Create a new uuid (in CloudPebble generate one with a single button push under settings) - see appinfo.json
  3. Compile and run!

Then start adding options and resources. By default the empty framework will:

  • Display date - using system font
  • Display time, updating once per minute- using system font
  • Display Battery power
  • Display notice when Bluetooth is disconnected
  • Have a config/settings option on Phone to configure:
    • Time/date/etc. text color
    • Background color
    • Whether to vibrate on Bluetooth disconnect (default is do not vibrate)

There is no default icon, add a 28x28 resource and declare it as an icon, see http://developer.getpebble.com/guides/pebble-apps/resources/image-resources/

Additional options

In an ideal situation, watchface.c and watchface.h should not need editing ever. There may be cases where main.c needs editing. Most of the time watch_config.h is the only file that will need editing. watch_config.h options:

  • If DEFAULT_TIME_COLOR is defined it will be used for the default time color.
  • If DEFAULT_TIME_COLOR is defined it will be used for thedefault background time color.
  • If an image is present under resources and defined as BG_IMAGE, it will be used as a background image. For Basalt, image transparency is honored.
  • If a font present under resources and defined as FONT_NAME, it will be used for displaying the time.
  • If FONT_SYSTEM_NAME is defined to a system font name and FONT_NAME is not defined, that system font will be used for time display
  • if REMOVE_LEADING_ZERO_FROM_TIME is defined, and the watch is configured for 12 hour format display, the leading zero "0" will be removed for times in the morning.
  • CLOCK_POS, BT_POS, DATE_POS, and BAT_POS to change the on screen position of Time, Bluetooth disconnect message, Date, and battery power.
  • FONT_BT_SYSTEM_NAME, FONT_BAT_SYSTEM_NAME, and FONT_DATE_SYSTEM_NAME can override the system font used.
  • BT_ALIGN, BAT_ALIGN, and TIME_ALIGN are used to change alignment.
  • If BLUETOOTH_DISCONNECTED_STR is defined, this text will be displayed for the Bluetooth disconnect message.
  • If DATE_FMT_STR is defined it will be used for the format of the date text.
  • If BAT_FMT_STR is defined it will be used for the format of the battery power text.
  • NO_BLUETOOTH, NO_BATTERY, and NO_DATE will disable display of bluetooth disconnect, battery status, and date.

Examples

watchface_rockeyaoe's People

Contributors

clach04 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.