Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GradleRIO to 2021.1.1-beta-4 #2

Merged
merged 1 commit into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.