Fix missing documentation for many clock faces:
* Move from .c to .h as needed for consistency. * When missing from both, copy from pull request or wiki. * When missing entirely, infer functionality from source code.
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2023 Wesley Ellis <https://github.com/tahnok>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "beats_face.h"
|
||||
|
||||
@@ -1,6 +1,41 @@
|
||||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2023 Wesley Ellis <https://github.com/tahnok>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef BEATS_FACE_H_
|
||||
#define BEATS_FACE_H_
|
||||
|
||||
/*
|
||||
* BEATS TIME face
|
||||
*
|
||||
* The Beat Time face displays the current Swatch Internet Time, or .beat time.
|
||||
* This is a decimal time system that divides the day into 1000 beats.
|
||||
*
|
||||
* The three large digits in the bottom row indicate the current beat, and the
|
||||
* two smaller digits (normally the seconds in Simple Clock) indicate the
|
||||
* fractional beat; so for example you can read “67214” as “beat 672.14”.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -25,10 +25,8 @@
|
||||
#ifndef DECIMAL_TIME_FACE_H_
|
||||
#define DECIMAL_TIME_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
/*
|
||||
* DECIMAL TIME FACE
|
||||
* DECIMAL TIME face
|
||||
*
|
||||
* This face presents the current time as hours and hundredths of an hour. Every hundreth of an hour, or "centihour",
|
||||
* occurs every 36 seconds. Because they range from 0 to 99, centihours, in the seventies range, will be displayed with a lowercase 7.
|
||||
@@ -46,9 +44,10 @@
|
||||
* https://hr.colostate.edu/minute-to-decimal-conversion-chart/
|
||||
*
|
||||
* Many thanks go to Joey Castillo for making this project happen.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
bool chime_enabled; // did the user enable hourly chime for this face?
|
||||
uint8_t features_to_show : 2 ; // what features are to be displayed?
|
||||
|
||||
@@ -25,6 +25,32 @@
|
||||
#ifndef MARS_TIME_FACE_H_
|
||||
#define MARS_TIME_FACE_H_
|
||||
|
||||
/*
|
||||
* MARS TIME face
|
||||
*
|
||||
* This watch face is dedicated to Martian timekeeping.
|
||||
* It has several modes, and can display either a time or a date.
|
||||
*
|
||||
* Pressing the ALARM button cycles through different time zones on Mars:
|
||||
* MC - Mars Coordinated Time, the time at Airy-0 Crater on the Martian prime meridian
|
||||
* ZH - Local mean solar time for the Zhurong rover
|
||||
* PE - LMST for the Perseverance rover
|
||||
* IN - LMST for the Insight lander
|
||||
* CU - LMST for the Curiosity rover
|
||||
*
|
||||
* Press the LIGHT button to toggle between displaying time and date:
|
||||
* MC S - the Mars Sol Date, Martian days since December 29, 1873
|
||||
* ZH Sol - Mission sol for the Zhurong rover
|
||||
* PE Sol - Mission sol for the Perseverance rover
|
||||
* IN S - Mission sol for the InSight lander
|
||||
* CU S - Mission sol for the Curiosity rover
|
||||
*
|
||||
* Note that where the mission sol is below 1000, this watch face displays
|
||||
* the word “Sol” on the bottom line. When the mission sol is over 1000, the
|
||||
* word “Sol” will not fit and so it displays a stylized letter S at the top
|
||||
* right.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#ifndef REPETITION_MINUTE_FACE_H_
|
||||
#define REPETITION_MINUTE_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
/*
|
||||
* REPETITION MINUTE face
|
||||
*
|
||||
* A hopefully useful complication for friendly neighbors in the dark
|
||||
*
|
||||
* Originating from 1676 from reverend and mechanician Edward Barlow, and
|
||||
@@ -40,7 +40,6 @@
|
||||
* before widespread artificial illumination, to allow the time to be determined
|
||||
* in the dark, and were also used by the visually impaired.
|
||||
*
|
||||
*
|
||||
* How to use it :
|
||||
*
|
||||
* Long press the light button to get an auditive reading of the time like so :
|
||||
@@ -51,9 +50,10 @@
|
||||
* Prerequisite : a watch with a working buzzer
|
||||
*
|
||||
* ~ Only in the darkness can you see the stars. - Martin Luther King ~
|
||||
*
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t previous_date_time;
|
||||
uint8_t last_battery_check;
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#ifndef SIIMPLE_CLOCK_BIN_LED_FACE_H_
|
||||
#define SIIMPLE_CLOCK_BIN_LED_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
/*
|
||||
* BINARY LED CLOCK FACE
|
||||
*
|
||||
* A "fork" of the simple clock face, which provides the functionality of showing
|
||||
* the current time by flashing the LED using binary representation.
|
||||
*
|
||||
@@ -49,6 +49,8 @@
|
||||
* represents 1.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t previous_date_time;
|
||||
uint8_t last_battery_check;
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
#ifndef SIMPLE_CLOCK_FACE_H_
|
||||
#define SIMPLE_CLOCK_FACE_H_
|
||||
|
||||
/*
|
||||
* SIMPLE CLOCK FACE
|
||||
*
|
||||
* Displays the current time, matching the original operation of the watch.
|
||||
* This is the default display mode in most watch configurations.
|
||||
*
|
||||
* Long-press ALARM to toggle the hourly chime.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
#ifndef WEEKNUMBER_CLOCK_FACE_H_
|
||||
#define WEEKNUMBER_CLOCK_FACE_H_
|
||||
|
||||
/*
|
||||
* WEEK-NUMBER WATCH FACE
|
||||
*
|
||||
* Same as simple clock, but has iso 8601 week number instead of seconds counter.
|
||||
*
|
||||
* Long-press ALARM to toggle the hourly chime.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -23,79 +23,6 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* World Clock 2
|
||||
* =============
|
||||
*
|
||||
* This is an alternative world clock face that allows the user to cycle
|
||||
* through a list of selected time zones. It extends the original
|
||||
* implementation by Joey Castillo. The face has two modes *display mode*
|
||||
* and *settings mode*.
|
||||
*
|
||||
* ### Settings mode
|
||||
*
|
||||
* When the clock face is activated for the first time, it enters
|
||||
* *settings mode*. Here, the user can select the time zones they want to
|
||||
* display. The face shows a summary of the current time zone:
|
||||
*
|
||||
* - The top of the face displays the first two letters of the time zone
|
||||
* abbreviation, such as "PS" for Pacific Standard Time or CE for
|
||||
* "Central European Time".
|
||||
*
|
||||
* - The upper-right corner shows the index number of the time zone. This
|
||||
* helps avoid confusion when multiple time zones have the same
|
||||
* two-letter abbreviation.
|
||||
*
|
||||
* - The main display shows the offset from UTC, with a "+" indicating a
|
||||
* positive offset and a "-" indicating a negative offset. For example,
|
||||
* the offset for Japanese Standard Time is displayed as "+9:00".
|
||||
*
|
||||
* The user can navigate through the time zones and select them using the
|
||||
* following buttons:
|
||||
*
|
||||
* - The *alarm button* moves forward to the next time zone, while the
|
||||
* *light button* moves backward to the previous zone. This way, the
|
||||
* user can cycle through all 41 supported time zones.
|
||||
*
|
||||
* - A *long press* on the *light button* selects the current time zone,
|
||||
* and the signal indicator appears at the top left. Another *long
|
||||
* press* of the *light button* deselects the time zone.
|
||||
*
|
||||
* - A *long press* on the *alarm button* exits settings mode and returns
|
||||
* to display mode.
|
||||
*
|
||||
* ### Display mode
|
||||
*
|
||||
* In the display mode, the face shows the time of the currently selected
|
||||
* time zone. The face includes the following components:
|
||||
*
|
||||
* - The top of the face displays the first two letters of the time zone
|
||||
* abbreviation, such as "PS" for Pacific Standard Time or "CE" for
|
||||
* Central European Time.
|
||||
*
|
||||
* - The upper-right corner shows the current day of the month, which
|
||||
* helps indicate time zones that cross the international date line
|
||||
* with respect to the local time.
|
||||
*
|
||||
* - The main display shows the time in the selected time zone in either
|
||||
* 12-hour or 24-hour form. There is no timeout, allowing users to keep
|
||||
* the chosen time zone displayed for as long as they wish.
|
||||
*
|
||||
* The user can navigate through the selected time zones using the
|
||||
* following buttons:
|
||||
*
|
||||
* - The *alarm button* moves to the next selected time zone, while the
|
||||
* light button moves to the *previous zone*. If no time zone is
|
||||
* selected, the face simply shows UTC.
|
||||
*
|
||||
* - A *long press* on the *alarm button* enters settings mode and
|
||||
* enables the user to re-configure the selected time zones.
|
||||
*
|
||||
* - A *long press* on the *light button* activates the LED illumination
|
||||
* of the watch.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "world_clock2_face.h"
|
||||
|
||||
@@ -26,6 +26,65 @@
|
||||
#ifndef WORLD_CLOCK2_FACE_H_
|
||||
#define WORLD_CLOCK2_FACE_H_
|
||||
|
||||
/*
|
||||
* WORLD CLOCK 2
|
||||
*
|
||||
* This is an alternative world clock face that allows the user to cycle
|
||||
* through a list of selected time zones. It extends the original
|
||||
* implementation by Joey Castillo. The face has two modes: display mode
|
||||
* and settings mode.
|
||||
*
|
||||
* Settings mode
|
||||
*
|
||||
* When the clock face is activated for the first time, it enters settings
|
||||
* mode. Here, the user can select the time zones they want to display. The
|
||||
* face shows a summary of the current time zone:
|
||||
* * The top of the face displays the first two letters of the time zone
|
||||
* abbreviation, such as "PS" for Pacific Standard Time or CE for
|
||||
* "Central European Time".
|
||||
* * The upper-right corner shows the index number of the time zone. This
|
||||
* helps avoid confusion when multiple time zones have the same two-letter
|
||||
* abbreviation.
|
||||
* * The main display shows the offset from UTC, with a "+" indicating a
|
||||
* positive offset and a "-" indicating a negative offset. For example,
|
||||
* the offset for Japanese Standard Time is displayed as "+9:00".
|
||||
*
|
||||
* The user can navigate through the time zones and select them using the
|
||||
* following buttons:
|
||||
* * The ALARM button moves forward to the next time zone, while the LIGHT
|
||||
* button moves backward to the previous zone. This way, the user can
|
||||
* cycle through all 41 supported time zones.
|
||||
* * A long press on the LIGHT button selects the current time zone, and
|
||||
* the signal indicator appears at the top left. Another long press of
|
||||
* the LIGHT button deselects the time zone.
|
||||
* * A long press on the ALARM button exits settings mode and returns to
|
||||
* display mode.
|
||||
*
|
||||
* Display mode
|
||||
*
|
||||
* In the display mode, the face shows the time of the currently selected
|
||||
* time zone. The face includes the following components:
|
||||
* * The top of the face displays the first two letters of the time zone
|
||||
* abbreviation, such as "PS" for Pacific Standard Time or "CE" for
|
||||
* Central European Time.
|
||||
* * The upper-right corner shows the current day of the month, which helps
|
||||
* indicate time zones that cross the international date line with respect
|
||||
* to the local time.
|
||||
* * The main display shows the time in the selected time zone in either
|
||||
* 12-hour or 24-hour form. There is no timeout, allowing users to keep
|
||||
* the chosen time zone displayed for as long as they wish.
|
||||
*
|
||||
* The user can navigate through the selected time zones using the following
|
||||
* buttons:
|
||||
* * The ALARM button moves to the next selected time zone, while the LIGHT
|
||||
* button moves to the previous zone. If no time zone is selected, the
|
||||
* face simply shows UTC.
|
||||
* * A long press on the ALARM button enters settings mode and enables the
|
||||
* user to re-configure the selected time zones.
|
||||
* * A long press on the LIGHT button activates the LED illumination of the
|
||||
* watch.
|
||||
*/
|
||||
|
||||
/* Number of zones. See movement_timezone_offsets. */
|
||||
#define NUM_TIME_ZONES 41
|
||||
|
||||
|
||||
@@ -25,7 +25,29 @@
|
||||
#ifndef WORLD_CLOCK_FACE_H_
|
||||
#define WORLD_CLOCK_FACE_H_
|
||||
|
||||
/*
|
||||
* WORLD CLOCK FACE
|
||||
*
|
||||
* The World Clock watch face looks similar to the Simple Clock watch face,
|
||||
* but you’ll notice that at first launch the day of week indicators are blank.
|
||||
* That’s because this watch face does not display the day of the week.
|
||||
* Instead, you may customize these letters to display the name of a time zone
|
||||
* of your choosing.
|
||||
*
|
||||
* To customize this watch face, press and hold the ALARM button. The first
|
||||
* letter in the top row will begin flashing. Press the ALARM button repeatedly
|
||||
* to advance through the available letters in the first slot, then press the
|
||||
* LIGHT button to move to the second letter. Finally, press LIGHT again to move
|
||||
* to the time zone setting, and press ALARM to cycle through the available time
|
||||
* zones. Press LIGHT one last time to return to the world clock display.
|
||||
*
|
||||
* Note that the second slot cannot display all letters or numbers. Also note
|
||||
* that at this time, time zones do not automatically update for daylight saving
|
||||
* time; you will need to manually adjust this field each spring and fall.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t char_0;
|
||||
|
||||
@@ -25,15 +25,32 @@
|
||||
#ifndef WYOSCAN_FACE_H_
|
||||
#define WYOSCAN_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
/*
|
||||
* A DESCRIPTION OF YOUR WATCH FACE
|
||||
* WYOSCAN .5 hz watchface
|
||||
*
|
||||
* and a description of how use it
|
||||
* This is a recreation of the Wyoscan watch, which was a $175 watch in 2014.
|
||||
* It was an f-91w pcb replacement.
|
||||
*
|
||||
* Video: https://user-images.githubusercontent.com/1795778/252550124-e07f0ed1-e328-4337-a654-fa1ee65d883f.mp4
|
||||
* Background information: https://artmetropole.com/shop/11460
|
||||
* Demo of what it looks like: https://www.o-r-g.com/apps/wyoscan
|
||||
*
|
||||
* 8 frames per number * 6 numbers + the trailing 16 frames = 64 frames
|
||||
* at 32 frames per second, this is a 2-second cycle time or 0.5 Hz.
|
||||
*
|
||||
* It is giving me a stack overflow after about 2.5 cycles of the time display
|
||||
* in the emulator, but it works fine on the watch.
|
||||
*
|
||||
* I'd like to make something for the low energy mode, but I haven't thought
|
||||
* about how that might work, right now it just freezes in low energy mode
|
||||
* until you press the 12-24HR button.
|
||||
*
|
||||
* There are no controls; it simply animates as long as the page is active.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
#define MAX_ILLUMINATED_SEGMENTS 16
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user