1
1

6 Commits
4.10 ... 4.12

Author SHA1 Message Date
10cc70994a final polish on step tracking and battery level 2016-02-16 21:38:41 +01:00
7dba84c5d9 Integrated battery and step goal, bottom or flick 2016-02-13 02:26:25 +01:00
78396c4c6e Improvements all around
Memory usage improvements, combination of charsets, better handling of config page submit Started adding health / battery display, more...
2016-02-12 17:50:10 +01:00
517d0180dc further performance improvements 2016-01-24 19:15:40 +01:00
a0454fb1cd code prettifications 2016-01-21 20:36:34 +01:00
2050b8c811 cleaned up types 2016-01-21 02:14:06 +01:00
3 changed files with 1090 additions and 592 deletions

View File

@@ -2,8 +2,10 @@
"appKeys": { "appKeys": {
"background_color": 4, "background_color": 4,
"backlight": 17, "backlight": 17,
"bottomrow": 19,
"btvibe": 12, "btvibe": 12,
"center": 11, "center": 11,
"cheeky": 22,
"contrast": 13, "contrast": 13,
"debugwatch": 50, "debugwatch": 50,
"eu_date": 1, "eu_date": 1,
@@ -19,12 +21,16 @@
"ornament_base_color": 7, "ornament_base_color": 7,
"ornament_variation": 8, "ornament_variation": 8,
"quick_start": 2, "quick_start": 2,
"weekday": 18 "stepgoal": 21,
"weekday": 18,
"wristflick": 20
}, },
"capabilities": [ "capabilities": [
"configurable" "configurable",
"health"
], ],
"companyName": "lastfuture", "companyName": "lastfuture",
"enableMultiJS": false,
"longName": "Squared 4.0", "longName": "Squared 4.0",
"projectType": "native", "projectType": "native",
"resources": { "resources": {
@@ -38,7 +44,7 @@
"chalk" "chalk"
], ],
"uuid": "793bab03-9464-48a2-b63f-3f779c473db8", "uuid": "793bab03-9464-48a2-b63f-3f779c473db8",
"versionLabel": "4.10", "versionLabel": "4.12",
"watchapp": { "watchapp": {
"watchface": true "watchface": true
} }

View File

@@ -9,17 +9,21 @@ String.prototype.hashCode = function(){
return hash; 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; var tokenhash;
Pebble.addEventListener('ready', function() { Pebble.addEventListener('ready', function() {
console.log('PebbleKit JS ready!'); console.log('PebbleKit JS ready!');
tokenhash = Pebble.getWatchToken().hashCode(); console.log('WatchToken '+Pebble.getWatchToken());
console.log('Watch identifier '+tokenhash);
if (debugwatches.indexOf(tokenhash) > -1) {
var dict = {"debugwatch": 1};
Pebble.sendAppMessage(dict);
}
}); });
Pebble.addEventListener('appmessage', function() { Pebble.addEventListener('appmessage', function() {
@@ -31,7 +35,7 @@ Pebble.addEventListener('showConfiguration', function() {
if(Pebble.getActiveWatchInfo) { if(Pebble.getActiveWatchInfo) {
watch = 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; url += "?model="+watch.model;
if (watch.platform == "basalt") { if (watch.platform == "basalt") {
url += "&rect=true"; url += "&rect=true";
@@ -47,33 +51,42 @@ Pebble.addEventListener('showConfiguration', function() {
}); });
Pebble.addEventListener('webviewclosed', function(e) { Pebble.addEventListener('webviewclosed', function(e) {
var configData = JSON.parse(decodeURIComponent(e.response)); var configData = JSON.parse(decodeURIComponent(e.response));
console.log('Configuration page returned: '+JSON.stringify(configData)); console.log('Configuration page returned: '+JSON.stringify(configData));
if (configData.background_color) { var options = {
Pebble.sendAppMessage({ large_mode: 0+(configData.large_mode === 'true'),
large_mode: 0+(configData.large_mode === 'true'), eu_date: 0+(configData.eu_date === 'true'),
eu_date: 0+(configData.eu_date === 'true'), quick_start: 0+(configData.quick_start === 'true'),
quick_start: 0+(configData.quick_start === 'true'), leading_zero: 0+(configData.leading_zero === 'true'),
leading_zero: 0+(configData.leading_zero === 'true'), background_color: configData.background_color,
background_color: configData.background_color, number_base_color: configData.number_base_color,
number_base_color: configData.number_base_color, number_variation: configData.number_variation,
number_variation: configData.number_variation, ornament_base_color: configData.ornament_base_color,
ornament_base_color: configData.ornament_base_color, ornament_variation: configData.ornament_variation,
ornament_variation: configData.ornament_variation, invert: 0+(configData.invert === 'true'),
invert: 0+(configData.invert === 'true'), monochrome: 0+(configData.monochrome === 'true'),
monochrome: 0+(configData.monochrome === 'true'), center: 0+(configData.center === 'true'),
center: 0+(configData.center === 'true'), btvibe: 0+(configData.btvibe === 'true'),
btvibe: 0+(configData.btvibe === 'true'), contrast: 0+(configData.contrast === 'true'),
contrast: 0+(configData.contrast === 'true'), nightsaver: 0+(configData.nightsaver === 'true'),
nightsaver: 0+(configData.nightsaver === 'true'), ns_start: parseInt(configData.ns_start),
ns_start: parseInt(configData.ns_start), ns_stop: parseInt(configData.ns_stop),
ns_stop: parseInt(configData.ns_stop), backlight: 0+(configData.backlight === 'true'),
backlight: 0+(configData.backlight === 'true'), weekday: 0+(configData.weekday === 'true'),
weekday: 0+(configData.weekday === 'true') bottomrow: parseInt(configData.bottomrow),
}, function() { wristflick: parseInt(configData.wristflick),
console.log('Send successful!'); stepgoal: parseInt(configData.stepgoal),
}, function() { cheeky: 0+(configData.cheeky === 'true')
console.log('Send failed!'); };
}); 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!');
});
}
}); });

File diff suppressed because it is too large Load Diff