[wpilibj] DrivetrainSim: Initialize m_u to default value (#2854)

m_u wasn't being initialized, so if user called update() before setInputs() the program would crash with an NPE.
This commit is contained in:
Starlight220
2020-11-13 21:06:46 +02:00
committed by GitHub
parent 17d75d8a3b
commit 6b5e83ce1d

View File

@@ -98,6 +98,7 @@ public class DifferentialDrivetrainSim {
m_currentGearing = m_originalGearing;
m_x = new Matrix<>(Nat.N7(), Nat.N1());
m_u = VecBuilder.fill(0, 0);
}
/**