| | |
| | | /// <param name="task">要下发的任务对象</param> |
| | | /// <param name="state">机器人当前状态</param> |
| | | /// <param name="isScanNG">是否扫码NG</param> |
| | | public async Task SendSocketRobotPickAsync(Dt_RobotTask task, RobotSocketState state, bool isScanNG) |
| | | public async Task SendSocketRobotPickAsync(Dt_RobotTask task, RobotSocketState state, bool isScanNG = false) |
| | | { |
| | | // 构建取货指令,格式:Pickbattery,{源地址} |
| | | string taskString = $"Pickbattery,{task.RobotSourceAddress}"; |
| | |
| | | Channel = x, |
| | | |
| | | // 电池条码:如果状态中有条码列表,取对应位置的条码;否则为空 |
| | | CellBarcode = state.CellBarcode?.Count > 0 ? state.CellBarcode[x - 1] : "" |
| | | //CellBarcode = state.CellBarcode?.Count > 0 ? state.CellBarcode[x - 1] : "" |
| | | CellBarcode = state.CellBarcode[idx].ToString() |
| | | }) |
| | | .ToList() |
| | | }; |