From 779da7c858445d11df571dabfe344f11670c4109 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Mon, 27 Apr 2020 01:02:28 +0800 Subject: [PATCH] [diag] initialize tx power and channel on start (#4890) --- src/core/diags/factory_diags.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/diags/factory_diags.cpp b/src/core/diags/factory_diags.cpp index 43aa3114a..afe5ea36a 100644 --- a/src/core/diags/factory_diags.cpp +++ b/src/core/diags/factory_diags.cpp @@ -160,9 +160,6 @@ Diags::Diags(Instance &aInstance) , mRepeatActive(false) { mStats.Clear(); - - otPlatDiagChannelSet(mChannel); - otPlatDiagTxPowerSet(mTxPower); } otError Diags::ProcessChannel(uint8_t aArgsLength, char *aArgs[], char *aOutput, size_t aOutputMaxLen) @@ -291,6 +288,9 @@ otError Diags::ProcessStart(uint8_t aArgsLength, char *aArgs[], char *aOutput, s otError error = OT_ERROR_NONE; + otPlatDiagChannelSet(mChannel); + otPlatDiagTxPowerSet(mTxPower); + Get().Enable(); Get().SetPromiscuous(true); otPlatAlarmMilliStop(&GetInstance());