[wpilibj] Remove getSimObject (#2479)

This approach to getting the simulation object doesn't work in C++ and
creates coupling that doesn't need to be present.
This commit is contained in:
Peter Johnson
2020-04-12 10:37:27 -07:00
committed by GitHub
parent c82b8546bc
commit 212182d991
5 changed files with 7 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -27,7 +27,7 @@ class AnalogInputSimTest {
HAL.initialize(500, 0);
AnalogInput input = new AnalogInput(5);
AnalogInSim inputSim = input.getSimObject();
AnalogInSim inputSim = new AnalogInSim(5);
for (double i = 0; i < 5.0; i += 0.1) {
inputSim.setVoltage(0);

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -39,7 +39,7 @@ class AnalogOutputSimTest {
AnalogOutput output = new AnalogOutput(0);
output.setVoltage(0.5);
AnalogOutSim outputSim = output.getSimObject();
AnalogOutSim outputSim = new AnalogOutSim(0);
DoubleStore store = new DoubleStore();