From d3e442d2122573387d2c7a51dd1cfcd79042c387 Mon Sep 17 00:00:00 2001 From: Skot Date: Fri, 11 Oct 2024 18:10:54 -0400 Subject: [PATCH] fix selftest for bitaxe with INA260 --- main/self_test/self_test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main/self_test/self_test.c b/main/self_test/self_test.c index 2cbf462..89fcc9d 100644 --- a/main/self_test/self_test.c +++ b/main/self_test/self_test.c @@ -206,6 +206,20 @@ void self_test(void * pvParameters) default: } + //initialize the INA260, if we have one. + switch (GLOBAL_STATE->device_model) { + case DEVICE_MAX: + case DEVICE_ULTRA: + case DEVICE_SUPRA: + if (GLOBAL_STATE->board_version < 402) { + // Initialize the LED controller + INA260_init(); + } + break; + case DEVICE_GAMMA: + default: + } + SERIAL_init(); uint8_t chips_detected = (GLOBAL_STATE->ASIC_functions.init_fn)(GLOBAL_STATE->POWER_MANAGEMENT_MODULE.frequency_value, GLOBAL_STATE->asic_count);