diff --git a/examples/chef/common/chef-rvc-mode-delegate.cpp b/examples/chef/common/chef-rvc-mode-delegate.cpp index 65e3fa9ca9af70..7920f21cd4cb9c 100644 --- a/examples/chef/common/chef-rvc-mode-delegate.cpp +++ b/examples/chef/common/chef-rvc-mode-delegate.cpp @@ -130,13 +130,12 @@ CHIP_ERROR RvcCleanModeDelegate::Init() void RvcCleanModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) { - uint8_t rvcCleanCurrentMode = gRvcCleanModeInstance->GetCurrentMode(); + uint8_t rvcRunCurrentMode = gRvcRunModeInstance->GetCurrentMode(); - // An example to show how do we block mode change in some circumstance - if (rvcCleanCurrentMode == RvcCleanMode::ModeDeepClean) + if (rvcRunCurrentMode == RvcRunMode::ModeCleaning) { response.status = to_underlying(RvcCleanMode::StatusCode::kCleaningInProgress); - response.statusText.SetValue(chip::CharSpan::fromCharString("Cannot change the cleaning mode during a deep clean")); + response.statusText.SetValue(chip::CharSpan::fromCharString("Cannot change the cleaning mode during a clean")); return; }