Skip to content

Commit

Permalink
Fix missing pressure on new robots
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Jan 15, 2024
1 parent f598b98 commit a9946b7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ public async Task AddPressureEntry(float pressureLevel, string isarId)
return;
}

if (robot.PressureLevel is null) return;

if (Math.Abs(pressureLevel - (float)robot.PressureLevel) > Tolerance) await robotService.UpdateRobotPressureLevel(robot.Id, pressureLevel);
if (robot.PressureLevel is null || Math.Abs(pressureLevel - (float)robot.PressureLevel) > Tolerance) await robotService.UpdateRobotPressureLevel(robot.Id, pressureLevel);

try { await timeseriesService.AddPressureEntry(robot.CurrentMissionId!, pressureLevel, robot.Id); }
catch (NpgsqlException e)
Expand Down

0 comments on commit a9946b7

Please sign in to comment.