commit
122a8c592f
|
|
@ -14,3 +14,4 @@
|
|||
0.13: Cache loaded ClockInfos so if we have clockInfoWidget and a clock, we don't load them twice (saves ~300ms)
|
||||
0.14: Check for .clkinfocache and use that if exists (from boot 0.64)
|
||||
0.15: Fix error when displaying a category with only one clockinfo (fix #3728)
|
||||
0.16: Add BLE clkinfo entry
|
||||
|
|
|
|||
|
|
@ -118,6 +118,30 @@ exports.load = function() {
|
|||
}
|
||||
hrm = 0;
|
||||
},
|
||||
},
|
||||
{ name: "BLE",
|
||||
hasRange: false,
|
||||
isOn: () => {
|
||||
const s = NRF.getSecurityStatus();
|
||||
return s.advertising || s.connected;
|
||||
},
|
||||
get: function() {
|
||||
return {
|
||||
text: this.isOn() ? "On" : "Off",
|
||||
img: atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA==")
|
||||
};
|
||||
},
|
||||
run: function() {
|
||||
if (this.isOn()) {
|
||||
NRF.sleep();
|
||||
} else {
|
||||
NRF.wake();
|
||||
Bluetooth.setConsole(1);
|
||||
}
|
||||
setTimeout(() => this.emit("redraw"), 250);
|
||||
},
|
||||
show: function(){},
|
||||
hide: function(){},
|
||||
}
|
||||
],
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "clock_info",
|
||||
"name": "Clock Info Module",
|
||||
"shortName": "Clock Info",
|
||||
"version":"0.15",
|
||||
"version":"0.16",
|
||||
"description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)",
|
||||
"icon": "app.png",
|
||||
"type": "module",
|
||||
|
|
|
|||
Loading…
Reference in New Issue