Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnEdwa committed Feb 23, 2018
1 parent 6634ffe commit 7a720f4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@
"watchface": true
}
},
"version": "0.9.0"
"version": "0.10.0"
}
45 changes: 25 additions & 20 deletions src/pkjs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ module.exports = [
"type": "section",
"items": [
{"type": "toggle", "id":"changelog","label": "Version 0.10 - Tap for older changelog","defaultValue": false},
{"type": "text", "id": "change0","defaultValue": "Version 0.10: 2018-02-21<br> * Fixed a fatal bug that could randomly crash and force factory reboot a watch that is on the v4 firmware, if using text_layer_get_content_size().<br>"},
{"type": "text", "id": "change0","defaultValue": "Version 0.10: 2018-02-21<br> * Fixed a fatal fimrware bug on weatherbox alignement that could randomly crash and force a factory reboot. See known issues for more details.<br>"},
{"type": "text", "id": "change6","defaultValue": "Version 0.8: 2017-11-20<br> * New Display Styles<br> * Two new Battery toggle styles.<br> * Aplite (OG) and Chalk (Time Round) release!<br> * Fonts fixed and modified to fit the W800 style better.<br> * Added images to Config Page.<br> * Fixed weather issues.<br> * Lots of tweaks and optimizations.<br>"},
{"type": "text", "id": "change5","defaultValue": "Version 0.7: 2017-06-20<br> * Fixed Word Slot steps counter.<br>"},
{"type": "text", "id": "change4","defaultValue": "Version 0.6: 2017-06-19<br> * Added customizable colours.<br> * Added a second Weather Box, Tap support and automatic branding blanking.<br> * Added a lot of new Weather Box data combinations<br> * Made PMkey import the API keys instead of polling every time, eventually reaching a daily limit.<br> * Added 'CASIO' Logo and new top slogans.<br> * Optimized and cleaned the code.<br> * <a href='https://github.com/JohnEdwa/W800'>Github Release.</a><br>"},
{"type": "text", "id": "change3","defaultValue": "Version 0.5: 2017-06-15<br> * Added Pebble Master Key (pmkey.xyz) support.<br> * Added Week, Day and Month numbers.<br> * Added Debug/Error display to Weather Box.<br> * Fiddled with the config page order and added some descriptions. <br> * Fixed weather autolocation.<br> * Font Fixes.<br> * Temp fix for sunset/sunrise times (Forces 24 hour mode until I figure it out properly)"},
{"type": "text", "id": "change2","defaultValue": "Version 0.4: 2017-06-13<br> * Fixed weather refresh after settings changes."},
{"type": "text", "id": "change1","defaultValue": "Version 0.1: 2017-06-13<br> * Initial release for Basalt and Diorite."},
{"type": "toggle", "id":"issues","label": "Tap for a list of known issues","defaultValue": false},
{"type": "text", "id":"issues1","defaultValue": "<br> * Roman Numeral Vibes are always full strength.<br> * Config page remembers only one set of saved items, even when swapping watches.<br> * Seconds display uses a little more battery than needed."},
{"type": "text", "id":"issues1","defaultValue": "Sometimes when ivoking 'text_layer_get_content_size()' on version 4 firmware, the watch will freeze and crash. This command is required to dynamically get the weather box size to determine if it should be two lines, or one centered line, so a hacky workaround based on character lenghts was implemented. Contact me if you find something looking wrong.<br> * Roman Numeral Vibes are always full strength.<br> * Config page remembers only one set of saved items, even when swapping watches.<br> * Seconds display uses a little more battery than needed."},
]
},

