This commit is contained in:
Zahkc 2023-08-06 23:46:16 +10:00 committed by GitHub
commit 0fd8d7c5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
90 changed files with 4032 additions and 0 deletions

35
build/appinfo.json Normal file
View File

@ -0,0 +1,35 @@
{
"versionLabel": "1.0",
"projectType": "rocky",
"name": "Geiger Counter",
"messageKeys": {
"ControlKeyResetRequest": 1,
"ControlKeyUnsupportedError": 4,
"ControlKeyChunk": 3,
"ControlKeyResetComplete": 2
},
"companyName": "Zahkc",
"enableMultiJS": true,
"sdkVersion": "3",
"capabilities": [],
"appKeys": {
"ControlKeyResetRequest": 1,
"ControlKeyUnsupportedError": 4,
"ControlKeyChunk": 3,
"ControlKeyResetComplete": 2
},
"watchapp": {
"watchface": true
},
"longName": "geiger",
"displayName": "geiger",
"shortName": "geiger",
"main": {
"rockyjs": "src/rocky/index.js",
"pkjs": "src/pkjs/index.js"
},
"resources": {
"media": []
},
"uuid": "a426b361-f97e-4934-8581-4e1cb299b74a"
}

Binary file not shown.

View File

@ -0,0 +1,20 @@
#include "pebble_process_info.h"
#include "src/resource_ids.auto.h"
const PebbleProcessInfo __pbl_app_info __attribute__ ((section (".pbl_header"))) = {
.header = "PBLAPP",
.struct_version = { PROCESS_INFO_CURRENT_STRUCT_VERSION_MAJOR, PROCESS_INFO_CURRENT_STRUCT_VERSION_MINOR },
.sdk_version = { PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR },
.process_version = { 1, 0 },
.load_size = 0xb6b6,
.offset = 0xb6b6b6b6,
.crc = 0xb6b6b6b6,
.name = "geiger",
.company = "Zahkc",
.icon_resource_id = DEFAULT_MENU_ICON,
.sym_table_addr = 0xA7A7A7A7,
.flags = PROCESS_INFO_WATCH_FACE | PROCESS_INFO_ROCKY_APP | PROCESS_INFO_PLATFORM_BASALT,
.num_reloc_entries = 0xdeadcafe,
.uuid = { 0xA4, 0x26, 0xB3, 0x61, 0xF9, 0x7E, 0x49, 0x34, 0x85, 0x81, 0x4E, 0x1C, 0xB2, 0x99, 0xB7, 0x4A },
.virtual_size = 0xb6b6
};

Binary file not shown.

BIN
build/basalt/pebble-app.bin Normal file

Binary file not shown.

BIN
build/basalt/pebble-app.elf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
ENTRY(main)
MEMORY
{
APP (rwx) : ORIGIN = 0, LENGTH = 65536
}
SECTIONS
{
.header :
{
KEEP(*(.pbl_header))
} > APP
/* -- DO NOT ADD ANY NEW SECTIONS HERE AND DO NOT CHANGE THE ALIGNMENT -- */
/* The GNU build ID is tacked to the end of the PebbleProcessInfo struct: */
.note.gnu.build-id ALIGN(1) : {
PROVIDE(BUILD_ID = .);
KEEP(*(.note.gnu.build-id))
} > APP
.text :
{
*(.text)
*(.text.*)
*(.rodata)
*(.rodata*)
} > APP
.data :
{
KEEP(*(.data))
*(.data.*)
} > APP
.bss :
{
*(.bss)
*(.bss.*)
} > APP
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
*(.eh_frame)
}
}
/* vim:filetype=ld */

Binary file not shown.

View File

@ -0,0 +1,8 @@
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
uint32_t RESOURCE_ID_JS_SNAPSHOT = 1;

Binary file not shown.

View File

@ -0,0 +1,13 @@
#pragma once
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
typedef enum {
INVALID_RESOURCE = 0,
RESOURCE_ID_INVALID = 0,
DEFAULT_MENU_ICON = 0,
RESOURCE_ID_JS_SNAPSHOT = 1,
} ResourceId;

9
build/basalt/src/rocky.c Normal file
View File

@ -0,0 +1,9 @@
#include <pebble.h>
extern bool rocky_event_loop_with_resource(uint32_t resource_id);
int main(void) {
Window *window = window_create();
window_stack_push(window, false);
rocky_event_loop_with_resource(RESOURCE_ID_JS_SNAPSHOT);
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"size":3452,"max":24576}

27
build/c4che/_cache.py Normal file
View File

@ -0,0 +1,27 @@
BINDIR = '/usr/local/bin'
BLOCK_MESSAGE_KEYS = []
BUILD_TYPE = 'rocky'
BUNDLE_NAME = 'geiger.pbw'
DEFINES = ['RELEASE']
LIBDIR = '/usr/local/lib'
LIB_DIR = 'node_modules'
LIB_JSON = []
MESSAGE_KEYS = {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}
MESSAGE_KEYS_DEFINITION = '/home/zahkc/Documents/Projects/Pebble/geiger/build/src/message_keys.auto.c'
MESSAGE_KEYS_HEADER = '/home/zahkc/Documents/Projects/Pebble/geiger/build/include/message_keys.auto.h'
MESSAGE_KEYS_JSON = '/home/zahkc/Documents/Projects/Pebble/geiger/build/js/message_keys.json'
NODE = '/usr/bin/node'
NODE_PATH = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules'
PEBBLE_SDK_COMMON = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common'
PEBBLE_SDK_ROOT = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble'
PREFIX = '/usr/local'
PROJECT_INFO = {'appKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, u'sdkVersion': u'3', u'projectType': u'rocky', u'uuid': u'a426b361-f97e-4934-8581-4e1cb299b74a', 'messageKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, 'companyName': u'Zahkc', u'enableMultiJS': True, u'watchapp': {u'watchface': True}, 'versionLabel': u'1.0', 'longName': u'geiger', u'displayName': u'geiger', 'shortName': u'geiger', u'main': {u'rockyjs': u'src/rocky/index.js', u'pkjs': u'src/pkjs/index.js'}, u'resources': {u'media': []}, 'name': u'Geiger Counter'}
REQUESTED_PLATFORMS = []
RESOURCES_JSON = []
SANDBOX = False
SUPPORTED_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TARGET_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TIMESTAMP = 1691328646
USE_GROUPS = True
VERBOSE = 0
WEBPACK = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'

View File

