提高小车运动速度
This commit is contained in:
1 parent
a48241aa8f
commit
43dba3bc7e
1 file changed
+1
-1
@@ -158,7 +158,7 @@ void OnDataRecv(const uint8_t *mac, const uint8_t *incomingData, int len) {
|
|||||||
// 左右旋转
|
// 左右旋转
|
||||||
int convertedJ2PotX = (remoteData.j2PotX - 127.5) * (100.0 / 127.5); // 转到 -100 到 100
|
int convertedJ2PotX = (remoteData.j2PotX - 127.5) * (100.0 / 127.5); // 转到 -100 到 100
|
||||||
// 速度
|
// 速度
|
||||||
int convertedJ2PotY = (remoteData.j2PotY - 127.5) * (100.0 / 127.5) * -1 * 1.2; // 转到 -100 到 100 y轴取反,并且放大洗漱
|
int convertedJ2PotY = (remoteData.j2PotY - 127.5) * (100.0 / 127.5) * -1 * 1.3; // 转到 -100 到 100 y轴取反,并且放大洗漱
|
||||||
|
|
||||||
// 取反按钮值,使得默认显示 0 false,按下显示 1 true
|
// 取反按钮值,使得默认显示 0 false,按下显示 1 true
|
||||||
int convertedbuttonLB = !remoteData.buttonLB; // 顶部左
|
int convertedbuttonLB = !remoteData.buttonLB; // 顶部左
|
||||||
|
|||||||
Reference in new issue
Block a user