Expand All @@ -33,12 +33,14 @@ module.exports = [
"type": "toggle",
"messageKey": "enWeather",
"label": "Enable Weather.",
"description": "Required for any weather information.",
"defaultValue": true
},
{
"type": "toggle",
"messageKey": "enHealth",
"label": "Enable Health",
"description": "Required for steps or heartrate displays.",
"defaultValue": true,
"capabilities": ["HEALTH"],
},
Expand Down Expand Up @@ -219,6 +221,7 @@ module.exports = [
"type": "toggle",
"messageKey": "bConf[4]",
"label": "Show Light/Next/Prev labels.",
"description": "Small labels for the physical buttons.",
"defaultValue": true
},
{
Expand Down Expand Up @@ -957,15 +960,15 @@ module.exports = [
{"label": "Temperatures (Low/Current/Max)", "value": "2"},
{"label": "Current Weather", "value": "3"},
{"label": "Forecast Weather", "value": "4"},
{"label": "Sunrise + Sunset Times", "value": "5"},
{"label": "Sunrise & Sunset Times", "value": "5"},
{"label": "Temps + Location", "value": "21"},
{"label": "Temps + Current Weather", "value": "23"},
{"label": "Temps + Forecast Weather", "value": "24"},
{"label": "Temps + Sunrise + Sunset", "value": "25"},
{"label": "Temps + Sunrise & Sunset", "value": "25"},
{"label": "Location + Temps", "value": "12"},
{"label": "Location + Current Weather", "value": "13"},
{"label": "Location + Forecast Weather", "value": "14"},
{"label": "Location + Sunrise + Sunset", "value": "15"},
{"label": "Location + Sunrise & Sunset", "value": "15"},
{"label": "Current Weather + Forecast Weather", "value": "34"},
{"label": "Forecast Weather + Current Weather", "value": "43"},
]
Expand All @@ -981,15 +984,15 @@ module.exports = [
{"label": "Temperatures (Low/Current/Max)", "value": "2"},
{"label": "Current Weather", "value": "3"},
{"label": "Forecast Weather", "value": "4"},
{"label": "Sunrise + Sunset Times", "value": "5"},
{"label": "Sunrise & Sunset Times", "value": "5"},
{"label": "Temps + Location", "value": "21"},
{"label": "Temps + Current Weather", "value": "23"},
{"label": "Temps + Forecast Weather", "value": "24"},
{"label": "Temps + Sunrise + Sunset", "value": "25"},
{"label": "Temps + Sunrise & Sunset", "value": "25"},
{"label": "Location + Temps", "value": "12"},
{"label": "Location + Current Weather", "value": "13"},
{"label": "Location + Forecast Weather", "value": "14"},
{"label": "Location + Sunrise + Sunset", "value": "15"},
{"label": "Location + Sunrise & Sunset", "value": "15"},
{"label": "Current Weather + Forecast Weather", "value": "34"},
{"label": "Forecast Weather + Current Weather", "value": "43"},
]
Expand All @@ -1005,15 +1008,15 @@ module.exports = [
{"label": "Temperatures (Low/Current/Max)", "value": "2"},
{"label": "Current Weather", "value": "3"},
{"label": "Forecast Weather", "value": "4"},
{"label": "Sunrise + Sunset Times", "value": "5"},
{"label": "Sunrise & Sunset Times", "value": "5"},
{"label": "Temps + Location", "value": "21"},
{"label": "Temps + Current Weather", "value": "23"},
{"label": "Temps + Forecast Weather", "value": "24"},
{"label": "Temps + Sunrise + Sunset", "value": "25"},
{"label": "Temps + Sunrise & Sunset", "value": "25"},
{"label": "Location + Temps", "value": "12"},
{"label": "Location + Current Weather", "value": "13"},
{"label": "Location + Forecast Weather", "value": "14"},
{"label": "Location + Sunrise + Sunset", "value": "15"},
{"label": "Location + Sunrise & Sunset", "value": "15"},
{"label": "Current Weather + Forecast Weather", "value": "34"},
{"label": "Forecast Weather + Current Weather", "value": "43"},
]
Expand All @@ -1029,15 +1032,15 @@ module.exports = [
{"label": "Temperatures (Low/Current/Max)", "value": "2"},
{"label": "Current Weather", "value": "3"},
{"label": "Forecast Weather", "value": "4"},
{"label": "Sunrise + Sunset Times", "value": "5"},
{"label": "Sunrise & Sunset Times", "value": "5"},
{"label": "Temps + Location", "value": "21"},
{"label": "Temps + Current Weather", "value": "23"},
{"label": "Temps + Forecast Weather", "value": "24"},
{"label": "Temps + Sunrise + Sunset", "value": "25"},
{"label": "Temps + Sunrise & Sunset", "value": "25"},
{"label": "Location + Temps", "value": "12"},
{"label": "Location + Current Weather", "value": "13"},
{"label": "Location + Forecast Weather", "value": "14"},
{"label": "Location + Sunrise + Sunset", "value": "15"},
{"label": "Location + Sunrise & Sunset", "value": "15"},
{"label": "Current Weather + Forecast Weather", "value": "34"},
{"label": "Forecast Weather + Current Weather", "value": "43"},
]
Expand Down Expand Up @@ -1085,13 +1088,15 @@ module.exports = [
"type": "select",
"messageKey": "wConf[3]",
"defaultValue": "30",
"description" : "Weather data that is 4 times older than this value gets cleared (15 min -> 60 min, 2 hours -> 8 hours)",
"description" : "Weather data that is 4 times older than this value gets cleared to not show old information. (because of BT or network issues, or using another app on the watch.)<br>",
"label": "Weather update period.",
"options": [
{"label": "15min", "value": "15"},
{"label": "30min", "value": "30"},
{"label": "1 hour", "value": "1"},
{"label": "2 hours", "value": "2"}
{"label": "2 hours", "value": "2"},
{"label": "3 hours", "value": "3"},
{"label": "4 hours", "value": "4"},
]
},
{
Expand Down Expand Up @@ -1127,7 +1132,7 @@ module.exports = [
"messageKey": "pmkEmail",
"defaultValue": "",
"label": "PMKey Email",
"attributes": { "placeholder": "Pebble Master Key Email Address", "limit": 16, "type": "email",}
"attributes": { "placeholder": "Pebble Master Key Email Address", "limit": 64, "type": "email",}
},
{
"type": "input",
Expand All @@ -1152,14 +1157,14 @@ module.exports = [
"messageKey": "keyWU",
"defaultValue": "",
"label": "Weather Undeground API Key",
"attributes": { "placeholder": "API key is REQUIRED for WU.", "limit": 19,}
"attributes": { "placeholder": "API key is REQUIRED for WU.", "limit": 32,}
},
{
"type": "input",
"messageKey": "keyOWM",
"defaultValue": "",
"label": "OpenWeatherMap API Key",
"attributes": { "placeholder": "Using default OWM Key.", "limit": 39,}
"attributes": { "placeholder": "Using default OWM Key.", "limit": 32,}
},
]
},
Expand All @@ -1172,7 +1177,7 @@ module.exports = [
{"type": "text", "defaultValue": "<a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/'><img alt='Creative Commons License' style='border-width:0' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAPCAMAAABEF7i9AAAAllBMVEUAAAD///+rsapERER3d3eIiIjMzMzu7u4iIiKUmZO6v7rKzsoODg4RERFVVVUNDQ0NDg0PEA8zMzNLTEtbXltmZmZydnF9gn2AgICPkI+ZmZmqqqq7u7vFxsXIzMgNDQwZGRkgICAhISEkJSMnKCcuMC4xMzE5Ozk7PTtBQkFCQkJDQ0Nna2eGhoaHh4ezuLLGysbd3d1wVGpAAAAA0klEQVR42q2T1xbCIAyGk0CXdlmto3XvPd7/5QRL1432WHI4XED4+PMHALQHag0JJBlXMNQScx2ibu9PdTnQcY3iErYl6oxbAo/rUrUJA6J5vx0wNNC0gVkMbBPZXtQ8Uf6qpNJwOf0EjmCKto+ce1aSIg9FzTO1/xlYyVeL34FDMC3ZFT+SNXOX6PEsBKm0rIOYPYuGClnsWTxBHtQV1gRhI4UUGJh6EAsPoxdedjUPK+dzT38DDyvNXXYW9wJ43mh4h6ItN8U7Ldv+FN1/WXO8Aed5CQIgC4KiAAAAAElFTkSuQmCC' /></a>&nbsp; &nbsp; &nbsp;<a href='https://github.com/JohnEdwa/W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5p6kIIRcXF5O5GgqFvn3/oVarX15eLi8vPR4Py7IMwwyHw263KwjC4eEhAErp10g4Go0qaw4fHR3NSjoWi7VarVKpBCAYDNpsNoZhAGg0mt3dXYltqVRqt9vTbBU8lgBsbW3ZbLb7+3sABoNhuoEDqFQqdrvdbrd/tLt0r9ejlJbL5Ynn7u5uPB4/Pz8r+i6teuO1pNPpgsEgy7Icx4miKIpiMplsNpuKfiz9HQBmEMMV0EMbpQAAAABJRU5ErkJggg=='></a>"},
{"type": "toggle", "id":"credits", "label": "Tap for other credits.", "defaultValue": false},
{"type": "text", "id":"credits1", "defaultValue": "Thanks to orviwan for the <a href='https://apps.getpebble.com/en_US/application/52b231c2b70e1c159500009b'>91 DUB V4.0</a>, and Pedro for the <a href='https://apps.getpebble.com/en_US/application/540888f892ecf49ebe000106'>DB 31</a> watchfaces which were my main inspiration for this project, and also the source for a few of the resources used."},
{"type": "text", "id":"credits2", "defaultValue": "Thanks for bug reports and suggestions go to (in no particular order): <br> Michael Abdelmalek, /u/NiVZ78, /u/spoi, /u/Birde-x, /u/dryingsocks, /u/duhwiked, /u/RoelSG7, /u/u532m3132, /u/shindrichs and /u/IDontReadTheTitle."},
{"type": "text", "id":"credits2", "defaultValue": "Thanks for bug reports and suggestions go to (in no particular order): <br> Michael Abdelmalek, Joe Sparano, /u/NiVZ78, /u/spoi, /u/Birde-x, /u/dryingsocks, /u/duhwiked, /u/RoelSG7, /u/u532m3132, /u/shindrichs and /u/IDontReadTheTitle."},
{"type": "text", "id":"credits0", "defaultValue": "Weather provided by: <a href='https://openweathermap.org/'><img src='http://openweathermap.org/themes/openweathermap/assets/vendor/owm/img/logo_OpenWeatherMap_orange.svg' style='width:55%'></a><a href='https://www.wunderground.com/'><img style='width:80%' src='https://icons.wxug.com/logos/PNG/wundergroundLogo_4c_rev_horz.png'></a>"},
{"type": "text","defaultValue": "",},
]
Expand Down

0 comments on commit 7a720f4

Please sign in to comment.