299 Commits

Author SHA1 Message Date
Gordon Williams
2ac6e8b4fa Bangle.js2: Remove buzz when going back in a menu using the button (not the widget)
fix https://github.com/espruino/Espruino/issues/2670
2025-12-08 16:03:01 +00:00
Gordon Williams
655d3777b8 Bangle.js: Updated built-in Layout.js with some minor fixes 2025-11-12 10:53:05 +00:00
Gordon Williams
a19042a137 Updated test screen to work better when watch has been idle for a while 2025-09-24 09:12:00 +01:00
thyttan
836b002155 E_showPrompt_Q3: update minified code
Minification details:
compilation_level = SIMPLE_OPTIMIZATIONS
language_out = STABLE
Using offline closure compiler
2025-08-28 22:16:23 +02:00
thyttan
8a5b7b36de
E_showPrompt_Q3: permit passing falsy values
Author: @bobrippling

Co-authored-by: Rob Pilling <robpilling@gmail.com>
2025-08-28 21:43:02 +02:00
thyttan
79723567b6 E_showPrompt_Q3: improve readability by adding else 2025-08-27 22:30:00 +02:00
thyttan
5b83d75c95 E_showPrompt_Q3: allow long press actions
as proposed at https://github.com/espruino/BangleApps/issues/3915#issuecomment-3212066440
2025-08-22 23:29:40 +02:00
Gordon Williams
bf293ba289 Bangle.js2: Menus now buzz when back button pressed or icon tapped (fix #2642) 2025-07-22 13:54:18 +01:00
Gordon Williams
8b2e5a57b6 Bangle.js2: Fix issue using touch handler with Bangle.setUI({mode:"updown",...}) (fix #2648) 2025-07-22 13:54:18 +01:00
Gordon Williams
a454207e03 Bangle.js: Fix back handler not removed when using E.setUI with a back button but without widgets (#2636) 2025-06-10 10:24:15 +01:00
Gordon Williams
18fbbe7fa3
Merge pull request #2636 from thyttan/setui-fix
Bangle_setUI_Q3: fix btn back handler was not always rm:ed correctly
2025-06-10 10:19:43 +01:00
Gordon Williams
ba74d7eff3
remove isBtnBackFunc logic as not needed 2025-06-05 16:41:44 +01:00
Gordon Williams
9f82380d7c Bangle.js2: Fix 2v22 regression where E.showMenu({test:{}}) would display 'test:undefined' 2025-06-02 11:12:29 +01:00
thyttan
ed46a278ee Bangle_setUI_Q3: fix btn back handler was not always rm:ed correctly 2025-05-26 22:57:50 +02:00
Gordon Williams
438ca412d6 Fix for recent showMessage that displayed 'undefined' for E.showMessage() 2025-05-02 15:03:11 +01:00
Gordon Williams
1d3d4ff06e Update minified code with pretokenised ints 2025-05-02 11:13:04 +01:00
Gordon Williams
016d7fac62 Bangle.js2: showPrompt better alignment of text if no title, and add buttonHeight option 2025-04-25 16:06:29 +01:00
Gordon Williams
57e709dc2c use pretokenised minified code (and add comments - for #2626) 2025-04-22 10:58:30 +01:00
thyttan
bdd4d70a7b Bangle.setUI: fix back btn not drawn in leftmost position
The bug seems to have snuck in when the back widget was no longer set
with Object.assign in commit 453def81645c08e46195ad0627c1b77c8a59ee2a .
2025-04-20 21:54:56 +02:00
Gordon Williams
453def8164 Bangle.js: setUI/etc now don't draw a 'back' icon if there is no widget bar (or it's hidden)
Also tidy up setUI touch handling - now we have stopEventPropagation and prependListener it's easier
2025-04-01 11:22:41 +01:00
Gordon Williams
a965eac4ed misc speed tweaks 2025-03-07 09:44:49 +00:00
Gordon Williams
595160b440 Tweaks to allow up to 6 buttons in showPrompt, different heights as per https://github.com/orgs/espruino/discussions/7692#discussioncomment-12418912
Bangle.js2: Fix issue when an onchange callback from E.showMenu submenu changes the menu immediately - see https://github.com/orgs/espruino/discussions/7697
2025-03-07 09:36:38 +00:00
Gordon Williams
c52bbd12a7 Updated showMenu to use new fonts 2025-03-05 16:19:19 +00:00
Gordon Williams
b84c0f49ab Add findFont function for Bangle.js 2, use in showPrompt/showMessage
Note: this breaks Bangle.js 1 E.showMessage for now (until we have findFonts)
2025-03-05 15:45:49 +00:00
Gordon Williams
672e95948d Bangle.js2: Update test to use accelerometer to test vibration motor 2025-01-24 10:19:17 +00:00
Gordon Williams
e5d6433d1e Bangle.js: Ensure fake LED1/LED2 remember state 2025-01-21 09:46:11 +00:00
Gordon Williams
ef27cea5b7 nRF52: Bootloader now doesn't reset RESETREAS
nRF52: If we reboot because of LOCKUP, don't enable DCDC converter
            Bangle.js2: Test screen now fails if no DCDC enabled
2025-01-16 12:28:53 +00:00
Gordon Williams
7386f49f1c Bangle.js: .setUI now only clears back widget if it hasn't been hidden by widget_utils 2024-11-07 10:11:00 +00:00
Gordon Williams
138e069602 curio: fix flipping motor direction from + to -/etc 2024-11-06 13:02:16 +00:00
Gordon Williams
2665232cd7 Merge branch 'master' into thyttan-setui-q3-changes
# Conflicts:
#	ChangeLog
#	libs/js/banglejs/Bangle_setUI_F18.min.js
#	libs/js/banglejs/Bangle_setUI_Q3.min.js
2024-11-04 11:40:42 +00:00
Gordon Williams
4954da67d4 Bangle.js2: Including Layout module in internal flash 2024-11-04 11:37:21 +00:00
Gordon Williams
513817c9e6 JS in the binary now uses jspExecuteJSFunctionCode which helps to skip a parsing step
JS modules that are included are now pretokenised

# Conflicts:
#	libs/js/banglejs/Bangle_setUI_F18.min.js
#	libs/js/banglejs/Bangle_setUI_Q3.min.js
2024-11-04 11:37:02 +00:00
thyttan
12dacead0d Bangle_setUI_F18: (WIP) finish rewrite 2024-11-02 01:32:59 +01:00
thyttan
cdfb4d61cb Bangle_setUI_F18: add btnRelease (read below)
Explicitly state button should fire on falling edge.

Does not change `btn` mapped handlers to act on rising edge just jet.

As per suggestion in
https://github.com/espruino/Espruino/pull/2571#issuecomment-2426702779.
2024-11-01 21:14:18 +01:00
Gordon Williams
dc6fe85e42 adding curio boot JS 2024-10-28 15:33:37 +00:00
Gordon Williams
ef5c7c8a38 Bangle.js2: Including Layout module in internal flash 2024-10-24 12:42:21 +01:00
Gordon Williams
b8634fd8e0 JS in the binary now uses jspExecuteJSFunctionCode which helps to skip a parsing step
JS modules that are included are now pretokenised
2024-10-24 12:17:35 +01:00
thyttan
269b3e3e80 Bangle_setUI_Q3: tweaks (read below)
- Add custom handlers on top of the standard modes as well. Previously this was only possible for mode == "custom".
  - The goal here is to make it possible to move all input handling inside `setUI` where today some apps add on extra handlers outside of `setUI` calls.
- Change the default behaviour of the hardware button to act immediately on press down. Previously it has been acting on button release.
  - This makes the interaction slightly snappier.
  - In addition to the existing `btn` key a new `btnRelease` key can now be specified. `btnRelease` will let you listen to the rising edge of the hardware button.
2024-10-15 22:48:38 +02:00
Gordon Williams
25cb6ae3b3 minified files for #2565 2024-10-11 14:35:54 +01:00
thyttan
54f631d7ea E_showMenu_/E_showScroller_Q3: forward touch event
The goal was to make it possible for menus to distinguish between short
and long touches when the entry maps to a function.

With this alarms in the `alarm` app could be made togglable by longpressing
corresponding menu entries.
2024-10-11 10:46:49 +02:00
Gordon Williams
ea96724089 update other showMenus after #2569 2024-10-11 08:55:12 +01:00
thyttan
a49add78aa E_showMenu_F18/Q3: rm internal l as cb func arg
Remove internal menu object `l` as argument to callback function.

This removes a potential for memory leaks and should otherwise have no
impact. As no app on the main BangleApps repo seems to use the option.
See https://github.com/espruino/Espruino/issues/2567.

closes #2567
2024-10-11 00:10:28 +02:00
Gordon Williams
8a6aa36c16 Bangle.js: Remove debug log messages from E.showScroller (#2564)
Adding minified code
2024-10-07 10:07:18 +01:00
thyttan
3ba1c56129 E_showScroller_Q3: comment out prints to console 2024-10-06 21:10:58 +02:00
Gordon Williams
c776b2ca0c Bangle.js: Remove meridian from default locale.time function (to match 'Languages' app)
Fix https://github.com/espruino/EspruinoDocs/pull/738
2024-09-30 10:56:54 +01:00
Anton
b3add18aff Support forced meridians 2024-08-27 13:59:51 +02:00
Anton
2ec20b21b8 Update locale with support for meridians 2024-08-15 21:31:50 +02:00
Gordon Williams
ad25468f82 Bangle.js2: If tapping at the bottom of the screen on a menu that is <12px onscreen, choose the menu item above (#3476) 2024-07-04 11:17:28 +01:00
Gordon Williams
57d6b2277f Bangle.js2: After Bangle.showTestScreen, put Bangle.js into a hard off state (not soft off) 2024-06-28 08:59:14 +01:00
Gordon Williams
43f806d691 Bangle.js1: Fix issue where going out of and back into a menu would cause 'Back' to be added twice (fix #2470) 2024-05-21 11:52:18 +01:00