Skip to content

Improve MFG workflow#1005

Open
gmarull wants to merge 48 commits intocoredevices:mainfrom
teslabs:mfg-tweaks-getafix
Open

Improve MFG workflow#1005
gmarull wants to merge 48 commits intocoredevices:mainfrom
teslabs:mfg-tweaks-getafix

Conversation

@gmarull
Copy link
Copy Markdown
Member

@gmarull gmarull commented Mar 20, 2026

Fixes FIRM-1288

@gmarull gmarull force-pushed the mfg-tweaks-getafix branch 3 times, most recently from 6a697ce to d32773c Compare March 23, 2026 18:00
@gmarull gmarull requested a review from jplexer March 24, 2026 11:19
@gmarull gmarull force-pushed the mfg-tweaks-getafix branch from d32773c to 283791a Compare March 24, 2026 11:19
@gmarull gmarull marked this pull request as ready for review March 24, 2026 11:19
@gmarull gmarull force-pushed the mfg-tweaks-getafix branch 2 times, most recently from ced5c01 to 5c344ec Compare March 24, 2026 11:35
@gmarull gmarull force-pushed the mfg-tweaks-getafix branch from 5c344ec to 6b30d94 Compare March 31, 2026 12:23
gmarull and others added 20 commits April 1, 2026 16:33
Just look for axes variation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove Test HRM from the extras menu as it's a hardware test that belongs
in the tests menu, not in extras. Keep the relaunch mechanism in place for
future extras items.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add a new mfg_test_result module that keeps test results (pass/fail
and a uint32_t value) in a static RAM array, replacing the legacy
MFG_INFO_RECORDS_TEST_RESULTS mechanism.

Each test app can call mfg_test_result_report() to record its outcome.
The test menu queries results via mfg_test_result_get() to show
check/X icons for all tests. Tests that haven't reported yet show no
icon.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Report pass/fail and buttons_pressed bitmask via the new
mfg_test_result API so the test menu shows [P]/[F] status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Instead of cycling patterns endlessly, show a confirmation dialog
after all patterns have been displayed. Up button records PASS,
Down/Back records FAIL via the mfg_test_result API, then exits.

Removes the legacy MFG_INFO_RECORDS_TEST_RESULTS code path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Give users 10s to touch all zones. If all touched before timeout,
show PASS for 3s; otherwise show FAIL for 3s. Report result via
mfg_test_result API and exit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Track the selected menu index when launching a test. On return,
automatically select the next entry so the operator can quickly
proceed through the test list. First open defaults to the first
entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
After cycling through all backlight colors, show a confirmation dialog
asking if the backlight is OK and report the result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Replace the 3-orientation test (flat/left/front) with a single
variation-based approach matching the magnetometer test: track min/max
on all axes during a 5-second window while the user rotates the device,
pass if all axes vary by at least 500 mG. Report result automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Display pass/fail for 3 seconds after the test completes, report the
result, and automatically close the app instead of waiting for user
input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Display pass/fail for 3 seconds after the test completes, report the
result via mfg_test_result_report, and automatically close the app.
Clean up unused includes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
After playing audio for 5 seconds, stop playback and show a
confirmation dialog asking if the speaker sounds OK. Report the test
result. Applies to both asterix and obelix variants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Report test result, display pass/fail for 3 seconds after analysis
completes (or on failure), then automatically close the app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
After recording and playing back both microphone channels, show a
confirmation dialog asking if the microphone sounds OK and report the
test result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Report test result (including average reading), display pass/fail for
3 seconds, then automatically close the app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Report calibration failure immediately with 3s display before closing.
Vibrate exactly 5 times, then show a confirmation dialog asking if the
vibration is OK and report the test result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
gmarull and others added 24 commits April 1, 2026 16:33
Report success via mfg_test_result_report after programming the color,
then automatically close the app after 3 seconds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
When the charge test reaches pass or fail, allow the back button to
report the result via mfg_test_result_report and exit the app. Remove
the select long-press exit handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Run discharge test for max 2 hours with minute-interval updates (second
ticks only while waiting for unplug). Pass if battery % drop <= 1%.
Display pass/fail, report result, and let user exit with back button.
Back during discharge finishes the test early.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add a new manufacturing test that restarts BLE and asks the operator to
confirm the watch is advertising with the expected device name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The aging test is not part of the standard manufacturing test flow, so
move it from the main test menu to the extras menu.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add an app that encodes all test results into a QR code for scanning.
Each test is encoded as a short tag with pass/fail status and optional
value (e.g. BTN:P,F; DSP:P; ALS:P,14900). Iterates over all test IDs
so new tests are automatically included.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Only show RGB color test patterns on platforms with color backlight.
Non-color platforms show only the white step before prompting the
result dialog. Also remove the PLATFORM_OBELIX guard from the test
menu so backlight test is available on all platforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
…hen finished

Add a select (center) button handler to both charge and discharge tests
so that the operator can exit by pressing the center key once the test
has completed (pass or fail).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
When a test completes (pass or fail), automatically launch the next test
instead of returning to the menu. When the user presses BACK to exit a
test without completing it, the menu now selects the current test rather
than advancing to the next one.

Add mfg_test_result_was_reported() to detect whether a test result was
recorded since the last check, allowing the menu to distinguish test
completion from user back-out. Refactor the test entries table to file
scope with get_info function pointers, replacing per-test select
callbacks with a single generic one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Previously back button was ignored while the charge test was running.
Allow exiting at any time; result is only reported if the test had
already finished.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Only auto-advance to the next test when the previous test passed.
On failure, return to the menu with the failed test selected so the
operator can immediately retry it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Simplify the charge test to only check that charging starts and
temperature is within range:

- Wait for watch to be plugged
- Once plugged, wait up to 5s for charging to start
- If charging and temperature in range, PASS; otherwise FAIL
- Auto-close on unplug after result

Remove battery percentage/fast charge logic, long countdown timer,
and button-based result reporting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Move the aging test entry from the extras menu to the main menu,
placed just before the reset option for easier access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove the BT Device Name entry from the main manufacturing menu
along with its application code, as it is no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Display the serial number and battery percentage in the Device Info
menu item subtitle (e.g. "XXXXXX - 90%"), updating live via the
battery state service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove the extras menu entirely and move its only remaining item
(Load PRF) to the main menu as the last option.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Rework BLE Adv app to display a QR code with the device MAC address
and the MAC as text below it. Remove pass/fail confirmation dialog
and test result reporting. Move from test menu to main menu (after
Aging) and remove MfgTestId_Adv.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Program Color now reports the WatchInfoColor enum as the test result
value. QR results renders it as the color short name (e.g. CLR:P,BK20).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
@gmarull gmarull force-pushed the mfg-tweaks-getafix branch from 203603c to 85ecadf Compare April 1, 2026 14:33
gmarull and others added 3 commits April 1, 2026 17:06
Rewrite the aging test with a new flow:
1. Wait for charger plug
2. Charge to 70% (max 90min, temp 15-35C monitored)
3. Disable charging, ask user to unplug
4. Cycle components (accel, mag, backlight, audio, ALS, vibe) for 4h
5. Check battery drop <= 5%, show PASS/FAIL

BLE and console are disabled for the entire test duration to reduce
power consumption. Duration selection menu is removed (always 4h).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove the standalone discharge test, as the aging test now covers
discharge monitoring with component cycling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Split the test menu into two modes: semi-finished and finished.
Each test entry has a mode bitmask controlling its availability.
Currently, Program Color is only available in finished mode; all
other tests are available in both modes.

The main menu now has "Semi-finished Tests" and "Finished Tests"
entries. QR results skips tests not available in the active mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants