From 5d1e9d6afc28d76249d2e794db8e7a5c1de2fc4a Mon Sep 17 00:00:00 2001 From: kyz Date: Sun, 1 Dec 2024 14:37:56 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E8=B0=90=E6=B3=A2=E5=90=AB?= =?utf8?q?=E6=9C=89=E9=87=8F=E4=B8=8A=E6=8A=A5=E6=8C=893=E4=BD=8D=E5=B0=8F?= =?utf8?q?=E6=95=B0=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- STM32/code/mcu_com/mcu_com_energy.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/STM32/code/mcu_com/mcu_com_energy.c b/STM32/code/mcu_com/mcu_com_energy.c index 80d4a152..65ee3a59 100644 --- a/STM32/code/mcu_com/mcu_com_energy.c +++ b/STM32/code/mcu_com/mcu_com_energy.c @@ -244,14 +244,14 @@ void Mcu_Energy_Get_power_info(void) void Mcu_Energy_Get_harmonic_info(void) { //A/B/C µçѹг²¨º¬ÓÐÂÊ int32 СÊýµãºó3λ - g_energy.harm.ThdU_D3[0] = swap_u32( rn_harm_data.HarmonicThdU[0] ); - g_energy.harm.ThdU_D3[1] = swap_u32( rn_harm_data.HarmonicThdU[1] ); - g_energy.harm.ThdU_D3[2] = swap_u32( rn_harm_data.HarmonicThdU[2] ); + g_energy.harm.ThdU_D3[0] = swap_u32( rn_harm_data.HarmonicThdU[0] *10 ); + g_energy.harm.ThdU_D3[1] = swap_u32( rn_harm_data.HarmonicThdU[1] *10 ); + g_energy.harm.ThdU_D3[2] = swap_u32( rn_harm_data.HarmonicThdU[2] *10 ); //A/B/C µçÁ÷г²¨º¬ÓÐÂÊ int32 СÊýµãºó3λ - g_energy.harm.ThdI_D3[0] = swap_u32( rn_harm_data.HarmonicThdI[0] ); - g_energy.harm.ThdI_D3[1] = swap_u32( rn_harm_data.HarmonicThdI[1] ); - g_energy.harm.ThdI_D3[2] = swap_u32( rn_harm_data.HarmonicThdI[2] ); + g_energy.harm.ThdI_D3[0] = swap_u32( rn_harm_data.HarmonicThdI[0] *10 ); + g_energy.harm.ThdI_D3[1] = swap_u32( rn_harm_data.HarmonicThdI[1] *10 ); + g_energy.harm.ThdI_D3[2] = swap_u32( rn_harm_data.HarmonicThdI[2] *10 ); //A/B/C µçѹг²¨×ܺ¬Á¿ int32 СÊýµãºó3λ g_energy.harm.ThdUrms_D3[0] = swap_u32( rn_harm_data.HarmonicThdUrms[0] ); @@ -521,7 +521,7 @@ void McuCom_Send_Energy(void) UART_Tx_One_Frame(PORT_UART_HOST, (uint8_t*)&g_energy.unbalance, sizeof(g_energy.unbalance)); HAL_Delay(5); - //·â×°²¢·¢Ëͼäг²¨Êý¾Ý°ü + //·â×°²¢·¢ËÍÉÁ±ä²¨Êý¾Ý°ü Mcu_Energy_Get_flick_info(); g_energy.flick.packet_head.head = MCU_ARM_COM_HEAD; g_energy.flick.packet_head.type = 0x41; -- 2.34.1