From ac60fb060414261935ac5e158b26b34e211e1e06 Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 23:44:18 +0200 Subject: 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 --- spike/settings/source/SpikeApp.mc | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 spike/settings/source/SpikeApp.mc (limited to 'spike/settings/source/SpikeApp.mc') diff --git a/spike/settings/source/SpikeApp.mc b/spike/settings/source/SpikeApp.mc new file mode 100644 index 0000000..c5adcb2 --- /dev/null +++ b/spike/settings/source/SpikeApp.mc @@ -0,0 +1,43 @@ +// Author: cirakg & claude ai +// Summary: Settings spike entry point: analyses every setting on start and on each change, and writes a status back. +// +// The spike measures what Garmin doesn't document (README section 16, M1): +// how long a text setting may be, which characters survive, whether values +// the watch writes back reach the phone, and when onSettingsChanged fires. +// It is a throwaway app with its own app id; nothing here is reused by OTP +// Wallet except the measured numbers. + +import Toybox.Application; +import Toybox.Lang; +import Toybox.WatchUi; + +class SpikeApp extends Application.AppBase { + + // The analysis shown on screen, refreshed on start and on every change. + var report as SpikeReport; + + function initialize() { + AppBase.initialize(); + report = new SpikeReport(); + } + + // Read the values the watch already has (from the last sync). + function onStart(state as Dictionary?) as Void { + report.analyseOnStart(); + DebugSelfTest.run(self); + } + + function onStop(state as Dictionary?) as Void { + } + + function getInitialView() as [Views] or [Views, InputDelegates] { + var view = new SpikeView(report); + return [view, new SpikeDelegate(view)]; + } + + // Called when you save the settings on the phone while the app runs. + function onSettingsChanged() as Void { + report.settingsChanged(); + WatchUi.requestUpdate(); + } +} -- cgit v1.2.3