diff --git a/src/org/_2585robophiles/lib2585/DoubleSolenoid.java b/src/org/_2585robophiles/lib2585/DoubleSolenoid.java index dc31197..60aaec3 100644 --- a/src/org/_2585robophiles/lib2585/DoubleSolenoid.java +++ b/src/org/_2585robophiles/lib2585/DoubleSolenoid.java @@ -1,14 +1,18 @@ package org._2585robophiles.lib2585; +import java.io.Serializable; + import edu.wpi.first.wpilibj.Relay; import edu.wpi.first.wpilibj.SensorBase; /** * Solenoid with relays going in opposite directions */ -public class DoubleSolenoid extends SensorBase { +public class DoubleSolenoid extends SensorBase implements Serializable { - private Relay relayOne, relayTwo; + private static final long serialVersionUID = 3161366075688287541L; + + private transient Relay relayOne, relayTwo; private boolean defaultState = true; /** diff --git a/src/org/_2585robophiles/lib2585/ExecuterBasedRobot.java b/src/org/_2585robophiles/lib2585/ExecuterBasedRobot.java index b6209c9..4c227c6 100644 --- a/src/org/_2585robophiles/lib2585/ExecuterBasedRobot.java +++ b/src/org/_2585robophiles/lib2585/ExecuterBasedRobot.java @@ -1,13 +1,17 @@ package org._2585robophiles.lib2585; +import java.io.Serializable; + import edu.wpi.first.wpilibj.IterativeRobot; /** * Robot that uses executers This is the equivelant of a main class in WPILib. */ -public abstract class ExecuterBasedRobot extends IterativeRobot { +public abstract class ExecuterBasedRobot extends IterativeRobot implements Serializable { - private Executer executer; + private static final long serialVersionUID = 2220871954112107703L; + + private transient Executer executer; /* * (non-Javadoc) diff --git a/src/org/_2585robophiles/lib2585/MultiMotor.java b/src/org/_2585robophiles/lib2585/MultiMotor.java index 30ffcfd..68ddd14 100644 --- a/src/org/_2585robophiles/lib2585/MultiMotor.java +++ b/src/org/_2585robophiles/lib2585/MultiMotor.java @@ -1,14 +1,18 @@ package org._2585robophiles.lib2585; +import java.io.Serializable; + import edu.wpi.first.wpilibj.SensorBase; import edu.wpi.first.wpilibj.SpeedController; /** * This class can be used to control multiple motors which are working together as one. */ -public class MultiMotor extends SensorBase implements SpeedController { +public class MultiMotor extends SensorBase implements SpeedController, Serializable { - private SpeedController[] motors; + private static final long serialVersionUID = 6048538258446457916L; + + private transient SpeedController[] motors; /** * @param motors SpeedController array diff --git a/src/org/_2585robophiles/lib2585/RobotEnvironment.java b/src/org/_2585robophiles/lib2585/RobotEnvironment.java index 1d07f61..95e6858 100644 --- a/src/org/_2585robophiles/lib2585/RobotEnvironment.java +++ b/src/org/_2585robophiles/lib2585/RobotEnvironment.java @@ -1,13 +1,17 @@ package org._2585robophiles.lib2585; +import java.io.Serializable; + import edu.wpi.first.wpilibj.RobotBase; /** * This class represents the environment of the robot. Subclasses should contain the systems. */ -public abstract class RobotEnvironment implements Destroyable { +public abstract class RobotEnvironment implements Destroyable, Serializable { - private RobotBase robot; + private static final long serialVersionUID = 5958899478403442774L; + + private transient RobotBase robot; /** * Just a default constructor that does nothing diff --git a/src/org/_2585robophiles/lib2585/RunnableExecuter.java b/src/org/_2585robophiles/lib2585/RunnableExecuter.java index ecf75aa..ff25fd8 100644 --- a/src/org/_2585robophiles/lib2585/RunnableExecuter.java +++ b/src/org/_2585robophiles/lib2585/RunnableExecuter.java @@ -1,11 +1,14 @@ package org._2585robophiles.lib2585; +import java.io.Serializable; import java.util.Vector; /** * Executer that executes runnables */ -public abstract class RunnableExecuter implements Executer { +public abstract class RunnableExecuter implements Executer, Serializable { + + private static final long serialVersionUID = -7700534735844195641L; private final Vector runnables = new Vector(); @@ -20,4 +23,11 @@ public void execute() { } } + /** + * @return the runnables + */ + public synchronized Vector getRunnables() { + return runnables; + } + }