From b2e9aeede68a78e8a94cc797182e55a08bd1453f Mon Sep 17 00:00:00 2001 From: "REASEARCHER\\18383" <1633026436@qq.com> Date: Wed, 27 Aug 2025 17:09:26 +0800 Subject: [PATCH] =?UTF-8?q?heat80Gear=EF=BC=8C=E6=9B=B4=E6=94=B9=E7=9B=B8?= =?UTF-8?q?=E7=94=B5=E6=B5=81=E9=98=88=E5=80=BC=E7=94=B5=E6=B5=81=E4=B8=BA?= =?UTF-8?q?13A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hyt2/.vscode/settings.json | 27 ++++++++++++++++++- Hyt2/APP/Appcfg/app.c | 7 ++--- .../Device/device_Other/device_adc_collect.c | 9 +++++++ .../Device/device_Other/device_adc_collect.h | 3 +++ Hyt2/APP/Service/service_statusmonitor.h | 3 ++- 5 files changed, 44 insertions(+), 5 deletions(-) diff --git a/Hyt2/.vscode/settings.json b/Hyt2/.vscode/settings.json index d7d8012..9973bb7 100644 --- a/Hyt2/.vscode/settings.json +++ b/Hyt2/.vscode/settings.json @@ -1,5 +1,30 @@ { "files.associations": { - "ptz_global_variable.h": "c" + "ptz_global_variable.h": "c", + "stdio.h": "c", + "exception": "c", + "iutility": "c", + "new": "c", + "utility": "c", + "xstddef": "c", + "xstddef0": "c", + "cctype": "c", + "cfloat": "c", + "climits": "c", + "cmath": "c", + "cstddef": "c", + "cstdint": "c", + "cstdio": "c", + "cstdlib": "c", + "cstring": "c", + "cwchar": "c", + "cwctype": "c", + "initializer_list": "c", + "iosfwd": "c", + "limits": "c", + "type_traits": "c", + "typeinfo": "c", + "xtr1common": "c", + "xxexception": "c" } } \ No newline at end of file diff --git a/Hyt2/APP/Appcfg/app.c b/Hyt2/APP/Appcfg/app.c index 4303ac1..c50074a 100644 --- a/Hyt2/APP/Appcfg/app.c +++ b/Hyt2/APP/Appcfg/app.c @@ -284,9 +284,10 @@ static void task_print() // p_tcb = p_tcb->OSTCBPrev; // } // term_printf("\r\n"); - ptz_uart_dev_send(uart_485_handle, TempInfoGet(),80 ); - - OSTimeDlyHMSM(0u, 0u, 10u, 0u); +// ptz_uart_dev_send(uart_485_handle, TempInfoGet(),80 );//温度打印,正式版注释掉 +// term_printf("%s", );//打印水平/垂直电机相电流,正式版注释掉 +// ptz_uart_dev_send(uart_485_handle, TestGetMotorPhaseCur(),100 );//温度打印,正式版注释掉 +// OSTimeDlyHMSM(0u, 0u, 0u, 500u); } static void task_print_task() diff --git a/Hyt2/APP/Device/device_Other/device_adc_collect.c b/Hyt2/APP/Device/device_Other/device_adc_collect.c index 9f48032..bfec1f7 100644 --- a/Hyt2/APP/Device/device_Other/device_adc_collect.c +++ b/Hyt2/APP/Device/device_Other/device_adc_collect.c @@ -1,6 +1,7 @@ #include "device_adc_collect.h" #include #include "gd32f4xx.h" +#include "stdio.h" #include "comm_types.h" #include "ptz_struct.h" #include "tmp75.h" @@ -285,6 +286,14 @@ void V_ADC0_Phase_current() } +/*Ժӡˮƽ/ֱ*/ +char* TestGetMotorPhaseCur(void) +{ + static char buf[100]; + sprintf(buf, "H_U:%.2f, H_V:%.2f, H_W:%.2f;\r\n", + H_ADC_Collect.Phase_curr_U, H_ADC_Collect.Phase_curr_V, H_ADC_Collect.Phase_curr_W); + return buf; +} diff --git a/Hyt2/APP/Device/device_Other/device_adc_collect.h b/Hyt2/APP/Device/device_Other/device_adc_collect.h index 00c2cc1..7d2560c 100644 --- a/Hyt2/APP/Device/device_Other/device_adc_collect.h +++ b/Hyt2/APP/Device/device_Other/device_adc_collect.h @@ -19,4 +19,7 @@ void init_data_collect_module(void);// void H_ADC2_Phase_current(); void V_ADC0_Phase_current(); void ptz_send_bridge_temperature(char dev); + +/*Ժӡˮƽ/ֱ*/ +char* TestGetMotorPhaseCur(void); #endif \ No newline at end of file diff --git a/Hyt2/APP/Service/service_statusmonitor.h b/Hyt2/APP/Service/service_statusmonitor.h index 66bfb37..0005baa 100644 --- a/Hyt2/APP/Service/service_statusmonitor.h +++ b/Hyt2/APP/Service/service_statusmonitor.h @@ -113,7 +113,8 @@ #define PTZ_HALL_DETECT 30//30 //ֵ - #define PHASE_CURRENT 5.0 +// #define PHASE_CURRENT 5.0 + #define PHASE_CURRENT 12 #endif //L6235Dϸ̨