You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
package com.iflytop.a800.controller;
|
|
import com.iflytop.a800.device.Device;
|
|
import com.iflytop.a800.resource.BufferTube;
|
|
import com.iflytop.uf.controller.UfApiControllerBase;
|
|
import com.iflytop.uf.controller.UfApiResponse;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
@Controller
|
|
public class DemoController extends UfApiControllerBase {
|
|
@PostMapping("/api/demo/pipette-tip-pick-up")
|
|
@ResponseBody
|
|
public UfApiResponse pipetteTipPickUp() {
|
|
var pipette = Device.getInstance().pipette;
|
|
pipette.tipPickUp();
|
|
return this.success();
|
|
}
|
|
|
|
@PostMapping("/api/demo/pipette-tip-drop")
|
|
@ResponseBody
|
|
public UfApiResponse pipetteTipDrop() {
|
|
var pipette = Device.getInstance().pipette;
|
|
pipette.tipDrop();
|
|
return this.success();
|
|
}
|
|
|
|
@PostMapping("/api/demo/pipette-dispense-detection")
|
|
@ResponseBody
|
|
public UfApiResponse pipetteDispenseDetection() {
|
|
var tube = Device.getInstance().bufferTube.alloc();
|
|
var pipette = Device.getInstance().pipette;
|
|
pipette.dispense(tube);
|
|
return this.success();
|
|
}
|
|
}
|