Import of the watch repository from Pebble

This commit is contained in:
Matthieu Jeanson
2025-01-27 11:38:16 -08:00
committed by Katharine Berry
commit 3b92768480
10334 changed files with 2564465 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Ignore build generated files
build
+17
View File
@@ -0,0 +1,17 @@
{
"uuid": "4fcaae25-0cb3-4ba0-83b0-01f313fee892",
"shortName": "data_logging_spam",
"longName": "data_logging_spam",
"companyName": "MakeAwesomeHappen",
"versionCode": 1,
"versionLabel": "1.0",
"watchapp": {
"watchface": false
},
"appKeys": {
"dummy": 0
},
"resources": {
"media": []
}
}
@@ -0,0 +1,42 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <pebble.h>
static void log_data(void *data) {
DataLoggingSessionRef *session = data_logging_create(0, DATA_LOGGING_BYTE_ARRAY, 4, true);
for (int i = 0; i < 32; ++i) {
uint32_t t = ((uint32_t) time(NULL)) + i;
data_logging_log(session, &t, 1);
}
data_logging_finish(session);
app_timer_register(100, log_data, 0);
}
int main(void) {
Window *window = window_create();
const bool animated = true;
window_stack_push(window, animated);
app_timer_register(100, log_data, 0);
app_event_loop();
}
+24
View File
@@ -0,0 +1,24 @@
#
# This file is the default set of rules to compile a Pebble project.
#
# Feel free to customize this to your needs.
#
top = '.'
out = 'build'
def options(ctx):
ctx.load('pebble_sdk')
def configure(ctx):
ctx.load('pebble_sdk')
def build(ctx):
ctx.load('pebble_sdk')
ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
target='pebble-app.elf')
ctx.pbl_bundle(elf='pebble-app.elf',
js=ctx.path.ant_glob('src/js/**/*.js'))