Skip to content

Commit

Permalink
Format object initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Oct 27, 2023
1 parent 4e46c29 commit 653820b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 4 additions & 2 deletions backend/api.test/EventHandlers/TestMissionEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class TestMissionEventHandler : IDisposable
{
private static readonly Installation testInstallation = new()
{
InstallationCode = "test", Name = "test test"
InstallationCode = "test",
Name = "test test"
};
private static readonly Plant testPlant = new()
{
Expand Down Expand Up @@ -326,7 +327,8 @@ private void SetupMocksForRobotController(Robot robot, MissionRun missionRun)
new IsarMission(
new IsarStartMissionResponse
{
MissionId = "test", Tasks = new List<IsarTaskResponse>()
MissionId = "test",
Tasks = new List<IsarTaskResponse>()
}
)
);
Expand Down
18 changes: 14 additions & 4 deletions backend/api/EventHandlers/MqttEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ private static void UpdateVideoStreamsIfChanged(List<CreateVideoStreamQuery> vid
stream =>
new VideoStream
{
Name = stream.Name, Url = stream.Url, Type = stream.Type
Name = stream.Name,
Url = stream.Url,
Type = stream.Type
}
)
.ToList();
Expand Down Expand Up @@ -310,7 +312,10 @@ private async void OnBatteryUpdate(object? sender, MqttReceivedArgs mqttArgs)
await timeseriesService.Create(
new RobotBatteryTimeseries
{
MissionId = robot.CurrentMissionId, BatteryLevel = batteryStatus.BatteryLevel, RobotId = robot.Id, Time = DateTimeOffset.UtcNow
MissionId = robot.CurrentMissionId,
BatteryLevel = batteryStatus.BatteryLevel,
RobotId = robot.Id,
Time = DateTimeOffset.UtcNow
}
);
_logger.LogDebug("Updated battery on robot '{RobotName}' with ISAR id '{IsarId}'", robot.Name, robot.IsarId);
Expand Down Expand Up @@ -338,7 +343,10 @@ private async void OnPressureUpdate(object? sender, MqttReceivedArgs mqttArgs)
await timeseriesService.Create(
new RobotPressureTimeseries
{
MissionId = robot.CurrentMissionId, Pressure = pressureStatus.PressureLevel, RobotId = robot.Id, Time = DateTimeOffset.UtcNow
MissionId = robot.CurrentMissionId,
Pressure = pressureStatus.PressureLevel,
RobotId = robot.Id,
Time = DateTimeOffset.UtcNow
}
);
_logger.LogDebug("Updated pressure on '{RobotName}' with ISAR id '{IsarId}'", robot.Name, robot.IsarId);
Expand Down Expand Up @@ -372,7 +380,9 @@ private async void OnPoseUpdate(object? sender, MqttReceivedArgs mqttArgs)
await timeseriesService.Create(
new RobotPoseTimeseries(robot.Pose)
{
MissionId = robot.CurrentMissionId, RobotId = robot.Id, Time = DateTimeOffset.UtcNow
MissionId = robot.CurrentMissionId,
RobotId = robot.Id,
Time = DateTimeOffset.UtcNow
}
);
_logger.LogDebug("Updated pose on robot '{RobotName}' with ISAR id '{IsarId}'", robot.Name, robot.IsarId);
Expand Down

0 comments on commit 653820b

Please sign in to comment.