Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10cc70994a | |||
| 7dba84c5d9 | |||
| 78396c4c6e | |||
| 517d0180dc | |||
| a0454fb1cd | |||
| 2050b8c811 |
12
appinfo.json
12
appinfo.json
@@ -2,8 +2,10 @@
|
||||
"appKeys": {
|
||||
"background_color": 4,
|
||||
"backlight": 17,
|
||||
"bottomrow": 19,
|
||||
"btvibe": 12,
|
||||
"center": 11,
|
||||
"cheeky": 22,
|
||||
"contrast": 13,
|
||||
"debugwatch": 50,
|
||||
"eu_date": 1,
|
||||
@@ -19,12 +21,16 @@
|
||||
"ornament_base_color": 7,
|
||||
"ornament_variation": 8,
|
||||
"quick_start": 2,
|
||||
"weekday": 18
|
||||
"stepgoal": 21,
|
||||
"weekday": 18,
|
||||
"wristflick": 20
|
||||
},
|
||||
"capabilities": [
|
||||
"configurable"
|
||||
"configurable",
|
||||
"health"
|
||||
],
|
||||
"companyName": "lastfuture",
|
||||
"enableMultiJS": false,
|
||||
"longName": "Squared 4.0",
|
||||
"projectType": "native",
|
||||
"resources": {
|
||||
@@ -38,7 +44,7 @@
|
||||
"chalk"
|
||||
],
|
||||
"uuid": "793bab03-9464-48a2-b63f-3f779c473db8",
|
||||
"versionLabel": "4.10",
|
||||
"versionLabel": "4.12",
|
||||
"watchapp": {
|
||||
"watchface": true
|
||||
}
|
||||
|
||||
@@ -9,17 +9,21 @@ String.prototype.hashCode = function(){
|
||||
return hash;
|
||||
};
|
||||
|
||||
var debugwatches = Array(/*1568511776, */1135189913, -826258655, -1783317168);
|
||||
var debugwatches = Array(
|
||||
1568511776, //c
|
||||
1135189913, //b
|
||||
-826258655, //a
|
||||
-1783317168, //em
|
||||
91860716, //a sl
|
||||
-1462573071, //b sl
|
||||
244993878 //c sl
|
||||
);
|
||||
var tokenhash;
|
||||
|
||||
|
||||
Pebble.addEventListener('ready', function() {
|
||||
console.log('PebbleKit JS ready!');
|
||||
tokenhash = Pebble.getWatchToken().hashCode();
|
||||
console.log('Watch identifier '+tokenhash);
|
||||
if (debugwatches.indexOf(tokenhash) > -1) {
|
||||
var dict = {"debugwatch": 1};
|
||||
Pebble.sendAppMessage(dict);
|
||||
}
|
||||
console.log('WatchToken '+Pebble.getWatchToken());
|
||||
});
|
||||
|
||||
Pebble.addEventListener('appmessage', function() {
|
||||
@@ -31,7 +35,7 @@ Pebble.addEventListener('showConfiguration', function() {
|
||||
if(Pebble.getActiveWatchInfo) {
|
||||
watch = Pebble.getActiveWatchInfo();
|
||||
}
|
||||
var url='http://pebble.lastfuture.de/config/squared48/';
|
||||
var url='http://pebble.lastfuture.de/config/squared412/';
|
||||
url += "?model="+watch.model;
|
||||
if (watch.platform == "basalt") {
|
||||
url += "&rect=true";
|
||||
@@ -49,8 +53,7 @@ Pebble.addEventListener('showConfiguration', function() {
|
||||
Pebble.addEventListener('webviewclosed', function(e) {
|
||||
var configData = JSON.parse(decodeURIComponent(e.response));
|
||||
console.log('Configuration page returned: '+JSON.stringify(configData));
|
||||
if (configData.background_color) {
|
||||
Pebble.sendAppMessage({
|
||||
var options = {
|
||||
large_mode: 0+(configData.large_mode === 'true'),
|
||||
eu_date: 0+(configData.eu_date === 'true'),
|
||||
quick_start: 0+(configData.quick_start === 'true'),
|
||||
@@ -69,8 +72,18 @@ Pebble.addEventListener('webviewclosed', function(e) {
|
||||
ns_start: parseInt(configData.ns_start),
|
||||
ns_stop: parseInt(configData.ns_stop),
|
||||
backlight: 0+(configData.backlight === 'true'),
|
||||
weekday: 0+(configData.weekday === 'true')
|
||||
}, function() {
|
||||
weekday: 0+(configData.weekday === 'true'),
|
||||
bottomrow: parseInt(configData.bottomrow),
|
||||
wristflick: parseInt(configData.wristflick),
|
||||
stepgoal: parseInt(configData.stepgoal),
|
||||
cheeky: 0+(configData.cheeky === 'true')
|
||||
};
|
||||
if (debugwatches.indexOf(tokenhash) > -1) {
|
||||
console.log('Debug Watch with Hash '+tokenhash+'. Setting debug flag on watchface …');
|
||||
options.debugwatch = 1;
|
||||
}
|
||||
if (configData.background_color) {
|
||||
Pebble.sendAppMessage(options, function() {
|
||||
console.log('Send successful!');
|
||||
}, function() {
|
||||
console.log('Send failed!');
|
||||
|
||||
1489
src/squared.c
1489
src/squared.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user