|
@ -1,4 +1,5 @@ |
|
|
package com.iflytop.a800.controller; |
|
|
package com.iflytop.a800.controller; |
|
|
|
|
|
import com.iflytop.a800.device.Device; |
|
|
import com.iflytop.a800.task.StartResetTask; |
|
|
import com.iflytop.a800.task.StartResetTask; |
|
|
import com.iflytop.uf.UfActuatorCmdExecutor; |
|
|
import com.iflytop.uf.UfActuatorCmdExecutor; |
|
|
import com.iflytop.uf.controller.UfApiControllerBase; |
|
|
import com.iflytop.uf.controller.UfApiControllerBase; |
|
@ -25,19 +26,16 @@ public class DeviceController extends UfApiControllerBase { |
|
|
// String testCardWarehouseTempText = UfActuatorCmdExecutor.execute("TestCardWarehouse", "read_temperature"); |
|
|
// String testCardWarehouseTempText = UfActuatorCmdExecutor.execute("TestCardWarehouse", "read_temperature"); |
|
|
// int testCardWarehouseTempInt = Integer.parseInt(testCardWarehouseTempText); |
|
|
// int testCardWarehouseTempInt = Integer.parseInt(testCardWarehouseTempText); |
|
|
Double testCardWarehouseTemp = 0.0; //(double) testCardWarehouseTempInt / 100.0; |
|
|
Double testCardWarehouseTemp = 0.0; //(double) testCardWarehouseTempInt / 100.0; |
|
|
|
|
|
|
|
|
|
|
|
// String incubatorTempStr = UfActuatorCmdExecutor.execute("IncubatorTempCtrl", "read_temperature"); |
|
|
|
|
|
// int incubatorTempInt = Integer.parseInt(incubatorTempStr); |
|
|
|
|
|
Double incubatorTemp = 0.0; // (double)incubatorTempInt / 10.0; |
|
|
return this.success(Map.of( |
|
|
return this.success(Map.of( |
|
|
"testCardBoxCase", testCardWarehouseTemp |
|
|
|
|
|
|
|
|
"testCardBoxCase", testCardWarehouseTemp, |
|
|
|
|
|
"incubatorTemp", incubatorTemp |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping("/api/device/trash-box-status-get") |
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
public UfApiResponse trashBoxStatusGet() { |
|
|
|
|
|
Map<String,Object> trashBox = new HashMap<>(); |
|
|
|
|
|
trashBox.put("status", UfMdbRuntimeVariable.getString("TrashBoxStatus", "EMPTY")); |
|
|
|
|
|
return this.success(trashBox); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/api/device/id-chip-status-get") |
|
|
@PostMapping("/api/device/id-chip-status-get") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public UfApiResponse idChipStatusGet() { |
|
|
public UfApiResponse idChipStatusGet() { |
|
@ -58,4 +56,11 @@ public class DeviceController extends UfApiControllerBase { |
|
|
} |
|
|
} |
|
|
return this.success(); |
|
|
return this.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/api/device/trash-box-clean") |
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
public UfApiResponse trashBoxClean() { |
|
|
|
|
|
Device.getInstance().trashBox.clean(); |
|
|
|
|
|
return this.success(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |