Skip to content

Commit 99cca48

Browse files
committed
fw/apps/prf: re-enable MFG test apps on normal PRF
Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 9f67ffb commit 99cca48

File tree

2 files changed

+8
-40
lines changed

2 files changed

+8
-40
lines changed

src/fw/apps/prf_apps/mfg_menu_app.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ static void prv_launch_app_cb(void *data) {
7878
app_manager_launch_new_app(&(AppLaunchConfig) { .md = data });
7979
}
8080

81-
#ifdef MANUFACTURING_FW
8281
static void prv_select_bt_device_name(int index, void *context) {
8382
launcher_task_add_callback(prv_launch_app_cb, (void*) mfg_bt_device_name_app_get_info());
8483
}
@@ -187,7 +186,6 @@ static void prv_select_load_prf(int index, void *context) {
187186
#endif
188187
system_reset();
189188
}
190-
#endif // MANUFACTURING_FW
191189

192190
static void prv_select_reset(int index, void *context) {
193191
system_reset();
@@ -239,7 +237,6 @@ static size_t prv_create_menu_items(SimpleMenuItem** out_menu_items) {
239237

240238
// Define a const blueprint on the stack.
241239
const SimpleMenuItem s_menu_items[] = {
242-
#ifdef MANUFACTURING_FW
243240
{ .title = "BT Device Name", .callback = prv_select_bt_device_name },
244241
{ .title = "Device Serial", .callback = prv_select_serial_qr },
245242
#if PBL_ROUND
@@ -280,7 +277,6 @@ static size_t prv_create_menu_items(SimpleMenuItem** out_menu_items) {
280277
{ .title = "Certification", .callback = prv_select_certification },
281278
{ .title = "Program Color", .callback = prv_select_program_color },
282279
{ .title = "Load PRF", .callback = prv_select_load_prf },
283-
#endif
284280
{ .title = "Reset", .callback = prv_select_reset },
285281
{ .title = "Shutdown", .callback = prv_select_shutdown }
286282
};
@@ -289,7 +285,6 @@ static size_t prv_create_menu_items(SimpleMenuItem** out_menu_items) {
289285
*out_menu_items = app_malloc(sizeof(s_menu_items));
290286
memcpy(*out_menu_items, s_menu_items, sizeof(s_menu_items));
291287

292-
#if MANUFACTURING_FW
293288
// Now we're going to modify the first two elements in the menu to include data available only
294289
// at runtime. If it was available at compile time we could have just shoved it in the
295290
// s_menu_items array but it's not. Note that we allocate a few buffers here that we never
@@ -309,7 +304,6 @@ static size_t prv_create_menu_items(SimpleMenuItem** out_menu_items) {
309304
mfg_info_get_serialnumber(device_serial, buffer_size);
310305

311306
(*out_menu_items)[1].subtitle = device_serial;
312-
#endif
313307

314308
// We've now populated out_menu_items with the correct data. Return the number of items by
315309
// looking at the original list of menu items.

src/fw/wscript

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -564,45 +564,19 @@ def _build_recovery(bld):
564564
if 'MFG_INFO_RECORDS_TEST_RESULTS' not in bld.env.DEFINES:
565565
excludes.extend('mfg/results_ui.c')
566566

567-
if not bld.env.IS_MFG:
567+
if not bld.is_asterix():
568568
excludes.extend([
569-
'apps/prf_apps/mfg_accel_app.c',
570-
'apps/prf_apps/mfg_als_app.c',
571-
'apps/prf_apps/mfg_audio_app.c',
572-
'apps/prf_apps/mfg_backlight_app.c',
573-
'apps/prf_apps/mfg_battery_discharge_app.c',
574-
'apps/prf_apps/mfg_bt_device_name_app.c',
575-
'apps/prf_apps/mfg_bt_sig_rf_app_app.c',
576-
'apps/prf_apps/mfg_button_app.c',
577-
'apps/prf_apps/mfg_certification_app.c',
578-
'apps/prf_apps/mfg_display_app.c',
579-
'apps/prf_apps/mfg_display_calibration_app.c',
580-
'apps/prf_apps/mfg_hrm_app.c',
569+
'apps/prf_apps/mfg_speaker_app.c',
581570
'apps/prf_apps/mfg_mic_app.c',
571+
'apps/prf_apps/mfg_sine_wave.c',
572+
])
573+
574+
if not bld.is_obelix():
575+
excludes.extend([
576+
'apps/prf_apps/mfg_audio_app.c',
582577
'apps/prf_apps/mfg_pdm_mic_app.c',
583-
'apps/prf_apps/mfg_program_color_app.c',
584-
'apps/prf_apps/mfg_runin_app.c',
585-
'apps/prf_apps/mfg_serial_qr_app.c',
586-
'apps/prf_apps/mfg_sine_wave_app.c',
587-
'apps/prf_apps/mfg_speaker_app.c',
588578
'apps/prf_apps/mfg_test_aging_app.c',
589-
'apps/prf_apps/mfg_touch_app.c',
590-
'apps/prf_apps/mfg_vibe_app.c',
591579
])
592-
else:
593-
if not bld.is_asterix():
594-
excludes.extend([
595-
'apps/prf_apps/mfg_speaker_app.c',
596-
'apps/prf_apps/mfg_mic_app.c',
597-
'apps/prf_apps/mfg_sine_wave.c',
598-
])
599-
600-
if not bld.is_obelix():
601-
excludes.extend([
602-
'apps/prf_apps/mfg_audio_app.c',
603-
'apps/prf_apps/mfg_pdm_mic_app.c',
604-
'apps/prf_apps/mfg_test_aging_app.c',
605-
])
606580

607581
if bld.is_silk():
608582
bld.env.append_value('DEFINES', ['QSPI_DMA_DISABLE=1'])

0 commit comments

Comments
 (0)