mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
[utils] fix build when OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0 (#10260)
Issue: Disabling channel monitor feature on ot-daemon by setting following flag "OT_CHANNEL_MONITOR = 0" a compilation error was present. Fix: Some pieces of code in OpenThread shall be under OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE. Signed-off-by: Ashishkumar Vara <[email protected]>
This commit is contained in:
@@ -216,8 +216,10 @@ void ChannelManager::HandleTimer(void)
|
||||
switch (mState)
|
||||
{
|
||||
case kStateIdle:
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
|
||||
LogInfo("Auto-triggered channel select");
|
||||
IgnoreError(RequestAutoChannelSelect(false));
|
||||
#endif
|
||||
StartAutoSelectTimer();
|
||||
break;
|
||||
|
||||
@@ -423,12 +425,14 @@ exit:
|
||||
#if OPENTHREAD_FTD
|
||||
void ChannelManager::SetAutoNetworkChannelSelectionEnabled(bool aEnabled)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
|
||||
if (aEnabled != mAutoSelectEnabled)
|
||||
{
|
||||
mAutoSelectEnabled = aEnabled;
|
||||
IgnoreError(RequestNetworkChannelSelect(false));
|
||||
StartAutoSelectTimer();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user