diff --git a/choreolib/test_deploy/test.chor b/choreolib/test_deploy/test.chor index f04e7f5810..577e535dfc 100644 --- a/choreolib/test_deploy/test.chor +++ b/choreolib/test_deploy/test.chor @@ -24,7 +24,7 @@ "back":["16 in",0.4064], "right":["16 in",0.4064] }, - "differentialTrackWidth":["24 in",0.6096], + "differentialTrackwidth":["24 in",0.6096], }, "generationFeatures":[] } diff --git a/src-core/src/generation/transformers/drivetrain_and_bumpers.rs b/src-core/src/generation/transformers/drivetrain_and_bumpers.rs index 920ad0b252..72fde29890 100644 --- a/src-core/src/generation/transformers/drivetrain_and_bumpers.rs +++ b/src-core/src/generation/transformers/drivetrain_and_bumpers.rs @@ -57,7 +57,7 @@ impl DifferentialGenerationTransformer for DrivetrainAndBumpersSetter { wheel_max_angular_velocity: config.vmax / config.gearing, wheel_max_torque: config.tmax * config.gearing, wheel_cof: config.cof, - trackwidth: config.differential_track_width, + trackwidth: config.differential_trackwidth, }; generator.set_drivetrain(&drivetrain); diff --git a/src-core/src/spec/project.rs b/src-core/src/spec/project.rs index b5210dcb93..6cd650ce6e 100644 --- a/src-core/src/spec/project.rs +++ b/src-core/src/spec/project.rs @@ -94,7 +94,7 @@ pub struct RobotConfig { pub tmax: T, // N*m pub cof: T, pub bumper: Bumper, - pub differential_track_width: T, + pub differential_trackwidth: T, } impl RobotConfig { @@ -110,7 +110,7 @@ impl RobotConfig { tmax: self.tmax.snapshot(), cof: self.cof.snapshot(), bumper: self.bumper.snapshot(), - differential_track_width: self.differential_track_width.snapshot(), + differential_trackwidth: self.differential_trackwidth.snapshot(), } } } @@ -197,7 +197,7 @@ impl Default for ProjectFile { side: Expr::new("16 in", 0.4064), back: Expr::new("16 in", 0.4064), }, - differential_track_width: Expr::new("22 in", 0.2794 * 2.0), + differential_trackwidth: Expr::new("22 in", 0.2794 * 2.0), }, generation_features: Vec::new(), } diff --git a/src/components/config/robotconfig/DifferentialConfigPanel.tsx b/src/components/config/robotconfig/DifferentialConfigPanel.tsx index 7a74adfaf2..53a57c0aa4 100644 --- a/src/components/config/robotconfig/DifferentialConfigPanel.tsx +++ b/src/components/config/robotconfig/DifferentialConfigPanel.tsx @@ -17,7 +17,7 @@ class SwerveConfigPanel extends Component { title="Trackwidth" enabled={true} roundingPrecision={3} - number={config.differentialTrackWidth} + number={config.differentialTrackwidth} maxWidthCharacters={8} titleTooltip="Distance between wheel sides" /> diff --git a/src/document/DocumentManager.ts b/src/document/DocumentManager.ts index ad6c6d9dd7..0ea7625596 100644 --- a/src/document/DocumentManager.ts +++ b/src/document/DocumentManager.ts @@ -161,8 +161,8 @@ function getConstructors(vars: () => IVariables): EnvConstructors { x: vars().createExpression(config.backLeft.x, "Length"), y: vars().createExpression(config.backLeft.y, "Length") }, - differentialTrackWidth: vars().createExpression( - config.differentialTrackWidth, + differentialTrackwidth: vars().createExpression( + config.differentialTrackwidth, "Length" ), identifier: crypto.randomUUID() diff --git a/src/document/RobotConfigStore.ts b/src/document/RobotConfigStore.ts index 73d90f8b28..766a0015cf 100644 --- a/src/document/RobotConfigStore.ts +++ b/src/document/RobotConfigStore.ts @@ -40,7 +40,7 @@ export const EXPR_DEFAULTS: RobotConfig = { x: { exp: `${-halfWheelbase} in`, val: -DEFAULT_WHEELBASE / 2 }, y: { exp: `${halfWheelbase} in`, val: DEFAULT_WHEELBASE / 2 } }, - differentialTrackWidth: { + differentialTrackwidth: { exp: `${MToIn(DEFAULT_WHEELBASE)} in`, val: DEFAULT_WHEELBASE } @@ -129,7 +129,7 @@ export const RobotConfigStore = types bumper: BumperStore, frontLeft: ModuleStore, backLeft: ModuleStore, - differentialTrackWidth: ExpressionStore, + differentialTrackwidth: ExpressionStore, identifier: types.identifier }) .views((self) => { @@ -152,7 +152,7 @@ export const RobotConfigStore = types bumper: self.bumper.serialize, frontLeft: self.frontLeft.serialize, backLeft: self.backLeft.serialize, - differentialTrackWidth: self.differentialTrackWidth.serialize + differentialTrackwidth: self.differentialTrackwidth.serialize }; }, get moduleTranslations(): [ @@ -185,7 +185,7 @@ export const RobotConfigStore = types bumper: self.bumper.snapshot, frontLeft: self.frontLeft.snapshot, backLeft: self.backLeft.snapshot, - differentialTrackWidth: self.differentialTrackWidth.value + differentialTrackwidth: self.differentialTrackwidth.value }; } }; @@ -203,7 +203,7 @@ export const RobotConfigStore = types self.bumper.deserialize(config.bumper); self.frontLeft.deserialize(config.frontLeft); self.backLeft.deserialize(config.backLeft); - self.differentialTrackWidth.deserialize(config.differentialTrackWidth); + self.differentialTrackwidth.deserialize(config.differentialTrackwidth); } }; })