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 @@