changed the default should_self_test to be 0 if NVS_CONFIG_SELF_TEST "selftest" is not present in nvs for #177

This commit is contained in:
Skot 2024-05-21 16:40:16 -04:00
parent 6b41f52c09
commit 19e6369ac2

View File

@ -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);