summaryrefslogtreecommitdiff
path: root/source/ui
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-19 22:28:09 +0200
committercirakg <cirakg@cirakg.xyz>2026-10-19 22:28:09 +0200
commit871aba901501302586895d266fe4569665d9fe70 (patch)
tree57653efe44e9cc27c676457ebee41d24c3be809d /source/ui
parent97a366e8b7c540b246c7bf9d04625526cbdc88ba (diff)
perf(crypto): XOR PBKDF2 blocks as 32-bit words and step 100 iterations
200 byte-wise iterations in one event tripped the 120,000-bytecode watchdog on the Forerunner 255S profile. Word-wise XOR makes PBKDF2 2.3x faster (22 ms per 1000 iterations in the simulator). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/ui')
-rw-r--r--source/ui/HomeDelegate.mc16
-rw-r--r--source/ui/HomeView.mc42
2 files changed, 0 insertions, 58 deletions
diff --git a/source/ui/HomeDelegate.mc b/source/ui/HomeDelegate.mc
deleted file mode 100644
index fe23ae6..0000000
--- a/source/ui/HomeDelegate.mc
+++ /dev/null
@@ -1,16 +0,0 @@
-// Author: cirakg & claude ai
-// Summary: Input handling for the home screen.
-//
-// HomeDelegate: input handling for the home screen.
-//
-// M0 has no actions yet. Inheriting BehaviorDelegate keeps the default
-// behaviours, so BACK (button or swipe) leaves the app on every device.
-
-import Toybox.WatchUi;
-
-class HomeDelegate extends WatchUi.BehaviorDelegate {
-
- function initialize() {
- BehaviorDelegate.initialize();
- }
-}
diff --git a/source/ui/HomeView.mc b/source/ui/HomeView.mc
deleted file mode 100644
index f73c783..0000000
--- a/source/ui/HomeView.mc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Author: cirakg & claude ai
-// Summary: M0 placeholder home screen showing the app name and version.
-//
-// HomeView: the M0 placeholder home screen. It draws the app name and version
-// in the centre of the screen. Milestone M4 replaces it with the entry list.
-//
-// Performance note: everything that allocates (loading the name string,
-// building the version text) happens once in initialize(), not in onUpdate().
-
-import Toybox.Graphics;
-import Toybox.Lang;
-import Toybox.WatchUi;
-
-class HomeView extends WatchUi.View {
-
- private var _title as String;
- private var _version as String;
- // Set after the first complete draw, so start-up diagnostics run once.
- private var _firstFrameDone as Boolean = false;
-
- function initialize() {
- View.initialize();
- _title = WatchUi.loadResource(Rez.Strings.AppName) as String;
- _version = "v" + AppInfo.VERSION;
- }
-
- function onUpdate(dc as Graphics.Dc) as Void {
- var centerX = dc.getWidth() / 2;
- var centerY = dc.getHeight() / 2;
- var justify = Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER;
-
- dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
- dc.clear();
- dc.drawText(centerX, centerY, Graphics.FONT_MEDIUM, _title, justify);
- dc.drawText(centerX, centerY + dc.getFontHeight(Graphics.FONT_MEDIUM), Graphics.FONT_XTINY, _version, justify);
-
- if (!_firstFrameDone) {
- _firstFrameDone = true;
- Diag.firstFrame();
- }
- }
-}