@@ -53,17 +53,17 @@ CHIP_ERROR ApplicationSleepManager::Init()
53
53
void ApplicationSleepManager::OnCommissioningWindowOpened ()
54
54
{
55
55
mIsCommissionningWindowOpen = true ;
56
- #if (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
56
+ #if (defined(SLI_SI917 ) && SLI_SI917 == 1)
57
57
mWifiSleepManager ->VerifyAndTransitionToLowPowerMode ();
58
- #endif // (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
58
+ #endif // (defined(SLI_SI917 ) && SLI_SI917 == 1)
59
59
}
60
60
61
61
void ApplicationSleepManager::OnCommissioningWindowClosed ()
62
62
{
63
63
mIsCommissionningWindowOpen = false ;
64
- #if (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
64
+ #if (defined(SLI_SI917 ) && SLI_SI917 == 1)
65
65
mWifiSleepManager ->VerifyAndTransitionToLowPowerMode ();
66
- #endif // (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
66
+ #endif // (defined(SLI_SI917 ) && SLI_SI917 == 1)
67
67
}
68
68
69
69
void ApplicationSleepManager::OnSubscriptionEstablished (chip::app::ReadHandler & aReadHandler)
@@ -93,6 +93,17 @@ void ApplicationSleepManager::OnFabricCommitted(const chip::FabricTable & fabric
93
93
mWifiSleepManager ->VerifyAndTransitionToLowPowerMode ();
94
94
}
95
95
96
+ bool ApplicationSleepManager::CanGoToDeepSleep ()
97
+ {
98
+ bool canGoToDeepSleep = true ;
99
+ if (mIsCommissionningWindowOpen )
100
+ {
101
+ ChipLogProgress (AppServer, " Commissioning Window is Open - Cannot go to Deep sleep" );
102
+ canGoToDeepSleep = false ;
103
+ }
104
+ return canGoToDeepSleep;
105
+ }
106
+
96
107
bool ApplicationSleepManager::CanGoToLIBasedSleep ()
97
108
{
98
109
bool canGoToLIBasedSleep = true ;
@@ -170,19 +181,19 @@ bool ApplicationSleepManager::ProcessKeychainEdgeCase()
170
181
void ApplicationSleepManager::OnEnterActiveMode ()
171
182
{
172
183
mIsInActiveMode = true ;
173
- // TEMP-fix: Added SLI_SI91X_MCU_INTERFACE to delay 917 NCP sleep till wifi-connection
174
- #if (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
184
+ // TEMP-fix: Added SLI_SI917 to delay 9116 NCP sleep till wifi-connection
185
+ #if (defined(SLI_SI917 ) && SLI_SI917 == 1)
175
186
mWifiSleepManager ->VerifyAndTransitionToLowPowerMode ();
176
- #endif // (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
187
+ #endif // (defined(SLI_SI917 ) && SLI_SI917 == 1)
177
188
}
178
189
179
190
void ApplicationSleepManager::OnEnterIdleMode ()
180
191
{
181
192
mIsInActiveMode = false ;
182
- // TEMP-fix: Added SLI_SI91X_MCU_INTERFACE to delay 917 NCP sleep till wifi-connection
183
- #if (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
193
+ // TEMP-fix: Added SLI_SI917 to delay 9116 NCP sleep till wifi-connection
194
+ #if (defined(SLI_SI917 ) && SLI_SI917 == 1)
184
195
mWifiSleepManager ->VerifyAndTransitionToLowPowerMode ();
185
- #endif // (defined(SLI_SI91X_MCU_INTERFACE ) && SLI_SI91X_MCU_INTERFACE == 1)
196
+ #endif // (defined(SLI_SI917 ) && SLI_SI917 == 1)
186
197
}
187
198
188
199
void ApplicationSleepManager::OnTransitionToIdle ()
0 commit comments