Skip to content

Commit d3f05aa

Browse files
Write sensor type for CO2 in initDb
1 parent 25df127 commit d3f05aa

2 files changed

Lines changed: 8 additions & 25 deletions

File tree

backend/api/Database/Context/InitDb.cs

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,8 @@ private static List<TaskDefinition> GetMissionTaskDefinitions()
202202
Description = "dummy task 1",
203203
RobotPose = new Pose(),
204204
AnalysisTypes = [AnalysisType.Fencilla],
205-
TargetPosition = new Position
206-
{
207-
X = 0,
208-
Y = 0,
209-
Z = 0,
210-
},
205+
SensorType = SensorType.Image,
206+
TargetPosition = new Position(),
211207
};
212208

213209
var task2 = new TaskDefinition
@@ -216,13 +212,9 @@ private static List<TaskDefinition> GetMissionTaskDefinitions()
216212
TagId = "dummy-tag-id-2",
217213
Description = "dummy task 2",
218214
RobotPose = new Pose(),
215+
SensorType = SensorType.Image,
219216
AnalysisTypes = [AnalysisType.CLOE],
220-
TargetPosition = new Position
221-
{
222-
X = 0,
223-
Y = 0,
224-
Z = 0,
225-
},
217+
TargetPosition = new Position(),
226218
};
227219

228220
var task3 = new TaskDefinition
@@ -232,12 +224,8 @@ private static List<TaskDefinition> GetMissionTaskDefinitions()
232224
Description = "dummy task 3",
233225
RobotPose = new Pose(),
234226
AnalysisTypes = [AnalysisType.CO2],
235-
TargetPosition = new Position
236-
{
237-
X = 0,
238-
Y = 0,
239-
Z = 0,
240-
},
227+
SensorType = SensorType.CO2Measurement,
228+
TargetPosition = new Position(),
241229
};
242230

243231
var task4 = new TaskDefinition
@@ -248,12 +236,7 @@ private static List<TaskDefinition> GetMissionTaskDefinitions()
248236
RobotPose = new Pose(),
249237
SensorType = SensorType.ThermalImage,
250238
AnalysisTypes = [AnalysisType.ThermalReading],
251-
TargetPosition = new Position
252-
{
253-
X = 0,
254-
Y = 0,
255-
Z = 0,
256-
},
239+
TargetPosition = new Position(),
257240
};
258241

259242
return new List<TaskDefinition>([task1, task2, task3, task4]);

backend/api/Database/Models/TaskDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public TaskDefinition(TaskQuery taskQuery, int index)
5050

5151
public IList<AnalysisType> AnalysisTypes { get; set; } = [];
5252

53-
public SensorType SensorType { get; set; }
53+
public SensorType SensorType { get; set; } // Note that the enum will get SensorType.Image as default
5454

5555
public float? VideoDuration { get; set; }
5656

0 commit comments

Comments
 (0)