Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e124db4cb | |||
| c2d09342a1 | |||
| 0ef9e3c6c5 |
+3
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "civic-segments",
|
"name": "civic-segments",
|
||||||
"author": "RandyTheSilly",
|
"author": "RandyTheSilly",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"honda",
|
"honda",
|
||||||
"civic",
|
"civic",
|
||||||
@@ -9,7 +9,8 @@
|
|||||||
"display",
|
"display",
|
||||||
"led",
|
"led",
|
||||||
"speedometer",
|
"speedometer",
|
||||||
"car"
|
"car",
|
||||||
|
"replica"
|
||||||
],
|
],
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ module.exports = [
|
|||||||
"messageKey": "CLAY_TRACK_BT_STATUS",
|
"messageKey": "CLAY_TRACK_BT_STATUS",
|
||||||
"defaultValue": false,
|
"defaultValue": false,
|
||||||
"label": "BT disconnect indicator",
|
"label": "BT disconnect indicator",
|
||||||
"description": "Change the color of the digits to the configured warning color when the connection to the phone is lost."
|
"description": "Change the color of the hour digits to the configured warning color when the app connection is lost."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "slider",
|
"type": "slider",
|
||||||
|
|||||||
+16
-3
@@ -2,13 +2,26 @@ function weatherFailure() {
|
|||||||
Pebble.sendAppMessage({ PKJS_TEMP_BAR_COUNT: -1 });
|
Pebble.sendAppMessage({ PKJS_TEMP_BAR_COUNT: -1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
var xhrRequest = function (url, type, callback) {
|
var xhrRequest = function (url, type, callback, retries) {
|
||||||
|
if (retries === undefined) {
|
||||||
|
retries = 2;
|
||||||
|
}
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.timeout = 7500;
|
xhr.timeout = 7500;
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (xhr.status === 200) {
|
switch (xhr.status) {
|
||||||
|
case 200:
|
||||||
callback(this.responseText);
|
callback(this.responseText);
|
||||||
} else {
|
break;
|
||||||
|
case 503:
|
||||||
|
if (retries > 0) {
|
||||||
|
setTimeout(function () {
|
||||||
|
xhrRequest(url, type, callback, retries - 1);
|
||||||
|
}, 5000);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// fallthrough
|
||||||
|
default:
|
||||||
weatherFailure();
|
weatherFailure();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user