Skip to content

Commit

Permalink
Merge pull request #2 from DeepBlueRobotics/gradle-update
Browse files Browse the repository at this point in the history
Update GradleRIO to 2021.1.1-beta-4
  • Loading branch information
CoolSpy3 authored Dec 21, 2020
2 parents 97a7fa0 + 52e83da commit 3b6e41d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 68 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java-library"
id "org.carlmontrobotics.webots" version "0.8"
id "edu.wpi.first.GradleRIO" version "2021.1.1-beta-2"
id "edu.wpi.first.GradleRIO" version "2021.1.1-beta-4"
}

group 'org.carlmontrobotics'
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/lib/sim/SimRegisterer.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ private static void callback(String deviceName, int deviceHandle) {
// Create a WebotsMotorForwarder for this motor
final WebotsMotorForwarder fwdr = new WebotsMotorForwarder(Simulation.robot, deviceName);
// Register a callback for when the Motor Output changes
SimUtils.registerValueChangedCallback(new SimDeviceSim(deviceName), "Motor Output",
SimDeviceSim motor = new SimDeviceSim(deviceName);
callbacks.add(motor.registerValueChangedCallback(motor.getValue("Motor Output"),
// Call the callback function
(name, handle, readonly, value) -> fwdr.callback(name, value),
// Initalize with current speed
true);
true));
}
if(deviceName.startsWith("navX")) {
// If a navX is registered, try to link its SimDevice to the Webots robot
Expand Down
65 changes: 0 additions & 65 deletions src/main/java/frc/robot/lib/sim/SimUtils.java

This file was deleted.

0 comments on commit 3b6e41d

Please sign in to comment.