Skip to content

Commit

Permalink
minor cherry-pick artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy committed Jun 22, 2021
1 parent e629a46 commit 90ae7d7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions hal/src/argon/platform_ncp_argon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,13 @@ int getWifiNcpFirmwareVersion(uint16_t* ncpVersion) {
const auto ncpClient = particle::wifiNetworkManager()->ncpClient();
SPARK_ASSERT(ncpClient);
const particle::NcpClientLock lock(ncpClient);
// const particle::NcpPowerState ncpPwrState = ncpClient->ncpPowerState();
const particle::NcpPowerState ncpPwrState = ncpClient->ncpPowerState();
CHECK(ncpClient->on());
CHECK(ncpClient->getFirmwareModuleVersion(&version));
*ncpVersion = version;
// This is now taken care of by Esp32NcpNetif, leaving here
// just for reference when backporting to 2.x LTS with slightly
// less smart behavior.
// if (ncpPwrState == particle::NcpPowerState::OFF) {
// CHECK(ncpClient->off());
// }
if (ncpPwrState == particle::NcpPowerState::OFF) {
CHECK(ncpClient->off());
}

return 0;
}
Expand Down

0 comments on commit 90ae7d7

Please sign in to comment.