Fri Feb 25 11:03:13 AM HKT 2022

This commit is contained in:
Terence Tong 2022-02-25 11:03:13 +08:00
parent 33730089bc
commit 8d6a76e345
2 changed files with 7 additions and 7 deletions

View File

@ -88,7 +88,7 @@ class _RoslibPSPadState extends State<RoslibPSPad> {
twist['angular'] == {'x': 0.0, 'y': 0.0, 'z': 0.0}) { twist['angular'] == {'x': 0.0, 'y': 0.0, 'z': 0.0}) {
return; return;
} }
print('Direction to published ' + jsonEncode(twist));
cmdVelTopic.publish(twist); cmdVelTopic.publish(twist);
lastDirectionTwist = twist; lastDirectionTwist = twist;
} }

View File

@ -395,10 +395,10 @@ class _KeyPadState extends State<KeyPad> {
top: circleDiameter - shortMargin - keySize / 2, top: circleDiameter - shortMargin - keySize / 2,
child: Listener( child: Listener(
onPointerDown: (event) { onPointerDown: (event) {
widget.triangleCallback(-1); widget.crossCallback(-1);
}, },
onPointerUp: (event) { onPointerUp: (event) {
widget.triangleCallback(1); widget.crossCallback(1);
}, },
child: Container( child: Container(
width: keySize, width: keySize,
@ -414,10 +414,10 @@ class _KeyPadState extends State<KeyPad> {
top: circleDiameter / 2 - keySize / 2, top: circleDiameter / 2 - keySize / 2,
child: Listener( child: Listener(
onPointerDown: (event) { onPointerDown: (event) {
widget.triangleCallback(-1); widget.squareCallback(-1);
}, },
onPointerUp: (event) { onPointerUp: (event) {
widget.triangleCallback(1); widget.squareCallback(1);
}, },
child: Container( child: Container(
width: keySize, width: keySize,
@ -433,10 +433,10 @@ class _KeyPadState extends State<KeyPad> {
top: circleDiameter / 2 - keySize / 2, top: circleDiameter / 2 - keySize / 2,
child: Listener( child: Listener(
onPointerDown: (event) { onPointerDown: (event) {
widget.triangleCallback(-1); widget.circleCallback(-1);
}, },
onPointerUp: (event) { onPointerUp: (event) {
widget.triangleCallback(1); widget.circleCallback(1);
}, },
child: Container( child: Container(
width: keySize, width: keySize,