@ -0,0 +1,72 @@
AR = 'arm-none-eabi-ar'
ARFLAGS = 'rcs'
AS = 'arm-none-eabi-gcc'
BINDIR = '/usr/local/bin'
BLOCK_MESSAGE_KEYS = []
BUILD_DIR = 'basalt'
BUILD_TYPE = 'rocky'
BUNDLE_BIN_DIR = 'basalt'
BUNDLE_NAME = 'geiger.pbw'
CC = ['arm-none-eabi-gcc']
CCLNK_SRC_F = []
CCLNK_TGT_F = ['-o']
CC_NAME = 'gcc'
CC_SRC_F = []
CC_TGT_F = ['-c', '-o']
CC_VERSION = ('4', '7', '2')
CFLAGS = ['-std=c99', '-mcpu=cortex-m3', '-mthumb', '-ffunction-sections', '-fdata-sections', '-g', '-fPIE', '-Os', '-D_TIME_H_', '-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter', '-Wno-error=unused-function', '-Wno-error=unused-variable']
CFLAGS_MACBUNDLE = ['-fPIC']
CFLAGS_cshlib = ['-fPIC']
CPPPATH_ST = '-I%s'
DEFINES = ['RELEASE', 'PBL_PLATFORM_BASALT', 'PBL_COLOR', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_COMPASS', 'PBL_SMARTSTRAP_POWER', 'PBL_DISPLAY_WIDTH=144', 'PBL_DISPLAY_HEIGHT=168', 'PBL_SDK_3']
DEFINES_ST = '-D%s'
DEST_BINFMT = 'elf'
DEST_CPU = 'arm'
DEST_OS = 'linux'
INCLUDES = ['basalt']
LD = 'arm-none-eabi-ld'
LIBDIR = '/usr/local/lib'
LIBPATH_ST = '-L%s'
LIB_DIR = 'node_modules'
LIB_JSON = []
LIB_ST = '-l%s'
LINKFLAGS = ['-mcpu=cortex-m3', '-mthumb', '-Wl,--gc-sections', '-Wl,--warn-common', '-fPIE', '-Os']
LINKFLAGS_MACBUNDLE = ['-bundle', '-undefined', 'dynamic_lookup']
LINKFLAGS_cshlib = ['-shared']
LINKFLAGS_cstlib = ['-Wl,-Bstatic']
LINK_CC = ['arm-none-eabi-gcc']
MESSAGE_KEYS = {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}
MESSAGE_KEYS_DEFINITION = '/home/zahkc/Documents/Projects/Pebble/geiger/build/src/message_keys.auto.c'
MESSAGE_KEYS_HEADER = '/home/zahkc/Documents/Projects/Pebble/geiger/build/include/message_keys.auto.h'
MESSAGE_KEYS_JSON = '/home/zahkc/Documents/Projects/Pebble/geiger/build/js/message_keys.json'
NODE = '/usr/bin/node'
NODE_PATH = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules'
PEBBLE_SDK_COMMON = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common'
PEBBLE_SDK_PLATFORM = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/basalt'
PEBBLE_SDK_ROOT = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble'
PLATFORM = {'TAGS': ['basalt', 'color', 'rect', 'mic', 'strap', 'strappower', 'compass', 'health', '144w', '168h'], 'MAX_FONT_GLYPH_SIZE': 256, 'ADDITIONAL_TEXT_LINES_FOR_PEBBLE_H': [], 'MAX_APP_BINARY_SIZE': 65536, 'MAX_RESOURCES_SIZE': 1048576, 'MAX_APP_MEMORY_SIZE': 65536, 'MAX_WORKER_MEMORY_SIZE': 10240, 'NAME': 'basalt', 'BUNDLE_BIN_DIR': 'basalt', 'BUILD_DIR': 'basalt', 'MAX_RESOURCES_SIZE_APPSTORE': 262144, 'DEFINES': ['PBL_PLATFORM_BASALT', 'PBL_COLOR', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_COMPASS', 'PBL_SMARTSTRAP_POWER', 'PBL_DISPLAY_WIDTH=144', 'PBL_DISPLAY_HEIGHT=168']}
PLATFORM_NAME = 'basalt'
PREFIX = '/usr/local'
PROJECT_INFO = {'appKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, u'sdkVersion': u'3', u'projectType': u'rocky', u'uuid': u'a426b361-f97e-4934-8581-4e1cb299b74a', 'messageKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, 'companyName': u'Zahkc', u'enableMultiJS': True, u'watchapp': {u'watchface': True}, 'versionLabel': u'1.0', 'longName': u'geiger', u'displayName': u'geiger', 'shortName': u'geiger', u'main': {u'rockyjs': u'src/rocky/index.js', u'pkjs': u'src/pkjs/index.js'}, u'resources': {u'media': []}, 'name': u'Geiger Counter'}
REQUESTED_PLATFORMS = []
RESOURCES_JSON = []
RPATH_ST = '-Wl,-rpath,%s'
SANDBOX = False
SDK_VERSION_MAJOR = 5
SDK_VERSION_MINOR = 86
SHLIB_MARKER = None
SIZE = 'arm-none-eabi-size'
SONAME_ST = '-Wl,-h,%s'
STLIBPATH_ST = '-L%s'
STLIB_MARKER = None
STLIB_ST = '-l%s'
SUPPORTED_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TARGET_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TIMESTAMP = 1691328646
USE_GROUPS = True
VERBOSE = 0
WEBPACK = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'
cprogram_PATTERN = '%s'
cshlib_PATTERN = 'lib%s.so'
cstlib_PATTERN = 'lib%s.a'
macbundle_PATTERN = '%s.bundle'

View File

@ -0,0 +1,2 @@
version = 0x1070b00
tools = [{'tool': 'pebble_sdk_common', 'tooldir': None, 'funs': None}, {'tool': 'process_message_keys', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'pebble_sdk_gcc', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'pebble_sdk_gcc', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'pebble_sdk_gcc', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'pebble_sdk_gcc', 'tooldir': None, 'funs': None}, {'tool': 'pebble_sdk', 'tooldir': None, 'funs': None}]

View File

@ -0,0 +1,72 @@
AR = 'arm-none-eabi-ar'
ARFLAGS = 'rcs'
AS = 'arm-none-eabi-gcc'
BINDIR = '/usr/local/bin'
BLOCK_MESSAGE_KEYS = []
BUILD_DIR = 'chalk'
BUILD_TYPE = 'rocky'
BUNDLE_BIN_DIR = 'chalk'
BUNDLE_NAME = 'geiger.pbw'
CC = ['arm-none-eabi-gcc']
CCLNK_SRC_F = []
CCLNK_TGT_F = ['-o']
CC_NAME = 'gcc'
CC_SRC_F = []
CC_TGT_F = ['-c', '-o']
CC_VERSION = ('4', '7', '2')
CFLAGS = ['-std=c99', '-mcpu=cortex-m3', '-mthumb', '-ffunction-sections', '-fdata-sections', '-g', '-fPIE', '-Os', '-D_TIME_H_', '-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter', '-Wno-error=unused-function', '-Wno-error=unused-variable']
CFLAGS_MACBUNDLE = ['-fPIC']
CFLAGS_cshlib = ['-fPIC']
CPPPATH_ST = '-I%s'
DEFINES = ['RELEASE', 'PBL_PLATFORM_CHALK', 'PBL_COLOR', 'PBL_ROUND', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_COMPASS', 'PBL_SMARTSTRAP_POWER', 'PBL_DISPLAY_WIDTH=180', 'PBL_DISPLAY_HEIGHT=180', 'PBL_SDK_3']
DEFINES_ST = '-D%s'
DEST_BINFMT = 'elf'
DEST_CPU = 'arm'
DEST_OS = 'linux'
INCLUDES = ['chalk']
LD = 'arm-none-eabi-ld'
LIBDIR = '/usr/local/lib'
LIBPATH_ST = '-L%s'
LIB_DIR = 'node_modules'
LIB_JSON = []
LIB_ST = '-l%s'
LINKFLAGS = ['-mcpu=cortex-m3', '-mthumb', '-Wl,--gc-sections', '-Wl,--warn-common', '-fPIE', '-Os']
LINKFLAGS_MACBUNDLE = ['-bundle', '-undefined', 'dynamic_lookup']
LINKFLAGS_cshlib = ['-shared']
LINKFLAGS_cstlib = ['-Wl,-Bstatic']
LINK_CC = ['arm-none-eabi-gcc']
MESSAGE_KEYS = {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}
MESSAGE_KEYS_DEFINITION = '/home/zahkc/Documents/Projects/Pebble/geiger/build/src/message_keys.auto.c'
MESSAGE_KEYS_HEADER = '/home/zahkc/Documents/Projects/Pebble/geiger/build/include/message_keys.auto.h'
MESSAGE_KEYS_JSON = '/home/zahkc/Documents/Projects/Pebble/geiger/build/js/message_keys.json'
NODE = '/usr/bin/node'
NODE_PATH = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules'
PEBBLE_SDK_COMMON = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common'
PEBBLE_SDK_PLATFORM = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/chalk'
PEBBLE_SDK_ROOT = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble'
PLATFORM = {'TAGS': ['chalk', 'color', 'round', 'mic', 'strap', 'strappower', 'compass', 'health', '180w', '180h'], 'MAX_FONT_GLYPH_SIZE': 256, 'ADDITIONAL_TEXT_LINES_FOR_PEBBLE_H': [], 'MAX_APP_BINARY_SIZE': 65536, 'MAX_RESOURCES_SIZE': 1048576, 'MAX_APP_MEMORY_SIZE': 65536, 'MAX_WORKER_MEMORY_SIZE': 10240, 'NAME': 'chalk', 'BUNDLE_BIN_DIR': 'chalk', 'BUILD_DIR': 'chalk', 'MAX_RESOURCES_SIZE_APPSTORE': 262144, 'DEFINES': ['PBL_PLATFORM_CHALK', 'PBL_COLOR', 'PBL_ROUND', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_COMPASS', 'PBL_SMARTSTRAP_POWER', 'PBL_DISPLAY_WIDTH=180', 'PBL_DISPLAY_HEIGHT=180']}
PLATFORM_NAME = 'chalk'
PREFIX = '/usr/local'
PROJECT_INFO = {'appKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, u'sdkVersion': u'3', u'projectType': u'rocky', u'uuid': u'a426b361-f97e-4934-8581-4e1cb299b74a', 'messageKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, 'companyName': u'Zahkc', u'enableMultiJS': True, u'watchapp': {u'watchface': True}, 'versionLabel': u'1.0', 'longName': u'geiger', u'displayName': u'geiger', 'shortName': u'geiger', u'main': {u'rockyjs': u'src/rocky/index.js', u'pkjs': u'src/pkjs/index.js'}, u'resources': {u'media': []}, 'name': u'Geiger Counter'}
REQUESTED_PLATFORMS = []
RESOURCES_JSON = []
RPATH_ST = '-Wl,-rpath,%s'
SANDBOX = False
SDK_VERSION_MAJOR = 5
SDK_VERSION_MINOR = 86
SHLIB_MARKER = None
SIZE = 'arm-none-eabi-size'
SONAME_ST = '-Wl,-h,%s'
STLIBPATH_ST = '-L%s'
STLIB_MARKER = None
STLIB_ST = '-l%s'
SUPPORTED_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TARGET_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TIMESTAMP = 1691328646
USE_GROUPS = True
VERBOSE = 0
WEBPACK = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'
cprogram_PATTERN = '%s'
cshlib_PATTERN = 'lib%s.so'
cstlib_PATTERN = 'lib%s.a'
macbundle_PATTERN = '%s.bundle'

View File

@ -0,0 +1,72 @@
AR = 'arm-none-eabi-ar'
ARFLAGS = 'rcs'
AS = 'arm-none-eabi-gcc'
BINDIR = '/usr/local/bin'
BLOCK_MESSAGE_KEYS = []
BUILD_DIR = 'diorite'
BUILD_TYPE = 'rocky'
BUNDLE_BIN_DIR = 'diorite'
BUNDLE_NAME = 'geiger.pbw'
CC = ['arm-none-eabi-gcc']
CCLNK_SRC_F = []
CCLNK_TGT_F = ['-o']
CC_NAME = 'gcc'
CC_SRC_F = []
CC_TGT_F = ['-c', '-o']
CC_VERSION = ('4', '7', '2')
CFLAGS = ['-std=c99', '-mcpu=cortex-m3', '-mthumb', '-ffunction-sections', '-fdata-sections', '-g', '-fPIE', '-Os', '-D_TIME_H_', '-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter', '-Wno-error=unused-function', '-Wno-error=unused-variable']
CFLAGS_MACBUNDLE = ['-fPIC']
CFLAGS_cshlib = ['-fPIC']
CPPPATH_ST = '-I%s'
DEFINES = ['RELEASE', 'PBL_PLATFORM_DIORITE', 'PBL_BW', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_HEALTH', 'PBL_SMARTSTRAP', 'PBL_DISPLAY_WIDTH=144', 'PBL_DISPLAY_HEIGHT=168', 'PBL_SDK_3']
DEFINES_ST = '-D%s'
DEST_BINFMT = 'elf'
DEST_CPU = 'arm'
DEST_OS = 'linux'
INCLUDES = ['diorite']
LD = 'arm-none-eabi-ld'
LIBDIR = '/usr/local/lib'
LIBPATH_ST = '-L%s'
LIB_DIR = 'node_modules'
LIB_JSON = []
LIB_ST = '-l%s'
LINKFLAGS = ['-mcpu=cortex-m3', '-mthumb', '-Wl,--gc-sections', '-Wl,--warn-common', '-fPIE', '-Os']
LINKFLAGS_MACBUNDLE = ['-bundle', '-undefined', 'dynamic_lookup']
LINKFLAGS_cshlib = ['-shared']
LINKFLAGS_cstlib = ['-Wl,-Bstatic']
LINK_CC = ['arm-none-eabi-gcc']
MESSAGE_KEYS = {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}
MESSAGE_KEYS_DEFINITION = '/home/zahkc/Documents/Projects/Pebble/geiger/build/src/message_keys.auto.c'
MESSAGE_KEYS_HEADER = '/home/zahkc/Documents/Projects/Pebble/geiger/build/include/message_keys.auto.h'
MESSAGE_KEYS_JSON = '/home/zahkc/Documents/Projects/Pebble/geiger/build/js/message_keys.json'
NODE = '/usr/bin/node'
NODE_PATH = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules'
PEBBLE_SDK_COMMON = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common'
PEBBLE_SDK_PLATFORM = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/diorite'
PEBBLE_SDK_ROOT = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble'
PLATFORM = {'TAGS': ['diorite', 'bw', 'rect', 'mic', 'strap', 'health', '144w', '168h'], 'MAX_FONT_GLYPH_SIZE': 256, 'ADDITIONAL_TEXT_LINES_FOR_PEBBLE_H': [], 'MAX_APP_BINARY_SIZE': 65536, 'MAX_RESOURCES_SIZE': 1048576, 'MAX_APP_MEMORY_SIZE': 65536, 'MAX_WORKER_MEMORY_SIZE': 10240, 'NAME': 'diorite', 'BUNDLE_BIN_DIR': 'diorite', 'BUILD_DIR': 'diorite', 'MAX_RESOURCES_SIZE_APPSTORE': 262144, 'DEFINES': ['PBL_PLATFORM_DIORITE', 'PBL_BW', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_HEALTH', 'PBL_SMARTSTRAP', 'PBL_DISPLAY_WIDTH=144', 'PBL_DISPLAY_HEIGHT=168']}
PLATFORM_NAME = 'diorite'
PREFIX = '/usr/local'
PROJECT_INFO = {'appKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, u'sdkVersion': u'3', u'projectType': u'rocky', u'uuid': u'a426b361-f97e-4934-8581-4e1cb299b74a', 'messageKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, 'companyName': u'Zahkc', u'enableMultiJS': True, u'watchapp': {u'watchface': True}, 'versionLabel': u'1.0', 'longName': u'geiger', u'displayName': u'geiger', 'shortName': u'geiger', u'main': {u'rockyjs': u'src/rocky/index.js', u'pkjs': u'src/pkjs/index.js'}, u'resources': {u'media': []}, 'name': u'Geiger Counter'}
REQUESTED_PLATFORMS = []
RESOURCES_JSON = []
RPATH_ST = '-Wl,-rpath,%s'
SANDBOX = False
SDK_VERSION_MAJOR = 5
SDK_VERSION_MINOR = 86
SHLIB_MARKER = None
SIZE = 'arm-none-eabi-size'
SONAME_ST = '-Wl,-h,%s'
STLIBPATH_ST = '-L%s'
STLIB_MARKER = None
STLIB_ST = '-l%s'
SUPPORTED_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TARGET_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TIMESTAMP = 1691328646
USE_GROUPS = True
VERBOSE = 0
WEBPACK = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'
cprogram_PATTERN = '%s'
cshlib_PATTERN = 'lib%s.so'
cstlib_PATTERN = 'lib%s.a'
macbundle_PATTERN = '%s.bundle'

View File

@ -0,0 +1,72 @@
AR = 'arm-none-eabi-ar'
ARFLAGS = 'rcs'
AS = 'arm-none-eabi-gcc'
BINDIR = '/usr/local/bin'
BLOCK_MESSAGE_KEYS = []
BUILD_DIR = 'emery'
BUILD_TYPE = 'rocky'
BUNDLE_BIN_DIR = 'emery'
BUNDLE_NAME = 'geiger.pbw'
CC = ['arm-none-eabi-gcc']
CCLNK_SRC_F = []
CCLNK_TGT_F = ['-o']
CC_NAME = 'gcc'
CC_SRC_F = []
CC_TGT_F = ['-c', '-o']
CC_VERSION = ('4', '7', '2')
CFLAGS = ['-std=c99', '-mcpu=cortex-m3', '-mthumb', '-ffunction-sections', '-fdata-sections', '-g', '-fPIE', '-Os', '-D_TIME_H_', '-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter', '-Wno-error=unused-function', '-Wno-error=unused-variable']
CFLAGS_MACBUNDLE = ['-fPIC']
CFLAGS_cshlib = ['-fPIC']
CPPPATH_ST = '-I%s'
DEFINES = ['RELEASE', 'PBL_PLATFORM_EMERY', 'PBL_COLOR', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_SMARTSTRAP_POWER', 'PBL_COMPASS', 'PBL_DISPLAY_WIDTH=200', 'PBL_DISPLAY_HEIGHT=228', 'PBL_SDK_3']
DEFINES_ST = '-D%s'
DEST_BINFMT = 'elf'
DEST_CPU = 'arm'
DEST_OS = 'linux'
INCLUDES = ['emery']
LD = 'arm-none-eabi-ld'
LIBDIR = '/usr/local/lib'
LIBPATH_ST = '-L%s'
LIB_DIR = 'node_modules'
LIB_JSON = []
LIB_ST = '-l%s'
LINKFLAGS = ['-mcpu=cortex-m3', '-mthumb', '-Wl,--gc-sections', '-Wl,--warn-common', '-fPIE', '-Os']
LINKFLAGS_MACBUNDLE = ['-bundle', '-undefined', 'dynamic_lookup']
LINKFLAGS_cshlib = ['-shared']
LINKFLAGS_cstlib = ['-Wl,-Bstatic']
LINK_CC = ['arm-none-eabi-gcc']
MESSAGE_KEYS = {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}
MESSAGE_KEYS_DEFINITION = '/home/zahkc/Documents/Projects/Pebble/geiger/build/src/message_keys.auto.c'
MESSAGE_KEYS_HEADER = '/home/zahkc/Documents/Projects/Pebble/geiger/build/include/message_keys.auto.h'
MESSAGE_KEYS_JSON = '/home/zahkc/Documents/Projects/Pebble/geiger/build/js/message_keys.json'
NODE = '/usr/bin/node'
NODE_PATH = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules'
PEBBLE_SDK_COMMON = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common'
PEBBLE_SDK_PLATFORM = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/emery'
PEBBLE_SDK_ROOT = '/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble'
PLATFORM = {'TAGS': ['emery', 'color', 'rect', 'mic', 'strap', 'health', 'strappower', 'compass', '200w', '228h'], 'MAX_FONT_GLYPH_SIZE': 320, 'ADDITIONAL_TEXT_LINES_FOR_PEBBLE_H': [], 'MAX_APP_BINARY_SIZE': 131072, 'MAX_RESOURCES_SIZE': 1048576, 'MAX_APP_MEMORY_SIZE': 131072, 'MAX_WORKER_MEMORY_SIZE': 10240, 'NAME': 'emery', 'BUNDLE_BIN_DIR': 'emery', 'BUILD_DIR': 'emery', 'MAX_RESOURCES_SIZE_APPSTORE': 262144, 'DEFINES': ['PBL_PLATFORM_EMERY', 'PBL_COLOR', 'PBL_RECT', 'PBL_MICROPHONE', 'PBL_SMARTSTRAP', 'PBL_HEALTH', 'PBL_SMARTSTRAP_POWER', 'PBL_COMPASS', 'PBL_DISPLAY_WIDTH=200', 'PBL_DISPLAY_HEIGHT=228']}
PLATFORM_NAME = 'emery'
PREFIX = '/usr/local'
PROJECT_INFO = {'appKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, u'sdkVersion': u'3', u'projectType': u'rocky', u'uuid': u'a426b361-f97e-4934-8581-4e1cb299b74a', 'messageKeys': {'ControlKeyResetRequest': 1, 'ControlKeyUnsupportedError': 4, 'ControlKeyChunk': 3, 'ControlKeyResetComplete': 2}, 'companyName': u'Zahkc', u'enableMultiJS': True, u'watchapp': {u'watchface': True}, 'versionLabel': u'1.0', 'longName': u'geiger', u'displayName': u'geiger', 'shortName': u'geiger', u'main': {u'rockyjs': u'src/rocky/index.js', u'pkjs': u'src/pkjs/index.js'}, u'resources': {u'media': []}, 'name': u'Geiger Counter'}
REQUESTED_PLATFORMS = []
RESOURCES_JSON = []
RPATH_ST = '-Wl,-rpath,%s'
SANDBOX = False
SDK_VERSION_MAJOR = 5
SDK_VERSION_MINOR = 86
SHLIB_MARKER = None
SIZE = 'arm-none-eabi-size'
SONAME_ST = '-Wl,-h,%s'
STLIBPATH_ST = '-L%s'
STLIB_MARKER = None
STLIB_ST = '-l%s'
SUPPORTED_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TARGET_PLATFORMS = ['emery', 'diorite', 'chalk', 'basalt']
TIMESTAMP = 1691328646
USE_GROUPS = True
VERBOSE = 0
WEBPACK = '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'
cprogram_PATTERN = '%s'
cshlib_PATTERN = 'lib%s.so'
cstlib_PATTERN = 'lib%s.a'
macbundle_PATTERN = '%s.bundle'

Binary file not shown.

View File

@ -0,0 +1,20 @@
#include "pebble_process_info.h"
#include "src/resource_ids.auto.h"
const PebbleProcessInfo __pbl_app_info __attribute__ ((section (".pbl_header"))) = {
.header = "PBLAPP",
.struct_version = { PROCESS_INFO_CURRENT_STRUCT_VERSION_MAJOR, PROCESS_INFO_CURRENT_STRUCT_VERSION_MINOR },
.sdk_version = { PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR },
.process_version = { 1, 0 },
.load_size = 0xb6b6,
.offset = 0xb6b6b6b6,
.crc = 0xb6b6b6b6,
.name = "geiger",
.company = "Zahkc",
.icon_resource_id = DEFAULT_MENU_ICON,
.sym_table_addr = 0xA7A7A7A7,
.flags = PROCESS_INFO_WATCH_FACE | PROCESS_INFO_ROCKY_APP | PROCESS_INFO_PLATFORM_CHALK,
.num_reloc_entries = 0xdeadcafe,
.uuid = { 0xA4, 0x26, 0xB3, 0x61, 0xF9, 0x7E, 0x49, 0x34, 0x85, 0x81, 0x4E, 0x1C, 0xB2, 0x99, 0xB7, 0x4A },
.virtual_size = 0xb6b6
};

Binary file not shown.

BIN
build/chalk/pebble-app.bin Normal file

Binary file not shown.

BIN
build/chalk/pebble-app.elf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
ENTRY(main)
MEMORY
{
APP (rwx) : ORIGIN = 0, LENGTH = 65536
}
SECTIONS
{
.header :
{
KEEP(*(.pbl_header))
} > APP
/* -- DO NOT ADD ANY NEW SECTIONS HERE AND DO NOT CHANGE THE ALIGNMENT -- */
/* The GNU build ID is tacked to the end of the PebbleProcessInfo struct: */
.note.gnu.build-id ALIGN(1) : {
PROVIDE(BUILD_ID = .);
KEEP(*(.note.gnu.build-id))
} > APP
.text :
{
*(.text)
*(.text.*)
*(.rodata)
*(.rodata*)
} > APP
.data :
{
KEEP(*(.data))
*(.data.*)
} > APP
.bss :
{
*(.bss)
*(.bss.*)
} > APP
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
*(.eh_frame)
}
}
/* vim:filetype=ld */

Binary file not shown.

View File

@ -0,0 +1,8 @@
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
uint32_t RESOURCE_ID_JS_SNAPSHOT = 1;

Binary file not shown.

View File

@ -0,0 +1,13 @@
#pragma once
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
typedef enum {
INVALID_RESOURCE = 0,
RESOURCE_ID_INVALID = 0,
DEFAULT_MENU_ICON = 0,
RESOURCE_ID_JS_SNAPSHOT = 1,
} ResourceId;

9
build/chalk/src/rocky.c Normal file
View File

@ -0,0 +1,9 @@
#include <pebble.h>
extern bool rocky_event_loop_with_resource(uint32_t resource_id);
int main(void) {
Window *window = window_create();
window_stack_push(window, false);
rocky_event_loop_with_resource(RESOURCE_ID_JS_SNAPSHOT);
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"size":3452,"max":24576}

62
build/config.log Normal file
View File

@ -0,0 +1,62 @@
# project configured on Sun Aug 6 23:30:46 2023 by
# waf 1.7.11 (abi 98, python 20712f0 on linux2)
# using /home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/waf configure
#
----------------------------------------
Setting top to
/home/zahkc/Documents/Projects/Pebble/geiger
----------------------------------------
Setting out to
/home/zahkc/Documents/Projects/Pebble/geiger/build
----------------------------------------
Checking for program webpack
/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack
find program=['webpack'] paths=['/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin'] var='WEBPACK' -> '/home/zahkc/.pebble-sdk/SDKs/current/node_modules/.bin/webpack'
----------------------------------------
Checking for program node,nodejs
/usr/bin/node
find program=['node', 'nodejs'] paths=['/home/zahkc/Documents/Pebble/pebble-dev/pebble-sdk-4.6-rc2-linux64/arm-cs-tools/bin', '/home/zahkc/Documents/Pebble/pebble-dev/pebble-sdk-4.6-rc2-linux64/bin', '/home/zahkc/.local/bin', '/home/zahkc/.local/bin/lvim', '/home/zahkc/Documents/Pebble/pebble-dev/pebble-sdk-4.6-rc2-linux64/bin', '/home/zahkc/gems/bin', '/home/zahkc/gems/bin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/local/games', '/usr/games', '/snap/bin', '/home/zahkc/.dotnet', '/home/zahkc/.dotnet/tools'] var='NODE' -> '/usr/bin/node'
----------------------------------------
Found Pebble SDK for emery in:
/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/emery
----------------------------------------
Checking for program gcc,cc
arm-none-eabi-gcc
find program=['gcc', 'cc'] paths='' var='CC' -> 'arm-none-eabi-gcc'
----------------------------------------
Checking for program ar
arm-none-eabi-ar
find program=['ar'] paths='' var='AR' -> 'arm-none-eabi-ar'
----------------------------------------
Found Pebble SDK for diorite in:
/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/diorite
----------------------------------------
Checking for program gcc,cc
arm-none-eabi-gcc
find program=['gcc', 'cc'] paths='' var='CC' -> 'arm-none-eabi-gcc'
----------------------------------------
Checking for program ar
arm-none-eabi-ar
find program=['ar'] paths='' var='AR' -> 'arm-none-eabi-ar'
----------------------------------------
Found Pebble SDK for chalk in:
/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/chalk
----------------------------------------
Checking for program gcc,cc
arm-none-eabi-gcc
find program=['gcc', 'cc'] paths='' var='CC' -> 'arm-none-eabi-gcc'
----------------------------------------
Checking for program ar
arm-none-eabi-ar
find program=['ar'] paths='' var='AR' -> 'arm-none-eabi-ar'
----------------------------------------
Found Pebble SDK for basalt in:
/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/basalt
----------------------------------------
Checking for program gcc,cc
arm-none-eabi-gcc
find program=['gcc', 'cc'] paths='' var='CC' -> 'arm-none-eabi-gcc'
----------------------------------------
Checking for program ar
arm-none-eabi-ar
find program=['ar'] paths='' var='AR' -> 'arm-none-eabi-ar'

Binary file not shown.

View File

@ -0,0 +1,20 @@
#include "pebble_process_info.h"
#include "src/resource_ids.auto.h"
const PebbleProcessInfo __pbl_app_info __attribute__ ((section (".pbl_header"))) = {
.header = "PBLAPP",
.struct_version = { PROCESS_INFO_CURRENT_STRUCT_VERSION_MAJOR, PROCESS_INFO_CURRENT_STRUCT_VERSION_MINOR },
.sdk_version = { PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR },
.process_version = { 1, 0 },
.load_size = 0xb6b6,
.offset = 0xb6b6b6b6,
.crc = 0xb6b6b6b6,
.name = "geiger",
.company = "Zahkc",
.icon_resource_id = DEFAULT_MENU_ICON,
.sym_table_addr = 0xA7A7A7A7,
.flags = PROCESS_INFO_WATCH_FACE | PROCESS_INFO_ROCKY_APP | PROCESS_INFO_PLATFORM_DIORITE,
.num_reloc_entries = 0xdeadcafe,
.uuid = { 0xA4, 0x26, 0xB3, 0x61, 0xF9, 0x7E, 0x49, 0x34, 0x85, 0x81, 0x4E, 0x1C, 0xB2, 0x99, 0xB7, 0x4A },
.virtual_size = 0xb6b6
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
ENTRY(main)
MEMORY
{
APP (rwx) : ORIGIN = 0, LENGTH = 65536
}
SECTIONS
{
.header :
{
KEEP(*(.pbl_header))
} > APP
/* -- DO NOT ADD ANY NEW SECTIONS HERE AND DO NOT CHANGE THE ALIGNMENT -- */
/* The GNU build ID is tacked to the end of the PebbleProcessInfo struct: */
.note.gnu.build-id ALIGN(1) : {
PROVIDE(BUILD_ID = .);
KEEP(*(.note.gnu.build-id))
} > APP
.text :
{
*(.text)
*(.text.*)
*(.rodata)
*(.rodata*)
} > APP
.data :
{
KEEP(*(.data))
*(.data.*)
} > APP
.bss :
{
*(.bss)
*(.bss.*)
} > APP
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
*(.eh_frame)
}
}
/* vim:filetype=ld */

Binary file not shown.

View File

@ -0,0 +1,8 @@
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
uint32_t RESOURCE_ID_JS_SNAPSHOT = 1;

Binary file not shown.

View File

@ -0,0 +1,13 @@
#pragma once
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
typedef enum {
INVALID_RESOURCE = 0,
RESOURCE_ID_INVALID = 0,
DEFAULT_MENU_ICON = 0,
RESOURCE_ID_JS_SNAPSHOT = 1,
} ResourceId;

View File

@ -0,0 +1,9 @@
#include <pebble.h>
extern bool rocky_event_loop_with_resource(uint32_t resource_id);
int main(void) {
Window *window = window_create();
window_stack_push(window, false);
rocky_event_loop_with_resource(RESOURCE_ID_JS_SNAPSHOT);
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"size":3452,"max":24576}

Binary file not shown.

View File

@ -0,0 +1,20 @@
#include "pebble_process_info.h"
#include "src/resource_ids.auto.h"
const PebbleProcessInfo __pbl_app_info __attribute__ ((section (".pbl_header"))) = {
.header = "PBLAPP",
.struct_version = { PROCESS_INFO_CURRENT_STRUCT_VERSION_MAJOR, PROCESS_INFO_CURRENT_STRUCT_VERSION_MINOR },
.sdk_version = { PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR },
.process_version = { 1, 0 },
.load_size = 0xb6b6,
.offset = 0xb6b6b6b6,
.crc = 0xb6b6b6b6,
.name = "geiger",
.company = "Zahkc",
.icon_resource_id = DEFAULT_MENU_ICON,
.sym_table_addr = 0xA7A7A7A7,
.flags = PROCESS_INFO_WATCH_FACE | PROCESS_INFO_ROCKY_APP | PROCESS_INFO_PLATFORM_EMERY,
.num_reloc_entries = 0xdeadcafe,
.uuid = { 0xA4, 0x26, 0xB3, 0x61, 0xF9, 0x7E, 0x49, 0x34, 0x85, 0x81, 0x4E, 0x1C, 0xB2, 0x99, 0xB7, 0x4A },
.virtual_size = 0xb6b6
};

Binary file not shown.

BIN
build/emery/pebble-app.bin Normal file

Binary file not shown.

BIN
build/emery/pebble-app.elf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
ENTRY(main)
MEMORY
{
APP (rwx) : ORIGIN = 0, LENGTH = 131072
}
SECTIONS
{
.header :
{
KEEP(*(.pbl_header))
} > APP
/* -- DO NOT ADD ANY NEW SECTIONS HERE AND DO NOT CHANGE THE ALIGNMENT -- */
/* The GNU build ID is tacked to the end of the PebbleProcessInfo struct: */
.note.gnu.build-id ALIGN(1) : {
PROVIDE(BUILD_ID = .);
KEEP(*(.note.gnu.build-id))
} > APP
.text :
{
*(.text)
*(.text.*)
*(.rodata)
*(.rodata*)
} > APP
.data :
{
KEEP(*(.data))
*(.data.*)
} > APP
.bss :
{
*(.bss)
*(.bss.*)
} > APP
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
*(.eh_frame)
}
}
/* vim:filetype=ld */

Binary file not shown.

View File

@ -0,0 +1,8 @@
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
uint32_t RESOURCE_ID_JS_SNAPSHOT = 1;

Binary file not shown.

View File

@ -0,0 +1,13 @@
#pragma once
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
typedef enum {
INVALID_RESOURCE = 0,
RESOURCE_ID_INVALID = 0,
DEFAULT_MENU_ICON = 0,
RESOURCE_ID_JS_SNAPSHOT = 1,
} ResourceId;

9
build/emery/src/rocky.c Normal file
View File

@ -0,0 +1,9 @@
#include <pebble.h>
extern bool rocky_event_loop_with_resource(uint32_t resource_id);
int main(void) {
Window *window = window_create();
window_stack_push(window, false);
rocky_event_loop_with_resource(RESOURCE_ID_JS_SNAPSHOT);
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"size":3452,"max":24576}

BIN
build/geiger.pbw Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
#pragma once
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
extern uint32_t MESSAGE_KEY_ControlKeyChunk;
extern uint32_t MESSAGE_KEY_ControlKeyResetComplete;
extern uint32_t MESSAGE_KEY_ControlKeyResetRequest;
extern uint32_t MESSAGE_KEY_ControlKeyUnsupportedError;

View File

@ -0,0 +1,6 @@
{
"ControlKeyChunk": 3,
"ControlKeyResetComplete": 2,
"ControlKeyResetRequest": 1,
"ControlKeyUnsupportedError": 4
}

1050
build/pebble-js-app.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1432
build/pebble-rocky.map Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,247 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
var rocky = __webpack_require__(2);
// An object to cache our date & time values,
// to minimize computations in the draw handler.
var timeData = {
hr: '',
min: ''
};
// Every minute
// https://developer.pebble.com/docs/rockyjs/rocky/#on
rocky.on('minutechange', function(event) {
// Current date/time
// https://developer.pebble.com/docs/rockyjs/Date/
var d = event.date;
// Get current time, based on 12h or 24h format (01:00 or 1:00 AM)
timeData.hr = d.toLocaleTimeString().substring(0,2);
timeData.min = d.toLocaleTimeString().substring(3,5);
// Force screen redraw
rocky.requestDraw();
});
// Redraw the screen
rocky.on('draw', function(event) {
// Drawing canvas
var ctx = event.context;
// Clear the canvas
// https://developer.pebble.com/docs/rockyjs/CanvasRenderingContext2D/#Canvas
ctx.fillStyle = 'yellow';
ctx.fillRect(0, 0, ctx.canvas.clientWidth, ctx.canvas.clientHeight);
ctx.fillStyle = 'black';
ctx.rockyFillRadial(ctx.canvas.clientWidth/2, ctx.canvas.clientWidth/2, 0, ctx.canvas.clientWidth/2.125 ,0, 2* Math.PI);
ctx.fillStyle = 'white';
ctx.rockyFillRadial(ctx.canvas.clientWidth/2, ctx.canvas.clientWidth/2, 0, ctx.canvas.clientWidth/2.5 ,0, 2* Math.PI);
ctx.fillStyle = 'black';
ctx.beginPath();
ctx.moveTo(4 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.lineTo(4.5 * ctx.canvas.clientWidth/10, 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(5 * ctx.canvas.clientWidth/10, 5.25 * ctx.canvas.clientHeight/10);
ctx.lineTo(5.5 * ctx.canvas.clientWidth/10, 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(6 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.fillStyle = 'black';
ctx.rockyFillRadial(1.25 * ctx.canvas.clientWidth/10, 8.55 * ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/16 ,0, 2* Math.PI);
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/8 ,0, 2* Math.PI);
ctx.fillStyle = 'yellow';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/9 ,0, 2* Math.PI);
ctx.fillStyle = 'black';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/10 ,0, 2* Math.PI);
ctx.fillStyle = 'yellow';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/32 ,0, 2* Math.PI);
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10 + 5);
ctx.lineTo(8 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.lineTo(9 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10);
ctx.lineTo(7.32 * ctx.canvas.clientWidth/10, 8.75 * ctx.canvas.clientHeight/10);
ctx.lineTo(8 * ctx.canvas.clientWidth/10, 9.8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10);
ctx.lineTo(9.69 * ctx.canvas.clientWidth/10, 8.75 * ctx.canvas.clientHeight/10);
ctx.lineTo(9 * ctx.canvas.clientWidth/10, 9.8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.fillStyle = 'black';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/48 ,0, 2* Math.PI);
ctx.strokeStyle = 'lightgrey';
ctx.beginPath();
ctx.arc(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10, 50, 1.125 * Math.PI, 1.875 * Math.PI);
ctx.stroke();
ctx.beginPath();
ctx.arc(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10, 40, 1.125 * Math.PI, 1.875 * Math.PI);
ctx.stroke();
ctx.font = '14px bold Gothic';
ctx.fillText('0', 1.5 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientWidth/10)
ctx.fillText('15', 2.75 * ctx.canvas.clientWidth/10 - 5, 2 * ctx.canvas.clientWidth/10)
ctx.fillText('30', 4.75 * ctx.canvas.clientWidth/10 - 3, 1.5 * ctx.canvas.clientWidth/10)
ctx.fillText('45', 6.75 * ctx.canvas.clientWidth/10, 2 * ctx.canvas.clientWidth/10)
ctx.fillText('60', 8 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientWidth/10)
ctx.fillText('12', 0.8 * ctx.canvas.clientWidth/10, 7 * ctx.canvas.clientHeight/10);
ctx.fillText('3', 2 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.fillText('6', 1 * ctx.canvas.clientWidth/10, 9 * ctx.canvas.clientHeight/10);
ctx.fillText('9' , 0 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
plotLines(ctx, 0, 5, 'lightgrey');
plotLines(ctx, 5, 0, 'lightgrey');
plotLines(ctx, 10, 0, 'lightgrey');
plotLines(ctx, 15, 5, 'lightgrey');
plotLines(ctx, 20, 0, 'lightgrey');
plotLines(ctx, 25, 0, 'lightgrey');
plotLines(ctx, 30, 5, 'lightgrey');
plotLines(ctx, 35, 0, 'lightgrey');
plotLines(ctx, 40, 0, 'lightgrey');
plotLines(ctx, 45, 5, 'red');
plotLines(ctx, 50, 0, 'red');
plotLines(ctx, 55, 0, 'red');
plotLines(ctx, 60, 5, 'red');
ctx.font = '18px bold Gothic'
ctx.fillText('r/hr', 4 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientHeight/10);
ctx.lineWidth = 1;
ctx.strokeStyle = "darkgrey";
ctx.beginPath();
ctx.moveTo(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10);
var minDeg = 203 + (134/60 * parseInt(timeData.min));
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * 48) + ctx.canvas.clientWidth/2,
(Math.sin( minDeg / (180 / Math.PI) ) * 48) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
ctx.strokeStyle = 'darkcandyapplered';
ctx.beginPath();
ctx.moveTo(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * -10) + ctx.canvas.clientWidth/2,
(Math.sin( minDeg / (180 / Math.PI) ) * -10) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
var minDeg = Math.abs((360/12 * (parseInt(timeData.hr)%12)) - 90);
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.moveTo(1.25 * ctx.canvas.clientWidth/10, 8.55 * ctx.canvas.clientHeight/10);
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * 10) + 1.25 * ctx.canvas.clientWidth/10,
(Math.sin( minDeg / (180 / Math.PI) ) * 10) + 8.55 * ctx.canvas.clientHeight/10
);
ctx.stroke();
});
function plotLines(ctx, minute, boost, color){
ctx.lineWidth = 1;
ctx.strokeStyle = color;
var deg = 203 + (134/60 * minute);
ctx.beginPath();
ctx.moveTo(
(Math.cos( deg / (180 / Math.PI) ) * 40) + ctx.canvas.clientWidth/2,
(Math.sin( deg / (180 / Math.PI) ) * 40) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.lineTo(
(Math.cos( deg / (180 / Math.PI) ) * (50 + boost)) + ctx.canvas.clientWidth/2,
(Math.sin( deg / (180 / Math.PI) ) * (50 + boost)) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
}
// Send a single message to the Phone
// https://developer.pebble.com/docs/rockyjs/rocky/#postMessage
rocky.postMessage("This arrives on the phone via bluetooth!");
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = _rocky;
/***/ })
/******/ ]);

View File

@ -0,0 +1,12 @@
#include <stdint.h>
//
// AUTOGENERATED BY BUILD
// DO NOT MODIFY - CHANGES WILL BE OVERWRITTEN
//
uint32_t MESSAGE_KEY_ControlKeyChunk = 3;
uint32_t MESSAGE_KEY_ControlKeyResetComplete = 2;
uint32_t MESSAGE_KEY_ControlKeyResetRequest = 1;
uint32_t MESSAGE_KEY_ControlKeyUnsupportedError = 4;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,101 @@
////////////////////////////////////////////////////////////////////////////////
// Template vars injected by projess_js.py:
// boolean
const isSandbox = false;
// Array with absolute file path strings
const entryFilenames = ["_pkjs_shared_additions.js",
"_pkjs_message_wrapper.js",
"/home/zahkc/Documents/Projects/Pebble/geiger/src/pkjs/index.js"];
// folder path string
const outputPath = "build";
// file name string
const outputFilename = "pebble-js-app.js";
// Array with absolute folder path strings
const resolveRoots = ["/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common/include",
"/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common/tools/webpack",
"/home/zahkc/.pebble-sdk/SDKs/current/node_modules",
"/home/zahkc/Documents/Projects/Pebble/geiger/build/js"];
// Object, { alias1: 'path1', ... }
const resolveAliases = {"app_package.json": "/home/zahkc/Documents/Projects/Pebble/geiger/package.json"};
// null or Object with key 'sourceMapFilename'
const sourceMapConfig = {"sourceMapFilename": "pebble-js-app.js.map"};
////////////////////////////////////////////////////////////////////////////////
// NOTE: Must escape dollar-signs, because this is a Python template!
const webpack = require('webpack');
module.exports = (() => {
// The basic config:
const config = {
entry: entryFilenames,
output: {
path: outputPath,
filename: outputFilename
},
target: 'node',
resolve: {
root: resolveRoots,
extensions: ['', '.js', '.json'],
alias: resolveAliases
},
resolveLoader: {
root: resolveRoots
}
};
if (sourceMapConfig) {
// Enable webpack's source map output:
config.devtool = 'source-map';
config.output.sourceMapFilename = sourceMapConfig.sourceMapFilename;
config.output.devtoolModuleFilenameTemplate = '[resource-path]';
config.output.devtoolFallbackModuleFilenameTemplate = '[resourcePath]?[hash]';
}
return config;
})();
module.exports.plugins = (() => {
const plugins = [
// Returns a non-zero exit code when webpack reports an error:
require('webpack-fail-plugin'),
// Includes _message_keys_wrapper in every build to mimic old loader.js:
new webpack.ProvidePlugin({ require: '_message_key_wrapper' })
];
if (isSandbox) {
// Prevents using `require('evil_loader!mymodule')` to execute custom
// loader code during the webpack build.
const RestrictResourcePlugin = require('restrict-resource-webpack-plugin');
const plugin = new RestrictResourcePlugin(/!+/,
'Custom inline loaders are not permitted.');
plugins.push(plugin);
}
return plugins;
})();
module.exports.module = {
loaders: (() => {
const loaders = [{'test': /\.json$/, 'loader': 'json-loader'}];
if (isSandbox) {
// See restricted-resource-loader.js, prevents loading files outside
// of the project folder, i.e. `require(../../not_your_business)`:
const restrictLoader = {
'test': /^.*/, 'loader': 'restricted-resource-loader'
};
loaders.push(restrictLoader);
}
return loaders;
})()
};

View File

@ -0,0 +1,99 @@
////////////////////////////////////////////////////////////////////////////////
// Template vars injected by projess_js.py:
// boolean
const isSandbox = false;
// Array with absolute file path strings
const entryFilenames = ["/home/zahkc/Documents/Projects/Pebble/geiger/src/rocky/index.js"];
// folder path string
const outputPath = "build/resources";
// file name string
const outputFilename = "rocky-app.js";
// Array with absolute folder path strings
const resolveRoots = ["/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common/include",
"/home/zahkc/.pebble-sdk/SDKs/current/sdk-core/pebble/common/tools/webpack",
"/home/zahkc/.pebble-sdk/SDKs/current/node_modules",
"/home/zahkc/Documents/Projects/Pebble/geiger/build/js"];
// Object, { alias1: 'path1', ... }
const resolveAliases = {"app_package.json": "/home/zahkc/Documents/Projects/Pebble/geiger/package.json"};
// null or Object with key 'sourceMapFilename'
const sourceMapConfig = null;
////////////////////////////////////////////////////////////////////////////////
// NOTE: Must escape dollar-signs, because this is a Python template!
const webpack = require('webpack');
module.exports = (() => {
// The basic config:
const config = {
entry: entryFilenames,
output: {
path: outputPath,
filename: outputFilename
},
target: 'node',
resolve: {
root: resolveRoots,
extensions: ['', '.js', '.json'],
alias: resolveAliases
},
resolveLoader: {
root: resolveRoots
}
};
if (sourceMapConfig) {
// Enable webpack's source map output:
config.devtool = 'source-map';
config.output.sourceMapFilename = sourceMapConfig.sourceMapFilename;
config.output.devtoolModuleFilenameTemplate = '[resource-path]';
config.output.devtoolFallbackModuleFilenameTemplate = '[resourcePath]?[hash]';
}
return config;
})();
module.exports.plugins = (() => {
const plugins = [
// Returns a non-zero exit code when webpack reports an error:
require('webpack-fail-plugin'),
// Includes _message_keys_wrapper in every build to mimic old loader.js:
new webpack.ProvidePlugin({ require: '_message_key_wrapper' })
];
if (isSandbox) {
// Prevents using `require('evil_loader!mymodule')` to execute custom
// loader code during the webpack build.
const RestrictResourcePlugin = require('restrict-resource-webpack-plugin');
const plugin = new RestrictResourcePlugin(/!+/,
'Custom inline loaders are not permitted.');
plugins.push(plugin);
}
return plugins;
})();
module.exports.module = {
loaders: (() => {
const loaders = [{'test': /\.json$/, 'loader': 'json-loader'}];
if (isSandbox) {
// See restricted-resource-loader.js, prevents loading files outside
// of the project folder, i.e. `require(../../not_your_business)`:
const restrictLoader = {
'test': /^.*/, 'loader': 'restricted-resource-loader'
};
loaders.push(restrictLoader);
}
return loaders;
})()
};

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "Geiger Counter",
"author": "Zahkc",
"version": "1.0.0",
"keywords": ["pebble-app"],
"private": false,
"dependencies": {},
"pebble": {
"main": {
"rockyjs": "src/rocky/index.js",
"pkjs": "src/pkjs/index.js"
},
"displayName": "geiger",
"uuid": "a426b361-f97e-4934-8581-4e1cb299b74a",
"projectType": "rocky",
"sdkVersion": "3",
"enableMultiJS": true,
"watchapp": {
"watchface": true
},
"resources": {
"media": []
}
}
}

4
src/pkjs/index.js Normal file
View File

@ -0,0 +1,4 @@
// https://developer.pebble.com/docs/pebblekit-js/Pebble/#on
Pebble.on('message', function(event) {
console.log('Message received from watch:', event.data);
});

183
src/rocky/index.js Normal file
View File

@ -0,0 +1,183 @@
var rocky = require('rocky');
// An object to cache our date & time values,
// to minimize computations in the draw handler.
var timeData = {
hr: '',
min: ''
};
// Every minute
// https://developer.pebble.com/docs/rockyjs/rocky/#on
rocky.on('minutechange', function(event) {
// Current date/time
// https://developer.pebble.com/docs/rockyjs/Date/
var d = event.date;
// Get current time, based on 12h or 24h format (01:00 or 1:00 AM)
timeData.hr = d.toLocaleTimeString().substring(0,2);
timeData.min = d.toLocaleTimeString().substring(3,5);
// Force screen redraw
rocky.requestDraw();
});
// Redraw the screen
rocky.on('draw', function(event) {
// Drawing canvas
var ctx = event.context;
// Clear the canvas
// https://developer.pebble.com/docs/rockyjs/CanvasRenderingContext2D/#Canvas
ctx.fillStyle = 'yellow';
ctx.fillRect(0, 0, ctx.canvas.clientWidth, ctx.canvas.clientHeight);
ctx.fillStyle = 'black';
ctx.rockyFillRadial(ctx.canvas.clientWidth/2, ctx.canvas.clientWidth/2, 0, ctx.canvas.clientWidth/2.125 ,0, 2* Math.PI);
ctx.fillStyle = 'white';
ctx.rockyFillRadial(ctx.canvas.clientWidth/2, ctx.canvas.clientWidth/2, 0, ctx.canvas.clientWidth/2.5 ,0, 2* Math.PI);
ctx.fillStyle = 'black';
ctx.beginPath();
ctx.moveTo(4 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.lineTo(4.5 * ctx.canvas.clientWidth/10, 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(5 * ctx.canvas.clientWidth/10, 5.25 * ctx.canvas.clientHeight/10);
ctx.lineTo(5.5 * ctx.canvas.clientWidth/10, 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(6 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.fillStyle = 'black';
ctx.rockyFillRadial(1.25 * ctx.canvas.clientWidth/10, 8.55 * ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/16 ,0, 2* Math.PI);
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/8 ,0, 2* Math.PI);
ctx.fillStyle = 'yellow';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/9 ,0, 2* Math.PI);
ctx.fillStyle = 'black';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/10 ,0, 2* Math.PI);
ctx.fillStyle = 'yellow';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/32 ,0, 2* Math.PI);
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10 + 5);
ctx.lineTo(8 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.lineTo(9 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10);
ctx.lineTo(7.32 * ctx.canvas.clientWidth/10, 8.75 * ctx.canvas.clientHeight/10);
ctx.lineTo(8 * ctx.canvas.clientWidth/10, 9.8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.beginPath();
ctx.moveTo(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10);
ctx.lineTo(9.69 * ctx.canvas.clientWidth/10, 8.75 * ctx.canvas.clientHeight/10);
ctx.lineTo(9 * ctx.canvas.clientWidth/10, 9.8 * ctx.canvas.clientHeight/10);
ctx.closePath();
ctx.fill();
ctx.fillStyle = 'black';
ctx.rockyFillRadial(8.5*ctx.canvas.clientWidth/10, 8.75*ctx.canvas.clientHeight/10, 0, ctx.canvas.clientWidth/48 ,0, 2* Math.PI);
ctx.strokeStyle = 'lightgrey';
ctx.beginPath();
ctx.arc(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10, 50, 1.125 * Math.PI, 1.875 * Math.PI);
ctx.stroke();
ctx.beginPath();
ctx.arc(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10, 40, 1.125 * Math.PI, 1.875 * Math.PI);
ctx.stroke();
ctx.font = '14px bold Gothic';
ctx.fillText('0', 1.5 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientWidth/10)
ctx.fillText('15', 2.75 * ctx.canvas.clientWidth/10 - 5, 2 * ctx.canvas.clientWidth/10)
ctx.fillText('30', 4.75 * ctx.canvas.clientWidth/10 - 3, 1.5 * ctx.canvas.clientWidth/10)
ctx.fillText('45', 6.75 * ctx.canvas.clientWidth/10, 2 * ctx.canvas.clientWidth/10)
ctx.fillText('60', 8 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientWidth/10)
ctx.fillText('12', 0.8 * ctx.canvas.clientWidth/10, 7 * ctx.canvas.clientHeight/10);
ctx.fillText('3', 2 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
ctx.fillText('6', 1 * ctx.canvas.clientWidth/10, 9 * ctx.canvas.clientHeight/10);
ctx.fillText('9' , 0 * ctx.canvas.clientWidth/10, 8 * ctx.canvas.clientHeight/10);
plotLines(ctx, 0, 5, 'lightgrey');
plotLines(ctx, 5, 0, 'lightgrey');
plotLines(ctx, 10, 0, 'lightgrey');
plotLines(ctx, 15, 5, 'lightgrey');
plotLines(ctx, 20, 0, 'lightgrey');
plotLines(ctx, 25, 0, 'lightgrey');
plotLines(ctx, 30, 5, 'lightgrey');
plotLines(ctx, 35, 0, 'lightgrey');
plotLines(ctx, 40, 0, 'lightgrey');
plotLines(ctx, 45, 5, 'red');
plotLines(ctx, 50, 0, 'red');
plotLines(ctx, 55, 0, 'red');
plotLines(ctx, 60, 5, 'red');
ctx.font = '18px bold Gothic'
ctx.fillText('r/hr', 4 * ctx.canvas.clientWidth/10, 3.5 * ctx.canvas.clientHeight/10);
ctx.lineWidth = 1;
ctx.strokeStyle = "darkgrey";
ctx.beginPath();
ctx.moveTo(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10);
var minDeg = 203 + (134/60 * parseInt(timeData.min));
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * 48) + ctx.canvas.clientWidth/2,
(Math.sin( minDeg / (180 / Math.PI) ) * 48) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
ctx.strokeStyle = 'darkcandyapplered';
ctx.beginPath();
ctx.moveTo(ctx.canvas.clientWidth/2 , 5.5 * ctx.canvas.clientHeight/10);
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * -10) + ctx.canvas.clientWidth/2,
(Math.sin( minDeg / (180 / Math.PI) ) * -10) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
var minDeg = Math.abs((360/12 * (parseInt(timeData.hr)%12)) - 90);
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.moveTo(1.25 * ctx.canvas.clientWidth/10, 8.55 * ctx.canvas.clientHeight/10);
ctx.lineTo(
(Math.cos( minDeg / (180 / Math.PI) ) * 10) + 1.25 * ctx.canvas.clientWidth/10,
(Math.sin( minDeg / (180 / Math.PI) ) * 10) + 8.55 * ctx.canvas.clientHeight/10
);
ctx.stroke();
});
function plotLines(ctx, minute, boost, color){
ctx.lineWidth = 1;
ctx.strokeStyle = color;
var deg = 203 + (134/60 * minute);
ctx.beginPath();
ctx.moveTo(
(Math.cos( deg / (180 / Math.PI) ) * 40) + ctx.canvas.clientWidth/2,
(Math.sin( deg / (180 / Math.PI) ) * 40) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.lineTo(
(Math.cos( deg / (180 / Math.PI) ) * (50 + boost)) + ctx.canvas.clientWidth/2,
(Math.sin( deg / (180 / Math.PI) ) * (50 + boost)) + 5.5 * ctx.canvas.clientHeight/10
);
ctx.stroke();
}
// Send a single message to the Phone
// https://developer.pebble.com/docs/rockyjs/rocky/#postMessage
rocky.postMessage("This arrives on the phone via bluetooth!");

30
wscript Normal file
View File

@ -0,0 +1,30 @@
#
# This file is the default set of rules to compile a Pebble application.
#
# Feel free to customize this to your needs.
#
top = '.'
out = 'build'
def options(ctx):
ctx.load('pebble_sdk')
def configure(ctx):
"""
This method is used to configure your build. ctx.load(`pebble_sdk`) automatically configures
a build for each valid platform in `targetPlatforms`. Platform-specific configuration: add your
change after calling ctx.load('pebble_sdk') and make sure to set the correct environment first.
Universal configuration: add your change prior to calling ctx.load('pebble_sdk').
"""
ctx.load('pebble_sdk')
def build(ctx):
ctx.load('pebble_sdk')
ctx.pbl_bundle(js=ctx.path.ant_glob(['src/pkjs/**/*.js',
'src/pkjs/**/*.json',
'src/common/**/*.js']),
js_entry_file='src/pkjs/index.js',
bin_type='rocky')