widdst 0.04: Give the boot file the highest priority to ensure it runs before sched (fix #2663)

master
Gordon Williams 2023-03-31 14:09:39 +01:00
parent 36d1877100
commit a39b773ac1
3 changed files with 6 additions and 4 deletions

View File

@ -105,7 +105,8 @@ if (!date.toLocalISOString) boot += `Date.prototype.toLocalISOString = function(
// show timings // show timings
if (DEBUG) boot += `print(".boot0",0|(Date.now()-_tm),"ms");_tm=Date.now();\n` if (DEBUG) boot += `print(".boot0",0|(Date.now()-_tm),"ms");_tm=Date.now();\n`
// ================================================== BOOT.JS // ================================================== BOOT.JS
// Append *.boot.js files // Append *.boot.js files.
// Name files with a number - eg 'foo.5.boot.js' to enforce order (lowest first). Numbered files get placed before non-numbered
// These could change bleServices/bleServiceOptions if needed // These could change bleServices/bleServiceOptions if needed
let bootFiles = require('Storage').list(/\.boot\.js$/).sort((a,b)=>{ let bootFiles = require('Storage').list(/\.boot\.js$/).sort((a,b)=>{
let getPriority = /.*\.(\d+)\.boot\.js$/; let getPriority = /.*\.(\d+)\.boot\.js$/;

View File

@ -1,3 +1,4 @@
0.01: Initial version 0.01: Initial version
0.02: Checks for correct firmware; E.setDST(...) moved to boot.js 0.02: Checks for correct firmware; E.setDST(...) moved to boot.js
0.03: Convert Yes/No On/Off in settings to checkboxes 0.03: Convert Yes/No On/Off in settings to checkboxes
0.04: Give the boot file the highest priority to ensure it runs before sched (fix #2663)

View File

@ -1,7 +1,7 @@
{ "id": "widdst", { "id": "widdst",
"name": "Daylight Saving", "name": "Daylight Saving",
"version":"0.03", "version":"0.04",
"description": "Widget to set daylight saving rules. Requires Espruino 2v14.49 or later - see the instructions below for more information.", "description": "Widget to set daylight saving rules. Requires Espruino 2v15 or later - see the instructions below for more information.",
"icon": "icon.png", "icon": "icon.png",
"type": "widget", "type": "widget",
"tags": "widget,tool", "tags": "widget,tool",
@ -9,7 +9,7 @@
"readme": "README.md", "readme": "README.md",
"storage": [ "storage": [
{"name":"widdst.wid.js","url":"widget.js"}, {"name":"widdst.wid.js","url":"widget.js"},
{"name":"widdst.boot.js","url":"boot.js"}, {"name":"widdst.0.boot.js","url":"boot.js"},
{"name":"widdst.settings.js","url":"settings.js"} {"name":"widdst.settings.js","url":"settings.js"}
], ],
"data": [{"name":"widdst.json"}] "data": [{"name":"widdst.json"}]