From 737ad46a29fa99d830261a86f13091b6f3e82e84 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger <florian.kaltenberger@eurecom.fr> Date: Mon, 5 Nov 2018 20:58:28 +0100 Subject: [PATCH] fixing a bug when -d option is not used in nr-uesoftmodem --- targets/RT/USER/nr-ue.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index d61e3c3bad..adefa661b2 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -59,8 +59,13 @@ #include "T.h" +#ifdef XFORMS #include "PHY/TOOLS/nr_phy_scope.h" +extern char do_forms; +#endif + + extern double cpuf; //static nfapi_nr_config_request_t config_t; //static nfapi_nr_config_request_t* config =&config_t; @@ -589,12 +594,16 @@ static void *UE_thread_synch(void *arg) { break; } - extern FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX]; - - phy_scope_UE(form_ue[0], - PHY_vars_UE_g[0][0], - 0,0,7); - +#ifdef XFORMS + if (do_forms) { + extern FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX]; + + phy_scope_UE(form_ue[0], + PHY_vars_UE_g[0][0], + 0,0,7); + } +#endif + AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); // indicate readiness UE->proc.instance_cnt_synch--; -- 2.26.2