3 Commits

Author SHA1 Message Date
RandyTheSilly 2e124db4cb Retry Open Meteo API when overloaded 2026-07-05 19:31:41 -04:00
RandyTheSilly c2d09342a1 Add "replica" keyword 2026-07-05 12:01:31 -04:00
RandyTheSilly 0ef9e3c6c5 Correct BT indicator setting help text 2026-07-05 12:00:01 -04:00
3 changed files with 22 additions and 8 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
{
"name": "civic-segments",
"author": "RandyTheSilly",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [
"honda",
"civic",
@@ -9,7 +9,8 @@
"display",
"led",
"speedometer",
"car"
"car",
"replica"
],
"private": true,
"dependencies": {
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = [
"messageKey": "CLAY_TRACK_BT_STATUS",
"defaultValue": false,
"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",
+18 -5
View File
@@ -2,14 +2,27 @@ function weatherFailure() {
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();
xhr.timeout = 7500;
xhr.onload = function () {
if (xhr.status === 200) {
callback(this.responseText);
} else {
weatherFailure();
switch (xhr.status) {
case 200:
callback(this.responseText);
break;
case 503:
if (retries > 0) {
setTimeout(function () {
xhrRequest(url, type, callback, retries - 1);
}, 5000);
break;
}
// fallthrough
default:
weatherFailure();
}
};
xhr.onerror = function () {