diff --git a/apps.json b/apps.json index b5ddcbb86..8cbc755d0 100644 --- a/apps.json +++ b/apps.json @@ -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": [ @@ -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" ], diff --git a/apps/emojuino/ChangeLog b/apps/emojuino/ChangeLog index 1c99f1970..04367183f 100644 --- a/apps/emojuino/ChangeLog +++ b/apps/emojuino/ChangeLog @@ -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. diff --git a/apps/emojuino/emojuino.js b/apps/emojuino/emojuino.js index 5b7670652..d241063e6 100644 --- a/apps/emojuino/emojuino.js +++ b/apps/emojuino/emojuino.js @@ -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(); diff --git a/apps/sensible/ChangeLog b/apps/sensible/ChangeLog index ba597a22f..baa93f297 100644 --- a/apps/sensible/ChangeLog +++ b/apps/sensible/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Corrected variable initialisation +0.03: Advertise app name, added screenshots diff --git a/apps/sensible/screenshot-acc.png b/apps/sensible/screenshot-acc.png new file mode 100644 index 000000000..b286d1ed5 Binary files /dev/null and b/apps/sensible/screenshot-acc.png differ diff --git a/apps/sensible/screenshot-bar.png b/apps/sensible/screenshot-bar.png new file mode 100644 index 000000000..781ddbaa6 Binary files /dev/null and b/apps/sensible/screenshot-bar.png differ diff --git a/apps/sensible/screenshot-gps.png b/apps/sensible/screenshot-gps.png new file mode 100644 index 000000000..3fd1229e3 Binary files /dev/null and b/apps/sensible/screenshot-gps.png differ diff --git a/apps/sensible/screenshot-hrm.png b/apps/sensible/screenshot-hrm.png new file mode 100644 index 000000000..aa6a0574f Binary files /dev/null and b/apps/sensible/screenshot-hrm.png differ diff --git a/apps/sensible/screenshot-mag.png b/apps/sensible/screenshot-mag.png new file mode 100644 index 000000000..829ac6727 Binary files /dev/null and b/apps/sensible/screenshot-mag.png differ diff --git a/apps/sensible/screenshot-top.png b/apps/sensible/screenshot-top.png new file mode 100644 index 000000000..e485933f0 Binary files /dev/null and b/apps/sensible/screenshot-top.png differ diff --git a/apps/sensible/sensible.js b/apps/sensible/sensible.js index c569ff720..45852adab 100644 --- a/apps/sensible/sensible.js +++ b/apps/sensible/sensible.js @@ -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);