mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[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:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user