Skip to content

Commit

Permalink
fix restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Sep 21, 2023
1 parent 69aa023 commit 167773f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/platform/bouffalolab/common/BLConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ namespace chip {
namespace DeviceLayer {
namespace Internal {

void BLConfig::Init(void)
void BLConfig::Init(void)
{
easyflash_init();
ef_load_env_cache();

if (ef_get_env(kBLKey_factoryResetFlag)) {

ef_print_env_cb([](env_node_obj_t env, void *arg1, void *arg2){
if (ef_get_env(kBLKey_factoryResetFlag))
{

if (ENV_WRITE == env->status) {
ef_print_env_cb([](env_node_obj_t env, void * arg1, void * arg2) {
if (ENV_WRITE == env->status)
{
env->name[env->name_len] = '\0';
if (strncmp(kBLKey_factoryResetFlag, env->name, sizeof(env->name) - 1)) {
if (strncmp(kBLKey_factoryResetFlag, env->name, sizeof(env->name) - 1))
{
/** delete all key=value except factory reset flag */
ef_del_and_save_env(env->name);
}
Expand Down
1 change: 0 additions & 1 deletion src/platform/bouffalolab/common/BLConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class BLConfig
static constexpr const char * kCounterKey_TotalOperationalHours = ("total-hours");
static constexpr const char * kCounterKey_UpTime = ("up-time");


static constexpr const char * kBLKey_factoryResetFlag = ("__factory_reset_pending");

static void Init(void);
Expand Down

0 comments on commit 167773f

Please sign in to comment.