|
@@ -2,6 +2,8 @@ package com.sw.patroleditor.service.impl;
|
|
|
|
|
|
import com.sw.patroleditor.component.rosBridge.RobotDataCallBack;
|
|
|
import com.sw.patroleditor.component.rosBridge.RobotDataModel;
|
|
|
+import com.sw.patroleditor.domain.dto.AimDTO;
|
|
|
+import com.sw.patroleditor.domain.dto.ZoominDTO;
|
|
|
import com.sw.patroleditor.service.LocationService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -23,6 +25,33 @@ public class LocationServiceImpl implements LocationService {
|
|
|
@Override
|
|
|
public int save() {
|
|
|
RobotDataModel robotDataModel = robotDataCallBack.getRobotDataModel();
|
|
|
+ Long id = System.currentTimeMillis();
|
|
|
+ AimDTO aimDTO = new AimDTO();
|
|
|
+ aimDTO.setId(id);
|
|
|
+ aimDTO.setRoll(robotDataModel.getRoll());
|
|
|
+ aimDTO.setPitch(robotDataModel.getPitch());
|
|
|
+ aimDTO.setYaw(robotDataModel.getYaw());
|
|
|
+// aimDTO.setHeight();
|
|
|
+ aimDTO.setFocus(robotDataModel.getFocalDistance());
|
|
|
+ aimDTO.setRatio(robotDataModel.getRatio());
|
|
|
+ aimDTO.setAperture(robotDataModel.getDiaphragm());
|
|
|
+// aimDTO.setTopleftX();
|
|
|
+// aimDTO.setTopleftY();
|
|
|
+// aimDTO.setBotrightX();
|
|
|
+// aimDTO.setBotrightY();
|
|
|
+
|
|
|
+ ZoominDTO zoominDTO = new ZoominDTO();
|
|
|
+ zoominDTO.setId(id);
|
|
|
+ zoominDTO.setRoll(robotDataModel.getRoll());
|
|
|
+ zoominDTO.setPitch(robotDataModel.getPitch());
|
|
|
+ zoominDTO.setYaw(robotDataModel.getYaw());
|
|
|
+ zoominDTO.setFocus(robotDataModel.getFocalDistance());
|
|
|
+ zoominDTO.setRatio(robotDataModel.getRatio());
|
|
|
+ zoominDTO.setAperture(robotDataModel.getDiaphragm());
|
|
|
+// zoominDTO.setTopleftX();
|
|
|
+// zoominDTO.setTopleftY();
|
|
|
+// zoominDTO.setBotrightX();
|
|
|
+// zoominDTO.setBotrightY();
|
|
|
return 1;
|
|
|
}
|
|
|
}
|