Merge branch 'master' of github.com:crazysaem/BangleApps
commit
c09da000ed
20
apps.json
20
apps.json
|
|
@ -727,7 +727,7 @@
|
|||
{
|
||||
"id": "gpsrec",
|
||||
"name": "GPS Recorder",
|
||||
"version": "0.26",
|
||||
"version": "0.27",
|
||||
"description": "Application that allows you to record a GPS track. Can run in background",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,outdoors,gps,widget",
|
||||
|
|
@ -2086,12 +2086,12 @@
|
|||
"id": "numerals",
|
||||
"name": "Numerals Clock",
|
||||
"shortName": "Numerals Clock",
|
||||
"version": "0.09",
|
||||
"version": "0.10",
|
||||
"description": "A simple big numerals clock",
|
||||
"icon": "numerals.png",
|
||||
"type": "clock",
|
||||
"tags": "numerals,clock",
|
||||
"supports": ["BANGLEJS"],
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"allow_emulator": true,
|
||||
"screenshots": [{"url":"bangle1-numerals-screenshot.png"}],
|
||||
"storage": [
|
||||
|
|
@ -4387,7 +4387,7 @@
|
|||
"id": "emojuino",
|
||||
"name": "Emojuino",
|
||||
"shortName": "Emojuino",
|
||||
"version": "0.02",
|
||||
"version": "0.03",
|
||||
"description": "Emojis & Espruino: broadcast Unicode emojis via Bluetooth Low Energy.",
|
||||
"icon": "emojuino.png",
|
||||
"screenshots": [
|
||||
|
|
@ -4575,7 +4575,7 @@
|
|||
"shortName":"93 Dub",
|
||||
"icon": "93dub.png",
|
||||
"screenshots": [{"url":"screenshot.png"}],
|
||||
"version":"0.04",
|
||||
"version":"0.05",
|
||||
"description": "Fan recreation of orviwan's 91 Dub app for the Pebble smartwatch. Uses assets from his 91-Dub-v2.0 repo",
|
||||
"tags": "clock",
|
||||
"type": "clock",
|
||||
|
|
@ -4605,9 +4605,17 @@
|
|||
"id": "sensible",
|
||||
"name": "SensiBLE",
|
||||
"shortName": "SensiBLE",
|
||||
"version": "0.02",
|
||||
"version": "0.03",
|
||||
"description": "Collect, display and advertise real-time sensor data.",
|
||||
"icon": "sensible.png",
|
||||
"screenshots": [
|
||||
{ "url": "screenshot-top.png" },
|
||||
{ "url": "screenshot-acc.png" },
|
||||
{ "url": "screenshot-bar.png" },
|
||||
{ "url": "screenshot-gps.png" },
|
||||
{ "url": "screenshot-hrm.png" },
|
||||
{ "url": "screenshot-mag.png" }
|
||||
],
|
||||
"type": "app",
|
||||
"tags": "tool,sensors",
|
||||
"supports" : [ "BANGLEJS2" ],
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
0.02: DiscoMinotaur's adjustments (removed battery and adjusted spacing)
|
||||
0.03: Code style cleanup
|
||||
0.04: Set 00:00 to 12:00 for 12 hour time
|
||||
0.05: Display time, even on Thursday
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
Uses many portions from Espruino documentation, example watchfaces, and the waveclk app. It also sourced from Jon Barlow's 91 Dub v2.0 source code and resources and adapted for Bangle.js 2's screen. Time, date and the battery display works. It is not pixel perfect to the original.
|
||||
|
||||
Contributors:
|
||||
Leer10
|
||||
Orviwan (original watchface and assets)
|
||||
Gordon Williams (Bangle.js, watchapps for reference code and documentation)
|
||||
DiscoMinotaur (adjustments)
|
||||
Ray Holder (minor 12 hour time rendering adjustment)
|
||||
* Leer10
|
||||
* Orviwan (original watchface and assets)
|
||||
* Gordon Williams (Bangle.js, watchapps for reference code and documentation)
|
||||
* DiscoMinotaur (adjustments)
|
||||
* Ray Holder (minor 12 hour time rendering adjustment, fix Thursdays)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ function draw(){
|
|||
if (w == 1) {imgW = imgMon;}
|
||||
if (w == 2) {imgW = imgTue;}
|
||||
if (w == 3) {imgW = imgWed;}
|
||||
if (w == 4) {imgW = imgThr;}
|
||||
if (w == 4) {imgW = imgThu;}
|
||||
if (w == 5) {imgW = imgFri;}
|
||||
if (w == 6) {imgW = imgSat;}
|
||||
g.drawImage(imgW, 85, 63);
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
0.01: New App!
|
||||
0.02: Upgraded text to images, added welcome screen and subtitles.
|
||||
0.03: Advertise app name as Espruino manufacturer data when idle.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ const CYCLE_BUZZ_MILLISECONDS = 50;
|
|||
const WELCOME_MESSAGE = 'Emojuino:\r\n\r\n< Swipe >\r\nto select\r\n\r\nTap\r\nto transmit';
|
||||
|
||||
// Non-user-configurable constants
|
||||
const APP_ID = 'emojuino';
|
||||
const IMAGE_INDEX = 0;
|
||||
const CODE_POINT_INDEX = 1;
|
||||
const EMOJI_PX = 96;
|
||||
|
|
@ -40,12 +41,11 @@ const EMOJI_Y = (g.getHeight() - EMOJI_PX) / 2;
|
|||
const TX_X = 68;
|
||||
const TX_Y = 12;
|
||||
const FONT_SIZE = 24;
|
||||
const BTN_WATCH_OPTIONS = { repeat: true, debounce: 20, edge: "falling" };
|
||||
const ESPRUINO_COMPANY_CODE = 0x0590;
|
||||
const UNICODE_CODE_POINT_ELIDED_UUID = [ 0x49, 0x6f, 0x49, 0x44, 0x55,
|
||||
0x54, 0x46, 0x2d, 0x33, 0x32 ];
|
||||
|
||||
|
||||
|
||||
// Global variables
|
||||
let emojiIndex = 0;
|
||||
let isToggleOn = false;
|
||||
|
|
@ -100,9 +100,22 @@ function transmitEmoji(image, codePoint, duration) {
|
|||
}
|
||||
|
||||
|
||||
// Transmit the app name under the Espruino company code to facilitate discovery
|
||||
function transmitAppName() {
|
||||
let options = {
|
||||
showName: false,
|
||||
manufacturer: ESPRUINO_COMPANY_CODE,
|
||||
manufacturerData: JSON.stringify({ name: APP_ID }),
|
||||
interval: 2000
|
||||
}
|
||||
|
||||
NRF.setAdvertising({}, options);
|
||||
}
|
||||
|
||||
|
||||
// Terminate the emoji transmission
|
||||
function terminateEmoji(displayIntervalId) {
|
||||
NRF.setAdvertising({ });
|
||||
transmitAppName();
|
||||
isTransmitting = false;
|
||||
clearInterval(displayIntervalId);
|
||||
drawImage(EMOJIS[emojiIndex][IMAGE_INDEX], false);
|
||||
|
|
@ -169,3 +182,4 @@ g.setFontAlign(0, 0);
|
|||
g.drawString(WELCOME_MESSAGE, g.getWidth() / 2, g.getHeight() / 2);
|
||||
Bangle.on('touch', handleTouch);
|
||||
Bangle.on('drag', handleDrag);
|
||||
transmitAppName();
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@
|
|||
0.24: Better support for Bangle.js 2, avoid widget area for Graphs, smooth graphs more
|
||||
0.25: Fix issue where if Bangle.js 2 got a GPS fix but no reported time, errors could be caused by the widget (fix #935)
|
||||
0.26: Multiple bugfixes
|
||||
0.27: Map drawing with light theme (fix #1023)
|
||||
|
|
|
|||
|
|
@ -197,15 +197,14 @@ function plotTrack(info) {
|
|||
g.setColor(1,0.5,0.5);
|
||||
g.setFont("Vector",16);
|
||||
g.drawString("Track"+info.fn.toString()+" - Loading",10,220);
|
||||
g.setColor(0,0,0);
|
||||
g.setColor(g.theme.bg);
|
||||
g.fillRect(0,220,239,239);
|
||||
if (!info.qOSTM) {
|
||||
g.setColor(1, 0, 0);
|
||||
g.fillRect(9,80,11,120);
|
||||
g.fillPoly([9,60,19,80,0,80]);
|
||||
g.setColor(1,1,1);
|
||||
g.setColor(g.theme.fg);
|
||||
g.drawString("N",2,40);
|
||||
g.setColor(1,1,1);
|
||||
} else {
|
||||
osm.lat = info.lat;
|
||||
osm.lon = info.lon;
|
||||
|
|
@ -228,7 +227,7 @@ function plotTrack(info) {
|
|||
g.setColor(0,1,0);
|
||||
g.fillCircle(mp.x,mp.y,5);
|
||||
if (info.qOSTM) g.setColor(1,0,0.55);
|
||||
else g.setColor(1,1,1);
|
||||
else g.setColor(g.theme.fg);
|
||||
l = f.readLine(f);
|
||||
while(l!==undefined) {
|
||||
c = l.split(",");
|
||||
|
|
@ -248,11 +247,11 @@ function plotTrack(info) {
|
|||
g.setColor(1,0,0);
|
||||
g.fillCircle(ox,oy,5);
|
||||
if (info.qOSTM) g.setColor(0, 0, 0);
|
||||
else g.setColor(1,1,1);
|
||||
else g.setColor(g.theme.fg);
|
||||
g.drawString(require("locale").distance(dist),g.getWidth() / 2, g.getHeight() - 20);
|
||||
g.setFont("6x8",2);
|
||||
g.setFontAlign(0,0,3);
|
||||
g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40);
|
||||
g.drawString("Back",g.getWidth() - 10, g.getHeight()/2);
|
||||
setWatch(function() {
|
||||
viewTrack(info.fn, info);
|
||||
}, global.BTN3||BTN1);
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@
|
|||
0.07: Add date on touch and some improvements (see settings and readme)
|
||||
0.08: Add new draw styles, tidy up draw functionality
|
||||
0.09: Tweak for faster rendering
|
||||
0.10: Enhance for use with Bangle2, insert new draw mode 'thickfill'
|
||||
|
|
@ -7,14 +7,20 @@ Settings can be accessed through the app/widget settings menu of the Bangle.js
|
|||
|
||||
### Color:
|
||||
* rnd - shows numerals in different color combinations every time the watches wakes
|
||||
* r/g - red/green
|
||||
* y/w - yellow/white
|
||||
* o/c - orange/cyan
|
||||
* b/y - blue/yellow'ish
|
||||
* r/g - red/green (Bangle1/Bangle2)
|
||||
* y/w - yellow/white (Bangle1 only)
|
||||
* o/c - orange/cyan (Bangle1 only)
|
||||
* b/y - blue/yellow'ish (Bangle1 only)
|
||||
* r/g - red/green (Bangle2 only)
|
||||
* g/b - green/blue (Bangle2 only)
|
||||
* r/c - red/cyan (Bangle2 only)
|
||||
* m/g - magenta/green (Bangle2 only)
|
||||
|
||||
### Draw mode
|
||||
* fill - fill numerals
|
||||
* frame - only shows outline of numerals
|
||||
* framefill - frame with lighter color fill
|
||||
* thickfill - thick frame in theme foreground color
|
||||
|
||||
### Menu button
|
||||
* choose button to start launcher menu with
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* + see README.md for details
|
||||
*/
|
||||
|
||||
var numerals = {
|
||||
var numerals = {
|
||||
0:[[9,1,82,1,90,9,90,92,82,100,9,100,1,92,1,9],[30,25,61,25,69,33,69,67,61,75,30,75,22,67,22,33]],
|
||||
1:[[50,1,82,1,90,9,90,92,82,100,73,100,65,92,65,27,50,27,42,19,42,9]],
|
||||
2:[[9,1,82,1,90,9,90,53,82,61,21,61,21,74,82,74,90,82,90,92,82,100,9,100,1,92,1,48,9,40,70,40,70,27,9,27,1,19,1,9]],
|
||||
|
|
@ -19,8 +19,8 @@ var numerals = {
|
|||
9:[[9,1,82,1,90,9,90,92,82,100,9,100,1,92,1,82,9,74,69,74,69,61,9,61,1,53,1,9],[22,27,69,27,69,41,22,41]],
|
||||
};
|
||||
var _12hour = (require("Storage").readJSON("setting.json",1)||{})["12hour"]||false;
|
||||
var _hCol = ["#ff5555","#ffff00","#FF9901","#2F00FF"];
|
||||
var _mCol = ["#55ff55","#ffffff","#00EFEF","#FFBF00"];
|
||||
var _hCol = [];
|
||||
var _mCol = [];
|
||||
var _rCol = 0;
|
||||
var scale = g.getWidth()/240;
|
||||
var interval = 0;
|
||||
|
|
@ -42,15 +42,23 @@ var drawFuncs = {
|
|||
},
|
||||
thickframe : function(poly,isHole){
|
||||
g.drawPoly(poly,true);
|
||||
g.drawPoly(translate(1,0,poly),true);
|
||||
g.drawPoly(translate(1,1,poly),true);
|
||||
g.drawPoly(translate(0,1,poly),true);
|
||||
g.drawPoly(translate(1,0,poly,1),true);
|
||||
g.drawPoly(translate(1,1,poly,1),true);
|
||||
g.drawPoly(translate(0,1,poly,1),true);
|
||||
},
|
||||
thickfill : function(poly,isHole){
|
||||
if (isHole) g.setColor(g.theme.bg);
|
||||
g.fillPoly(poly,true);
|
||||
g.setColor(g.theme.fg);
|
||||
g.drawPoly(translate(1,0,poly,1),true);
|
||||
g.drawPoly(translate(1,1,poly,1),true);
|
||||
g.drawPoly(translate(0,1,poly,1),true);
|
||||
}
|
||||
};
|
||||
|
||||
function translate(tx, ty, p){
|
||||
function translate(tx, ty, p, ascale){
|
||||
//return p.map((x, i)=> x+((i&1)?ty:tx));
|
||||
return g.transformVertices(p, {x:tx,y:ty,scale:scale});
|
||||
return g.transformVertices(p, {x:tx,y:ty,scale:ascale==undefined?scale:ascale});
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -99,6 +107,18 @@ function setUpdateInt(set){
|
|||
if (set) interval=setInterval(draw, REFRESH_RATE);
|
||||
}
|
||||
|
||||
function setUp(){
|
||||
if (process.env.HWVERSION==1){
|
||||
_hCol = ["#ff5555","#ffff00","#FF9901","#2F00FF"];
|
||||
_mCol = ["#55ff55","#ffffff","#00EFEF","#FFBF00"];
|
||||
} else {
|
||||
_hCol = ["#ff0000","#00ff00","#ff0000","#ff00ff"];
|
||||
_mCol = ["#00ff00","#0000ff","#00ffff","#00ff00"];
|
||||
}
|
||||
if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length);
|
||||
}
|
||||
|
||||
setUp();
|
||||
g.clear(1);
|
||||
// Show launcher when button pressed
|
||||
Bangle.setUI("clock");
|
||||
|
|
@ -111,11 +131,12 @@ if (settings.showDate) {
|
|||
}
|
||||
Bangle.on('lcdPower', function(on){
|
||||
if (on){
|
||||
if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length);
|
||||
setUp();
|
||||
draw();
|
||||
setUpdateInt(1);
|
||||
} else setUpdateInt(0);
|
||||
});
|
||||
Bangle.on('lock', () => setUp());
|
||||
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
}
|
||||
let numeralsSettings = storage.readJSON('numerals.json',1);
|
||||
if (!numeralsSettings) resetSettings();
|
||||
let dm = ["fill","frame","framefill","thickframe"];
|
||||
let col = ["rnd","r/g","y/w","o/c","b/y"];
|
||||
let dm = ["fill","frame","framefill","thickframe","thickfill"];
|
||||
let col = process.env.HWVERSION==1?["rnd","r/g","y/w","o/c","b/y"]:["rnd","r/g","g/b","r/c","m/g"];
|
||||
let btn = [[24,"BTN1"],[22,"BTN2"],[23,"BTN3"],[11,"BTN4"],[16,"BTN5"]];
|
||||
var menu={
|
||||
"" : { "title":"Numerals"},
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
0.01: New App!
|
||||
0.02: Corrected variable initialisation
|
||||
0.03: Advertise app name, added screenshots
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
// Non-user-configurable constants
|
||||
const APP_ID = 'sensible';
|
||||
const ESPRUINO_COMPANY_CODE = 0x0590;
|
||||
|
||||
|
||||
// Global variables
|
||||
|
|
@ -90,6 +91,19 @@ let magMenu = {
|
|||
};
|
||||
|
||||
|
||||
// Transmit the app name under the Espruino company code to facilitate discovery
|
||||
function transmitAppName() {
|
||||
let options = {
|
||||
showName: false,
|
||||
manufacturer: ESPRUINO_COMPANY_CODE,
|
||||
manufacturerData: JSON.stringify({ name: APP_ID }),
|
||||
interval: 2000
|
||||
}
|
||||
|
||||
NRF.setAdvertising({}, options);
|
||||
}
|
||||
|
||||
|
||||
// Update acceleration
|
||||
Bangle.on('accel', function(newAcc) {
|
||||
acc = newAcc;
|
||||
|
|
@ -155,6 +169,7 @@ Bangle.on('mag', function(newMag) {
|
|||
|
||||
// On start: enable sensors and display main menu
|
||||
g.clear();
|
||||
transmitAppName();
|
||||
Bangle.setBarometerPower(isBarEnabled, APP_ID);
|
||||
Bangle.setGPSPower(isGpsEnabled, APP_ID);
|
||||
Bangle.setHRMPower(isHrmEnabled, APP_ID);
|
||||
|
|
|
|||
Loading…
Reference in New Issue