Spline UI fixups for 2024
Change-Id: Ibdfc060cc0ad6c2875712f2a762111631e9428ec
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/frc971/control_loops/python/constants.py b/frc971/control_loops/python/constants.py
index 260a6ad..f96e2fe 100644
--- a/frc971/control_loops/python/constants.py
+++ b/frc971/control_loops/python/constants.py
@@ -148,7 +148,8 @@
return "y2022/actors/splines"
elif field.year == 2023:
return "y2023/autonomous/splines"
- #TODO: Update 2024 spline jsons
+ elif field.year == 2024:
+ return "y2024/autonomous/splines"
else:
return "frc971/control_loops/python/spline_jsons"
diff --git a/frc971/control_loops/python/path_edit.py b/frc971/control_loops/python/path_edit.py
index 1659e55..0cd41cb 100755
--- a/frc971/control_loops/python/path_edit.py
+++ b/frc971/control_loops/python/path_edit.py
@@ -311,7 +311,8 @@
file = filename.with_suffix(f".{index}.json")
print(f" {file.relative_to(export_folder)}")
with open(file, mode='w') as points_file:
- json.dump(multispline.toJsonObject(), points_file)
+ # Indent to make the file actually readable
+ json.dump(multispline.toJsonObject(), points_file, indent=4)
def import_json(self, file_name):
# Abort place mode