From fbbac4b8c43296d6fe4eec16856c372048ed4751 Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Mon, 6 Jan 2025 19:42:00 +0300 Subject: [PATCH] SENT: only one channel To enalbe two channels we need to improve ICU driver first to capture more than one TIM input. See https://github.com/alex31/chibios_enac_various_common.git inputCapture.c --- firmware/boards/f1_dual_rev1/wideband_board_config.h | 2 +- firmware/sent.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/boards/f1_dual_rev1/wideband_board_config.h b/firmware/boards/f1_dual_rev1/wideband_board_config.h index 43a6972b..201d4c71 100644 --- a/firmware/boards/f1_dual_rev1/wideband_board_config.h +++ b/firmware/boards/f1_dual_rev1/wideband_board_config.h @@ -99,4 +99,4 @@ // ******************************* // SENT protocol receiver on analog inputs // ******************************* -#define SENT_INPUT_COUNT 2 // Number of sent channels +#define SENT_INPUT_COUNT 1 // Number of sent channels diff --git a/firmware/sent.cpp b/firmware/sent.cpp index a2721505..e2d90ce6 100644 --- a/firmware/sent.cpp +++ b/firmware/sent.cpp @@ -105,6 +105,7 @@ static /* const */ ICUConfig icucfg[SENT_INPUT_COUNT] = .arr = 0xFFFFFFFFU, //.overcapture_cb = icuovercapture_in1, }, +#if 0 /* P1.A4 -> L_AUX -> L_AUX_ADC -> PA7 */ { .mode = ICU_INPUT_ACTIVE_LOW, @@ -118,13 +119,14 @@ static /* const */ ICUConfig icucfg[SENT_INPUT_COUNT] = //.overcapture_cb = icuovercapture_in2, } #endif +#endif }; static ICUDriver *icudrivers[SENT_INPUT_COUNT] = { #if (STM32_ICU_USE_TIM3 == TRUE) &ICUD3, - &ICUD3, + //&ICUD3, #else nullptr, nullptr,