修改xbox大小
This commit is contained in:
@@ -823,6 +823,7 @@ export default function DeviceStatusPage({
|
|||||||
background: '#0f172a',
|
background: '#0f172a',
|
||||||
}}
|
}}
|
||||||
headStyle={{ color: '#fff' }}
|
headStyle={{ color: '#fff' }}
|
||||||
|
bodyStyle={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}
|
||||||
>
|
>
|
||||||
<XboxController
|
<XboxController
|
||||||
onGamepadUpdate={handleGamepadUpdate}
|
onGamepadUpdate={handleGamepadUpdate}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const XboxController = ({ onGamepadUpdate, handleControlModal, isControlled, isC
|
|||||||
|
|
||||||
// UI mapping for Xbox Gamepad
|
// UI mapping for Xbox Gamepad
|
||||||
|
|
||||||
//点火熄火 上面俩 AB升降底盘 XY割刀加减速 button急停
|
//点火熄火 上面俩 AB升降底盘 XY割刀加减速 button7急停
|
||||||
// Buttons: 0:A, 1:B, 2:X, 3:Y, 4:LB, 5:RB, 6:LT, 7:RT, 8:Back, 9:Start, 10:LS, 11:RS, 12:Up, 13:Down, 14:Left, 15:Right
|
// Buttons: 0:A, 1:B, 2:X, 3:Y, 4:LB, 5:RB, 6:LT, 7:RT, 8:Back, 9:Start, 10:LS, 11:RS, 12:Up, 13:Down, 14:Left, 15:Right
|
||||||
const { buttons, axes, connected } = gamepadState;
|
const { buttons, axes, connected } = gamepadState;
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ const XboxController = ({ onGamepadUpdate, handleControlModal, isControlled, isC
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full aspect-[4/3] flex items-center justify-center "
|
<div className="relative h-[252px] aspect-[4/3] flex items-center justify-center "
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (connected && !isControlled && hasControlRight) {
|
if (connected && !isControlled && hasControlRight) {
|
||||||
console.log("点击了无控制权限,发起权限请求");
|
console.log("点击了无控制权限,发起权限请求");
|
||||||
|
|||||||
Reference in New Issue
Block a user