From c5ea18f62982a5549f4e7c6c0b25fbee43918e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E5=9B=A2=E5=90=9B?= <596017521@qq.com> Date: Mon, 22 Apr 2024 17:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=8B=E5=8A=9B=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MDK-ARM/motor.uvoptx | 2 +- MDK-ARM/motor/motor.hex | 2 +- User/board/board.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MDK-ARM/motor.uvoptx b/MDK-ARM/motor.uvoptx index 9a541c9..ab3d8d8 100644 --- a/MDK-ARM/motor.uvoptx +++ b/MDK-ARM/motor.uvoptx @@ -178,7 +178,7 @@ 5 1 - adc_value,0x0A + detect_result,0x0A diff --git a/MDK-ARM/motor/motor.hex b/MDK-ARM/motor/motor.hex index 6208f7f..2f32493 100644 --- a/MDK-ARM/motor/motor.hex +++ b/MDK-ARM/motor/motor.hex @@ -927,7 +927,7 @@ :1039D000417501218175C675012E02D0022E08D1D4 :1039E00003E005206946087603E000206946087672 :1039F00000BF00BF0524224605A92846FFF7A8FB03 -:103A0000012E12D10020694608730D311248FCF7CF +:103A0000012E12D10120694608730D311248FCF7CE :103A10000CFC03A80130FCF7FDFB0190FEF74EFD06 :103A200003A901310290FCF700FC2819052203A923 :103A3000FFF78EFB601DC4B2601E81B2681C00F0EF diff --git a/User/board/board.c b/User/board/board.c index f5d8c62..970a85b 100644 --- a/User/board/board.c +++ b/User/board/board.c @@ -343,7 +343,7 @@ float32 pressure_detect(uint8_t id) { detect_result = ST_DEV_MISS; } - val = (val - 600) / (10 * 15) / 16 * 1000; + val = (val - 600) / (10 * 15) / 16 * 1600; return val; } @@ -453,7 +453,7 @@ static uint8_t test_motor_cmd(uint8_t cmd, uint8_t *buf) if (cmd == MOTOR_MOVE) { - motor_param.dir = DIR_CW; + motor_param.dir = DIR_CCW; motor_param.angle = 90; motor_param.angle = S2B_FLOAT32(motor_param.angle); }