Merge remote-tracking branch 'github/lab1_huranets' into lab1_huranets
All checks were successful
Test Agent / test-agent-run (push) Successful in 5m49s
All checks were successful
Test Agent / test-agent-run (push) Successful in 5m49s
This commit is contained in:
commit
564fe329f3
@ -203,9 +203,16 @@ class FileDatasource:
|
||||
def _parse_acc(row: List[str]) -> Accelerometer:
|
||||
if len(row) < 3:
|
||||
raise ValueError(f"Accelerometer row must have 3 values (x,y,z). Got: {row}")
|
||||
|
||||
try:
|
||||
x = int(row[0])
|
||||
y = int(row[1])
|
||||
z = int(row[2])
|
||||
except ValueError as e:
|
||||
raise ValueError(
|
||||
f"Invalid accelerometer values (expected integers): {row}"
|
||||
) from e
|
||||
|
||||
return Accelerometer(x=x, y=y, z=z)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user