|
|
@ -4,9 +4,16 @@ import com.dreamworks.boditech.driver.actuator.ActArmXY; |
|
|
|
import com.dreamworks.boditech.driver.actuator.ActArmZMotor; |
|
|
|
import com.dreamworks.boditech.driver.actuator.ActPipette; |
|
|
|
import com.dreamworks.boditech.driver.actuator.ActuatorModule; |
|
|
|
import com.dreamworks.boditech.driver.consumable.CsmPipetteTip; |
|
|
|
import com.dreamworks.boditech.driver.consumable.CsmPipetteTipBox; |
|
|
|
import com.dreamworks.boditech.driver.consumable.CsmPipetteTipManager; |
|
|
|
import com.dreamworks.boditech.driver.entity.ParamPipetteTipUpdate; |
|
|
|
import com.dreamworks.boditech.service.AccountService; |
|
|
|
import com.dreamworks.boditech.service.DeviceService; |
|
|
|
import com.dreamworks.boditech.service.WebsocketServerService; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
@ -15,6 +22,8 @@ import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import java.util.Map; |
|
|
|
@Controller |
|
|
|
public class TmpController extends BaseController { |
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(TmpController.class); |
|
|
|
|
|
|
|
@Resource |
|
|
|
private DeviceService deviceService; |
|
|
|
|
|
|
@ -29,4 +38,35 @@ public class TmpController extends BaseController { |
|
|
|
armZ.moveToLiquidLevel(name); |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/tmp/pipette-tip-test") |
|
|
|
public ApiResponse pipetteTipTest( @RequestBody Map<String,Object> params ) { |
|
|
|
ActArmXY armXY = (ActArmXY)this.deviceService.device.getActuator(ActuatorModule.ARM_XY); |
|
|
|
ActArmZMotor armZ = (ActArmZMotor)this.deviceService.device.getActuator(ActuatorModule.ARM_Z_MOTOR); |
|
|
|
armZ.reset(); |
|
|
|
armXY.reset(); |
|
|
|
|
|
|
|
this.deviceService.device.pipetteTips.updateByBox(new ParamPipetteTipUpdate() {{ |
|
|
|
index = 0; |
|
|
|
tipAmount = 120; |
|
|
|
}}); |
|
|
|
this.deviceService.device.pipetteTips.updateByBox(new ParamPipetteTipUpdate() {{ |
|
|
|
index = 1; |
|
|
|
tipAmount = 120; |
|
|
|
}}); |
|
|
|
this.deviceService.device.pipetteTips.updateByBox(new ParamPipetteTipUpdate() {{ |
|
|
|
index = 2; |
|
|
|
tipAmount = 120; |
|
|
|
}}); |
|
|
|
ActPipette pipette = (ActPipette)this.deviceService.device.getActuator(ActuatorModule.ARM_Z_PIPETTE); |
|
|
|
CsmPipetteTipManager tipManager = this.deviceService.device.pipetteTips; |
|
|
|
while ( !tipManager.isEmpty() ) { |
|
|
|
CsmPipetteTip tip = tipManager.tipAlloc(); |
|
|
|
LOG.info("pick up : box={}; index={}; x={}; y={}", tip.boxIndex,tip.index, tip.getLocationX(), tip.getLocationY()); |
|
|
|
pipette.pickUpTip(tip); |
|
|
|
pipette.dropTip(); |
|
|
|
} |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
} |