From 808a29c2616053056ac8f84bb8f6913d7a93e31e Mon Sep 17 00:00:00 2001 From: wyf <1042510259@qq.com> Date: Tue, 19 Nov 2024 15:37:47 +0800 Subject: [PATCH] =?UTF-8?q?V6=E7=89=88=E6=9C=AC=E4=B8=AD=EF=BC=8C=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=A0=A1=E5=8F=98=E5=8C=96=E8=8C=83=E5=9B=B4=EF=BC=8C?= =?UTF-8?q?5%=E6=94=B9=E6=88=9010%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/110VCGQV6/user/Src/user_main.c | 2 +- project/110VCGQV6_BOOT/.cproject | 2 + project/110VCGQV6_BOOT/Debug/BootLoader.bin | Bin 0 -> 26356 bytes project/110VCGQV6_BOOT/Debug/BootLoader.hex | 1653 +++++++++++++++++++ project/110VCGQV6_BOOT/Debug/makefile | 20 +- project/110VCGQV6_BOOT/Debug/sources.mk | 2 + 6 files changed, 1676 insertions(+), 3 deletions(-) create mode 100644 project/110VCGQV6_BOOT/Debug/BootLoader.bin create mode 100644 project/110VCGQV6_BOOT/Debug/BootLoader.hex diff --git a/project/110VCGQV6/user/Src/user_main.c b/project/110VCGQV6/user/Src/user_main.c index b54e495..ef7f18b 100644 --- a/project/110VCGQV6/user/Src/user_main.c +++ b/project/110VCGQV6/user/Src/user_main.c @@ -100,7 +100,7 @@ void user_main() if(cnt>24) //每2分钟动态校准一次 { cnt =0; - if(abs(last_voltage-dev_reg.voltage)*(uint32_t)100/abs(last_voltage)<=5) + if(abs(last_voltage-dev_reg.voltage)*(uint32_t)100/abs(last_voltage)<=10) { dev_reg.reference = 110.0*dev_reg.adc_max/last_voltage; dev_reg.voltage = 110.0*dev_reg.adc_max/abs(dev_reg.reference); diff --git a/project/110VCGQV6_BOOT/.cproject b/project/110VCGQV6_BOOT/.cproject index 44c46ab..f452ac2 100644 --- a/project/110VCGQV6_BOOT/.cproject +++ b/project/110VCGQV6_BOOT/.cproject @@ -23,6 +23,8 @@