Skip to content

Commit e4eea8e

Browse files
committed
Formatted
1 parent e886207 commit e4eea8e

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

engine/Assets/Scripts/Drivers/RotationalDriver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ private void VelocityControl(float deltaT) {
293293
} else if (_fakedTheta < _rotationalLimits.Value.min) {
294294
_fakedTheta = _rotationalLimits.Value.min;
295295
}
296-
296+
297297
// Limit theta to specific range
298298
_fakedTheta = Mathf.Clamp(_fakedTheta, -180, 179);
299-
299+
300300
// Check and see if we've hit a hard limit to zero out velocity
301301
if (Math.Abs(lastFakedTheta - _fakedTheta) < 0.001f)
302302
_lastVel = 0;

engine/Assets/Scripts/Importer/Importer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ void WheelJoint() {
210210
mat.dynamicFriction = 0f;
211211
mat.staticFriction = 0f;
212212
mat.frictionCombine = PhysicMaterialCombine.Multiply;
213-
mat.bounceCombine = PhysicMaterialCombine.Multiply;
214-
mat.bounciness = 0f;
213+
mat.bounceCombine = PhysicMaterialCombine.Multiply;
214+
mat.bounciness = 0f;
215215
});
216216

217217
var wheelA = gameObjectA.AddComponent<FixedJoint>();

engine/Assets/Scripts/UI/Dynamic/Modals/Configuring/ConfigJointModal.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public override void Create() {
141141

142142
if (_joints[0].driver is WheelDriver) {
143143
CreateEntry("Drive", (_joints[0].driver as WheelDriver).Motor.force / RPM_TO_RADPERSEC,
144-
(_joints[0].driver as WheelDriver).Motor.targetVelocity / RPM_TO_RADPERSEC, false, x => ChangeDriveAcc(x),
145-
x => ChangeDriveVelocity(x));
144+
(_joints[0].driver as WheelDriver).Motor.targetVelocity / RPM_TO_RADPERSEC, false,
145+
x => ChangeDriveAcc(x), x => ChangeDriveVelocity(x));
146146
if (_robotISSwerve) {
147147
CreateEntry("Turn", (_joints[driveCount].driver as RotationalDriver).Motor.force,
148148
(_joints[driveCount].driver as RotationalDriver).Motor.targetVelocity, true, x => ChangeTurnAcc(x),
@@ -182,8 +182,9 @@ public override void Create() {
182182
u = "RPM";
183183
break;
184184
}
185-
CreateEntry(GetName(_joints[i].driver), _joints[j].origAcc, _joints[j].origVel, !(_joints[i].driver is WheelDriver),
186-
x => _joints[j].setMaxAcceleration(x), x => _joints[j].setMaxVelocity(x), u);
185+
CreateEntry(GetName(_joints[i].driver), _joints[j].origAcc, _joints[j].origVel,
186+
!(_joints[i].driver is WheelDriver), x => _joints[j].setMaxAcceleration(x),
187+
x => _joints[j].setMaxVelocity(x), u);
187188
}
188189
}
189190
_scrollView.Content.SetTopStretch<Content>().SetHeight<Content>(
@@ -194,8 +195,8 @@ public override void Update() {}
194195

195196
public override void Delete() {}
196197

197-
private void CreateEntry(string name, float currAcc, float currVel, bool includeAcc, Action<float> onAcc, Action<float> onVel,
198-
string velUnits = "RPM") {
198+
private void CreateEntry(string name, float currAcc, float currVel, bool includeAcc, Action<float> onAcc,
199+
Action<float> onVel, string velUnits = "RPM") {
199200
Content entry =
200201
_scrollView.Content.CreateSubContent(new Vector2(_scrollViewWidth - 20, PADDING + PADDING + PADDING + 50f))
201202
.SetTopStretch<Content>(0, 20, 0)
@@ -214,7 +215,7 @@ private void CreateEntry(string name, float currAcc, float currVel, bool include
214215
.SetValue((int) currVel)
215216
.ApplyTemplate(VerticalLayout)
216217
.AddOnValueChangedEvent((s, v) => { onVel(v); });
217-
if (includeAcc)
218+
if (includeAcc)
218219
accContent.CreateNumberInputField()
219220
.StepIntoLabel(l => l.SetText($"{velUnits}/S"))
220221
.StepIntoHint(h => h.SetText("Acceleration"))

0 commit comments

Comments
 (0)