| | |
| | | import android.widget.Button; |
| | | import android.widget.RelativeLayout; |
| | | |
| | | import com.example.agvcontroller.action.AllResetAction; |
| | | import com.example.agvcontroller.action.BackPaddle; |
| | | import com.example.agvcontroller.action.CameraResetAction; |
| | | import com.example.agvcontroller.action.ForkResetAction; |
| | | import com.example.agvcontroller.action.ForwardBackAction; |
| | | import com.example.agvcontroller.action.FrontPaddle; |
| | | import com.example.agvcontroller.action.GyroResetAction; |
| | | import com.example.agvcontroller.action.HandExtendCollect; |
| | | import com.example.agvcontroller.action.HandForkRotatopn; |
| | | import com.example.agvcontroller.action.HandInAction; |
| | | import com.example.agvcontroller.action.HandLift; |
| | | import com.example.agvcontroller.action.LiftResetAction; |
| | | import com.example.agvcontroller.action.LoadResetAction; |
| | | import com.example.agvcontroller.action.RotatopnLeftRight; |
| | | import com.example.agvcontroller.protocol.AgvAction; |
| | | import com.example.agvcontroller.action.HandOutAction; |
| | |
| | | |
| | | private Button bodySwitchBtn; // 底盘/货叉切换 |
| | | private Socket socket; |
| | | private String AgvNo = "12"; |
| | | private String AgvNo = "1"; |
| | | private RelativeLayout layout_bottom; |
| | | private RelativeLayout layout_top; |
| | | private RelativeLayout layout_single; |
| | |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | | .bodySync((action) -> action.setPwd((short) 10)); |
| | | .bodySync((action) -> action.setPwd((short) 50)); |
| | | nettyServerHandler.sendMessageToClient(clientId, agvAction); // 发送消息到客户端 |
| | | handler.sendEmptyMessageDelayed(0, 100); // 100ms 后发送下一条消息 |
| | | } |
| | |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | | .bodySync((action) -> action.setPwd((short) -10)); |
| | | .bodySync((action) -> action.setPwd((short) -50)); |
| | | nettyServerHandler.sendMessageToClient(clientId, agvAction); // 发送消息到客户端 |
| | | handler.sendEmptyMessageDelayed(0, 100); |
| | | } |
| | |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | | .bodySync((action) -> action.setPwd((short) 10)); |
| | | .bodySync((action) -> action.setPwd((short) 50)); |
| | | nettyServerHandler.sendMessageToClient(clientId, agvAction); // 发送消息到客户端 |
| | | handler.sendEmptyMessageDelayed(0, 100); |
| | | } |
| | |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | | .bodySync((action) -> action.setPwd((short) -10)); |
| | | .bodySync((action) -> action.setPwd((short) -50 )); |
| | | nettyServerHandler.sendMessageToClient(clientId, agvAction); // 发送消息到客户端 |
| | | handler.sendEmptyMessageDelayed(0, 100); |
| | | } |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(CameraResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(LoadResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(ForkResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(GyroResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(LiftResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |
| | |
| | | vibrator.vibrate(500); |
| | | } |
| | | String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16); |
| | | AgvAction agvAction = new AgvAction<>(FrontPaddle.class) |
| | | AgvAction agvAction = new AgvAction<>(AllResetAction.class) |
| | | .setAgvNo(AgvNo) |
| | | .setSerialNo(substring) |
| | | .setVal(1) |