From c54e521de29eaf2687d38e0a2d7508611c7eaca0 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 15:42:26 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9battery=E6=B5=8B=E8=AF=95lo?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/sf_app/code/source/battery/sf_battery.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/application/source/sf_app/code/source/battery/sf_battery.c b/code/application/source/sf_app/code/source/battery/sf_battery.c index 14318a85c..648f16b7b 100755 --- a/code/application/source/sf_app/code/source/battery/sf_battery.c +++ b/code/application/source/sf_app/code/source/battery/sf_battery.c @@ -895,7 +895,19 @@ void sf_battery_level_polling(void) LibatCnt++; } readBatCnt++; + if(puiPara->BatteryLogSwitch) + { + printf("\nDC Adc:%d After Convert:(%d.%dV),Is Dc In=%s, TemperAdc:%d \n", sf_battery_convert_to_adc(24, 100, DcVoltageVal), DcVoltageVal / 10, DcVoltageVal % 10, IsPowerDcIn == 1? "Yes" : "No", TemperAdc); + if(LiPolymerVoltageVal) + { + printf("Li Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_battery_convert_to_adc(24, 100, LiPolymerVoltageVal), LiPolymerVoltageVal / 10, LiPolymerVoltageVal % 10); + } + else + { + printf("Other Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_aa_battery_convert_to_adc(24, 100, BatVoltageVal),BatVoltageVal / 10, BatVoltageVal % 10); + } + } if(readBatCnt >= 10) { _DcVoltageVal = dcTemp / 10;