Skip to content

Commit

Permalink
Add inspection target to custom mission query
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Nov 14, 2023
1 parent fb7355d commit d630122
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 14 additions & 2 deletions backend/api.test/Client/AreaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,23 @@ public async Task GetMissionsInAreaTest()

var inspections = new List<CustomInspectionQuery>
{
new() { AnalysisType = AnalysisType.CarSeal, InspectionType = InspectionType.Image}
new()
{
AnalysisType = AnalysisType.CarSeal,
InspectionTarget = new Position(),
InspectionType = InspectionType.Image
}
};
var tasks = new List<CustomTaskQuery>
{
new() { Inspections = inspections, InspectionTarget = new Position(), TagId = "test", RobotPose = new Pose(), TaskOrder = 0}
new()
{
Inspections = inspections,
InspectionTarget = new Position(),
TagId = "test",
RobotPose = new Pose(),
TaskOrder = 0
}
};
var missionQuery = new CustomMissionQuery
{
Expand Down
2 changes: 2 additions & 0 deletions backend/api/Controllers/Models/CustomMissionQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public struct CustomInspectionQuery
{
public InspectionType InspectionType { get; set; }

public Position InspectionTarget { get; set; }

public float? VideoDuration { get; set; }

public AnalysisType? AnalysisType { get; set; }
Expand Down
1 change: 1 addition & 0 deletions backend/api/Database/Models/Inspection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public Inspection(EchoInspection echoInspection)
public Inspection(CustomInspectionQuery inspectionQuery)
{
InspectionType = inspectionQuery.InspectionType;
InspectionTarget = inspectionQuery.InspectionTarget;
VideoDuration = inspectionQuery.VideoDuration;
AnalysisType = inspectionQuery.AnalysisType;
Status = InspectionStatus.NotStarted;
Expand Down

0 comments on commit d630122

Please sign in to comment.