From e90897a834df4f8c81a3ee62c7e0a4733bbce327 Mon Sep 17 00:00:00 2001 From: Robbe Date: Wed, 6 Nov 2019 15:00:07 -0800 Subject: [PATCH] Fix board detection on white --- board/board.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/board/board.h b/board/board.h index 0181ae5a8baaf5..5629a841d3f5fd 100644 --- a/board/board.h +++ b/board/board.h @@ -21,15 +21,8 @@ void detect_board_type(void) { #ifdef PANDA // SPI lines floating: white (TODO: is this reliable?) if((detect_with_pull(GPIOA, 4, PULL_DOWN)) || (detect_with_pull(GPIOA, 5, PULL_DOWN)) || (detect_with_pull(GPIOA, 6, PULL_DOWN)) || (detect_with_pull(GPIOA, 7, PULL_DOWN))){ - // white panda has serial lines, if floating, it's a dos - if (!detect_with_pull(GPIOA, 2, PULL_DOWN) && !detect_with_pull(GPIOA, 3, PULL_DOWN)) { - // TODO: replace with DOS - hw_type = HW_TYPE_UNO; - current_board = &board_uno; - } else { - hw_type = HW_TYPE_WHITE_PANDA; - current_board = &board_white; - } + hw_type = HW_TYPE_WHITE_PANDA; + current_board = &board_white; } else if(detect_with_pull(GPIOA, 13, PULL_DOWN)) { // Rev AB deprecated, so no pullup means black. In REV C, A13 is pulled up to 5V with a 10K hw_type = HW_TYPE_GREY_PANDA; current_board = &board_grey;