Continue automatically if self tests pass (#616)

Co-authored-by: Benjamin Wilson <admin@opensourceminer.com>
This commit is contained in:
Benjamin Wilson 2025-01-05 17:08:34 -05:00 committed by GitHub
parent 93f40a32dc
commit fd11e42ab6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -503,12 +503,6 @@ void self_test(void * pvParameters)
static void tests_done(GlobalState * GLOBAL_STATE, bool test_result)
{
if (test_result == TESTS_PASSED) {
ESP_LOGI(TAG, "SELF TESTS PASS -- Press RESET to continue");
} else {
ESP_LOGI(TAG, "SELF TESTS FAIL -- Press RESET to continue");
}
switch (GLOBAL_STATE->device_model) {
case DEVICE_MAX:
case DEVICE_ULTRA:
@ -520,6 +514,10 @@ static void tests_done(GlobalState * GLOBAL_STATE, bool test_result)
default:
}
//wait here for a long press to reboot
vTaskDelay(portMAX_DELAY);
if (test_result != TESTS_PASSED) {
ESP_LOGI(TAG, "SELF TESTS FAIL -- Press RESET to continue");
//wait here for a long press to reboot
vTaskDelay(portMAX_DELAY);
}
}