Skip to content

Commit

Permalink
Remove unnecessary parameters from CreateRobotQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Apr 2, 2024
1 parent 2dc1884 commit aed62bf
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 28 deletions.
8 changes: 0 additions & 8 deletions backend/api.test/Client/MissionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,6 @@ public async Task ScheduleDuplicateCustomMissionDefinitions()
SerialNumber = "GetNextRun",
RobotType = RobotType.Robot,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallationCode = installationCode,
Expand Down Expand Up @@ -507,8 +505,6 @@ public async Task GetNextRun()
SerialNumber = "GetNextRun",
RobotType = RobotType.Robot,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallationCode = installation.InstallationCode,
Expand Down Expand Up @@ -691,8 +687,6 @@ public async Task MissionDoesNotStartIfRobotIsNotInSameInstallationAsMission()
SerialNumber = "GetNextRun",
RobotType = RobotType.Robot,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallationCode = otherInstallation.InstallationCode,
Expand Down Expand Up @@ -760,8 +754,6 @@ public async Task MissionFailsIfRobotIsNotInSameDeckAsMission()
SerialNumber = "GetMissionFailsIfRobotIsNotInSameDeckAsMission",
RobotType = RobotType.Robot,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallationCode = installation.InstallationCode,
Expand Down
2 changes: 0 additions & 2 deletions backend/api.test/Client/RobotTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ public async Task RobotIsNotCreatedWithAreaNotInInstallation()
SerialNumber = "GetNextRun",
RobotType = RobotType.Robot,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallationCode = wrongInstallation.InstallationCode,
Expand Down
2 changes: 0 additions & 2 deletions backend/api.test/Database/DatabaseUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ public async Task<Robot> NewRobot(RobotStatus status, Installation installation,
VideoStreams = new List<CreateVideoStreamQuery>(),
Host = "localhost",
Port = 3000,
IsarConnected = true,
Deprecated = false,
Status = status
};

Expand Down
2 changes: 0 additions & 2 deletions backend/api.test/Services/RobotService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ public async Task Create()
RobotType = RobotType.Robot,
Host = "",
Port = 1,
IsarConnected = true,
Deprecated = false,
Status = RobotStatus.Available
};

Expand Down
4 changes: 0 additions & 4 deletions backend/api/Controllers/Models/CreateRobotQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public struct CreateRobotQuery

public int Port { get; set; }

public bool IsarConnected { get; set; }

public bool Deprecated { get; set; }

public RobotStatus Status { get; set; }
}
}
6 changes: 0 additions & 6 deletions backend/api/Database/Context/InitDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ private static List<Robot> GetRobots()
Name = "R2-D2",
SerialNumber = "D2",
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallation = installations[0],
Expand All @@ -299,8 +297,6 @@ private static List<Robot> GetRobots()
IsarId = "c68b679d-308b-460f-9fe0-87eaadbd1234",
SerialNumber = "SS79",
Status = RobotStatus.Busy,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallation = installations[0],
Expand All @@ -314,8 +310,6 @@ private static List<Robot> GetRobots()
IsarId = "c68b679d-308b-460f-9fe0-87eaadbd5678",
SerialNumber = "Earth616",
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false,
Host = "localhost",
Port = 3000,
CurrentInstallation = installations[0],
Expand Down
5 changes: 3 additions & 2 deletions backend/api/Database/Models/Robot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public Robot()
Name = "defaultId";
SerialNumber = "defaultSerialNumber";
Status = RobotStatus.Offline;
IsarConnected = true;
Deprecated = false;
Host = "localhost";
Port = 3000;
Expand Down Expand Up @@ -41,8 +42,8 @@ public Robot(CreateRobotQuery createQuery, Installation installation, Area? area
VideoStreams = videoStreams;
Host = createQuery.Host;
Port = createQuery.Port;
IsarConnected = createQuery.IsarConnected;
Deprecated = createQuery.Deprecated;
IsarConnected = true;
Deprecated = false;
Status = createQuery.Status;
Pose = new Pose();
}
Expand Down
2 changes: 0 additions & 2 deletions backend/api/EventHandlers/MqttEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ private async void OnIsarRobotInfo(object? sender, MqttReceivedArgs mqttArgs)
Host = isarRobotInfo.Host,
Port = isarRobotInfo.Port,
Status = RobotStatus.Available,
IsarConnected = true,
Deprecated = false
};

var newRobot = await robotService.CreateFromQuery(robotQuery);
Expand Down

0 comments on commit aed62bf

Please sign in to comment.