diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-18 23:44:18 +0200 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-18 23:44:18 +0200 |
| commit | ac60fb060414261935ac5e158b26b34e211e1e06 (patch) | |
| tree | a8f97e1c4b0bf8f1b433d3e8f33a5d30994e7c58 /spike/settings/source/SpikeDelegate.mc | |
| parent | 93aa7e3aa291f3328cf34a5a2f86172f41d0affd (diff) | |
feat(spike): add the M1 settings spike app and make targets
A separate throwaway app (own app ID, no permissions) that shows what the
Garmin Connect app delivers per settings field and writes values back, to
measure the undocumented settings limits on the real phone and watch.
Includes length-marked test strings, `make spike` / `make spike-sim`,
`make vectors`, and step-by-step instructions in docs/SETTINGS_SPIKE.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'spike/settings/source/SpikeDelegate.mc')
| -rw-r--r-- | spike/settings/source/SpikeDelegate.mc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spike/settings/source/SpikeDelegate.mc b/spike/settings/source/SpikeDelegate.mc new file mode 100644 index 0000000..94b3ece --- /dev/null +++ b/spike/settings/source/SpikeDelegate.mc @@ -0,0 +1,35 @@ +// Author: cirakg & claude ai +// Summary: Input of the spike screen: UP/DOWN or swipes scroll, START/tap jumps back to the top. + +import Toybox.Lang; +import Toybox.WatchUi; + +class SpikeDelegate extends WatchUi.BehaviorDelegate { + + // Lines moved per button press or swipe. + private const SCROLL_STEP = 3; + // Large enough to reach the first line from anywhere. + private const TO_TOP = -1000; + + private var _view as SpikeView; + + function initialize(view as SpikeView) { + BehaviorDelegate.initialize(); + _view = view; + } + + function onNextPage() as Boolean { + _view.scroll(SCROLL_STEP); + return true; + } + + function onPreviousPage() as Boolean { + _view.scroll(-SCROLL_STEP); + return true; + } + + function onSelect() as Boolean { + _view.scroll(TO_TOP); + return true; + } +} |
