From 6612b777928b07903dba560f479eee737554d2c6 Mon Sep 17 00:00:00 2001 From: sfaguet <sebastienfaguet@gmail.com> Date: Wed, 3 Feb 2021 20:48:52 -0500 Subject: [PATCH] Correction RC - Wheel --- MDK-ARM/RobotMaster_allRobots.uvoptx | 2 +- Src/receiver_RadioController.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/MDK-ARM/RobotMaster_allRobots.uvoptx b/MDK-ARM/RobotMaster_allRobots.uvoptx index c19c8c9..8f81f35 100644 --- a/MDK-ARM/RobotMaster_allRobots.uvoptx +++ b/MDK-ARM/RobotMaster_allRobots.uvoptx @@ -693,7 +693,7 @@ <Group> <GroupName>Devices</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> diff --git a/Src/receiver_RadioController.c b/Src/receiver_RadioController.c index 80c9041..474e283 100644 --- a/Src/receiver_RadioController.c +++ b/Src/receiver_RadioController.c @@ -31,7 +31,7 @@ void receiver_RadioController_callback_handler() /* prevent remote control zero deviation */ if (receiver_RadioController.data.ch1 <= 5 && receiver_RadioController.data.ch1 >= -5) { - //receiver_RadioController.data.ch1 = 0; + receiver_RadioController.data.ch1 = 0; } if (receiver_RadioController.data.ch2 <= 5 && receiver_RadioController.data.ch2 >= -5) { @@ -69,13 +69,6 @@ void receiver_RadioController_callback_handler() receiver_RadioController.data.wheel = (uart1_rx_buff[16] | uart1_rx_buff[17] << 8); receiver_RadioController.data.wheel -= 1024; - if(receiver_RadioController.data.wheel <= 660) - receiver_RadioController.data.wheel = -receiver_RadioController.data.wheel; - else{ - receiver_RadioController.data.wheel = 660 * receiver_RadioController.data.wheel / 14790 ; - if(receiver_RadioController.data.wheel > 660) receiver_RadioController.data.wheel = 660; - } - } -- GitLab