Skip to content

Commit

Permalink
Normalize trackwidth spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Dec 19, 2024
1 parent 8525100 commit 2237fa1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion choreolib/test_deploy/test.chor
Original file line number Diff line number Diff line change
Expand Up @@ -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":[]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src-core/src/spec/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub struct RobotConfig<T: SnapshottableType> {
pub tmax: T, // N*m
pub cof: T,
pub bumper: Bumper<T>,
pub differential_track_width: T,
pub differential_trackwidth: T,
}

impl<T: SnapshottableType> RobotConfig<T> {
Expand All @@ -110,7 +110,7 @@ impl<T: SnapshottableType> RobotConfig<T> {
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(),
}
}
}
Expand Down Expand Up @@ -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(),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SwerveConfigPanel extends Component<Props, State> {
title="Trackwidth"
enabled={true}
roundingPrecision={3}
number={config.differentialTrackWidth}
number={config.differentialTrackwidth}
maxWidthCharacters={8}
titleTooltip="Distance between wheel sides"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/document/DocumentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Check failure on line 165 in src/document/DocumentManager.ts

View workflow job for this annotation

GitHub Actions / TypeScript compiler

Property 'differentialTrackwidth' does not exist on type 'RobotConfig<Expr>'. Did you mean 'differentialTrackWidth'?
"Length"
),
identifier: crypto.randomUUID()
Expand Down
10 changes: 5 additions & 5 deletions src/document/RobotConfigStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const EXPR_DEFAULTS: RobotConfig<Expr> = {
x: { exp: `${-halfWheelbase} in`, val: -DEFAULT_WHEELBASE / 2 },
y: { exp: `${halfWheelbase} in`, val: DEFAULT_WHEELBASE / 2 }
},
differentialTrackWidth: {
differentialTrackwidth: {

Check failure on line 43 in src/document/RobotConfigStore.ts

View workflow job for this annotation

GitHub Actions / TypeScript compiler

Object literal may only specify known properties, but 'differentialTrackwidth' does not exist in type 'RobotConfig<Expr>'. Did you mean to write 'differentialTrackWidth'?
exp: `${MToIn(DEFAULT_WHEELBASE)} in`,
val: DEFAULT_WHEELBASE
}
Expand Down Expand Up @@ -129,7 +129,7 @@ export const RobotConfigStore = types
bumper: BumperStore,
frontLeft: ModuleStore,
backLeft: ModuleStore,
differentialTrackWidth: ExpressionStore,
differentialTrackwidth: ExpressionStore,
identifier: types.identifier
})
.views((self) => {
Expand All @@ -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

Check failure on line 155 in src/document/RobotConfigStore.ts

View workflow job for this annotation

GitHub Actions / TypeScript compiler

Object literal may only specify known properties, but 'differentialTrackwidth' does not exist in type 'RobotConfig<Expr>'. Did you mean to write 'differentialTrackWidth'?
};
},
get moduleTranslations(): [
Expand Down Expand Up @@ -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

Check failure on line 188 in src/document/RobotConfigStore.ts

View workflow job for this annotation

GitHub Actions / TypeScript compiler

Object literal may only specify known properties, but 'differentialTrackwidth' does not exist in type 'RobotConfig<number>'. Did you mean to write 'differentialTrackWidth'?
};
}
};
Expand All @@ -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);

Check failure on line 206 in src/document/RobotConfigStore.ts

View workflow job for this annotation

GitHub Actions / TypeScript compiler

Property 'differentialTrackwidth' does not exist on type 'RobotConfig<Expr>'. Did you mean 'differentialTrackWidth'?
}
};
})
Expand Down

0 comments on commit 2237fa1

Please sign in to comment.