[diag] initialize tx power and channel on start (#4890)

This commit is contained in:
Yakun Xu
2020-04-26 10:02:28 -07:00
committed by GitHub
parent b19aafc76d
commit 779da7c858
+3 -3
View File
@@ -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<Radio>().Enable();
Get<Radio>().SetPromiscuous(true);
otPlatAlarmMilliStop(&GetInstance());