Skip to content

Commit

Permalink
changed the default should_self_test to be 0 if NVS_CONFIG_SELF_TEST …
Browse files Browse the repository at this point in the history
…"selftest" is not present in nvs for #177
  • Loading branch information
skot committed May 21, 2024
1 parent 6b41f52 commit 19e6369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void app_main(void)

bool is_max = strcmp(GLOBAL_STATE.asic_model, "BM1397") == 0;
uint64_t best_diff = nvs_config_get_u64(NVS_CONFIG_BEST_DIFF, 0);
uint16_t should_self_test = nvs_config_get_u16(NVS_CONFIG_SELF_TEST, 1);
uint16_t should_self_test = nvs_config_get_u16(NVS_CONFIG_SELF_TEST, 0);
if (should_self_test == 1 && !is_max && best_diff < 1) {
self_test((void *) &GLOBAL_STATE);
vTaskDelay(60 * 60 * 1000 / portTICK_PERIOD_MS);
Expand Down

0 comments on commit 19e6369

Please sign in to comment.