From 10c6296bfbe9ea5bedf69266056a4321c48594d6 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期二, 02 四月 2024 15:57:47 +0800 Subject: [PATCH] 1 --- Src/OnChipDevices/ADC.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/OnChipDevices/ADC.c b/Src/OnChipDevices/ADC.c index 26ae854..cd0bf0f 100644 --- a/Src/OnChipDevices/ADC.c +++ b/Src/OnChipDevices/ADC.c @@ -13,9 +13,9 @@ uint8_t Get_Battary(void) {static float last_value = 100; static uint8_t first=1; - HAL_GPIO_WritePin(GPIOB, BAT_MEAS_GND_Pin, GPIO_PIN_RESET); +// HAL_GPIO_WritePin(GPIOB, BAT_MEAS_GND_Pin, GPIO_PIN_RESET); bat_volt = (float)Get_ADC_Value()/621; //(value/4096*3.3*2-3.5)/0.7 - HAL_GPIO_WritePin(GPIOB, BAT_MEAS_GND_Pin, GPIO_PIN_SET); +// HAL_GPIO_WritePin(GPIOB, BAT_MEAS_GND_Pin, GPIO_PIN_SET); if(bat_volt>=3.5) { if(first) -- Gitblit v1.9.3