Skip to content

Commit

Permalink
Create streams/numbers, delete IFuser
Browse files Browse the repository at this point in the history
  • Loading branch information
BenG49 committed Jan 8, 2024
1 parent e9cb2e7 commit dc5a588
Show file tree
Hide file tree
Showing 46 changed files with 55 additions and 123 deletions.
2 changes: 1 addition & 1 deletion src/com/stuypulse/stuylib/control/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.stuypulse.stuylib.control;

import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

/**
* A controller calculates an output variable given a setpoint and measurement of a single variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import com.stuypulse.stuylib.math.Angle;
import com.stuypulse.stuylib.streams.angles.filters.AFilter;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

/**
* Base class of controller classes of continuous systems. This means that both the setpoint and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import com.stuypulse.stuylib.math.Angle;
import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.network.SmartNumber;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.filters.TimedMovingAverage;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.numbers.filters.TimedMovingAverage;
import com.stuypulse.stuylib.util.StopWatch;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import com.stuypulse.stuylib.math.Angle;
import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.network.SmartNumber;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup;
import com.stuypulse.stuylib.util.StopWatch;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/com/stuypulse/stuylib/control/feedback/PIDCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import com.stuypulse.stuylib.control.Controller;
import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.network.SmartNumber;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.filters.TimedMovingAverage;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.numbers.filters.TimedMovingAverage;
import com.stuypulse.stuylib.util.StopWatch;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/com/stuypulse/stuylib/control/feedback/PIDController.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.stuypulse.stuylib.control.Controller;
import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.network.SmartNumber;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.filters.IFilterGroup;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup;
import com.stuypulse.stuylib.util.StopWatch;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.stuypulse.stuylib.control.feedforward;

import com.stuypulse.stuylib.control.Controller;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

/**
* A feedforward term to account for gravity for motorized arms.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.stuypulse.stuylib.control.Controller;
import com.stuypulse.stuylib.control.angle.AngleController;
import com.stuypulse.stuylib.control.angle.feedforward.AnglePositionFeedforwardController;
import com.stuypulse.stuylib.streams.filters.Derivative;
import com.stuypulse.stuylib.streams.numbers.filters.Derivative;

/**
* A motor feedforward model, which can be used to calculate an output voltage given a desired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.stuypulse.stuylib.control.feedforward;

import com.stuypulse.stuylib.control.Controller;
import com.stuypulse.stuylib.streams.filters.Derivative;
import com.stuypulse.stuylib.streams.numbers.filters.Derivative;

/**
* A positional controller that uses a feedforward model to calculate motor outputs given positional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* <br>
*
* @see com.stuypulse.stuylib.streams.filters.IFilter
* @see com.stuypulse.stuylib.streams.numbers.filters.IFilter
* @author Myles Pasetsky (selym3)
*/
public class KeyGamepad extends Gamepad {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.stuypulse.stuylib.math.interpolation;

import com.stuypulse.stuylib.math.Vector2D;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

import java.util.Arrays;

Expand Down
2 changes: 1 addition & 1 deletion src/com/stuypulse/stuylib/network/SmartNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.stuypulse.stuylib.network;

import com.stuypulse.stuylib.streams.IStream;
import com.stuypulse.stuylib.streams.numbers.IStream;

import edu.wpi.first.networktables.NetworkTablesJNI;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
Expand Down
69 changes: 0 additions & 69 deletions src/com/stuypulse/stuylib/streams/IFuser.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/com/stuypulse/stuylib/streams/angles/AStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package com.stuypulse.stuylib.streams.angles;

import com.stuypulse.stuylib.math.Angle;
import com.stuypulse.stuylib.streams.IStream;
import com.stuypulse.stuylib.streams.angles.filters.AFilter;
import com.stuypulse.stuylib.streams.numbers.IStream;
import com.stuypulse.stuylib.streams.vectors.VStream;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.stuypulse.stuylib.streams.booleans.filters;

import com.stuypulse.stuylib.streams.filters.HighPassFilter;
import com.stuypulse.stuylib.streams.numbers.filters.HighPassFilter;

/**
* A simple boolean filter that returns true when a boolean stream changes depending on the type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.stuypulse.stuylib.streams.booleans.filters;

import com.stuypulse.stuylib.streams.filters.LowPassFilter;
import com.stuypulse.stuylib.streams.numbers.filters.LowPassFilter;

/**
* An RC Debounce class takes the average of the past few boolean values to remove noise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams;
package com.stuypulse.stuylib.streams.numbers;

import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

/**
* Takes an {@link IStream} and a {@link IFilter} and makes a {@link FilteredIStream}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams;
package com.stuypulse.stuylib.streams.numbers;

import com.stuypulse.stuylib.streams.angles.AStream;
import com.stuypulse.stuylib.streams.booleans.BStream;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

import java.util.function.DoubleSupplier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams;
package com.stuypulse.stuylib.streams.numbers;

/**
* A number which reads from a streams.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams;
package com.stuypulse.stuylib.streams.numbers;

import edu.wpi.first.wpilibj.Notifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.util.StopWatch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

/**
* Implementation for of a real time IIR HighPassFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

/**
* This is the Filter interface class that gives a definition for how to implement a filter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

/**
* A class that lets you combine multiple stream filters into one stream filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.util.StopWatch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.util.StopWatch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.util.StopWatch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import java.util.LinkedList;
import java.util.Queue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.math.SLMath;
import com.stuypulse.stuylib.util.StopWatch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

import com.stuypulse.stuylib.util.StopWatch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */

package com.stuypulse.stuylib.streams.filters;
package com.stuypulse.stuylib.streams.numbers.filters;

/**
* Implementation of Weighted Moving Average. In a Weighted moving average, each value in the
Expand Down
2 changes: 1 addition & 1 deletion src/com/stuypulse/stuylib/streams/vectors/VStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package com.stuypulse.stuylib.streams.vectors;

import com.stuypulse.stuylib.math.Vector2D;
import com.stuypulse.stuylib.streams.IStream;
import com.stuypulse.stuylib.streams.angles.AStream;
import com.stuypulse.stuylib.streams.numbers.IStream;
import com.stuypulse.stuylib.streams.vectors.filters.VFilter;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.stuypulse.stuylib.streams.vectors.filters;

import com.stuypulse.stuylib.streams.filters.Derivative;
import com.stuypulse.stuylib.streams.numbers.filters.Derivative;

/**
* Filter that takes the derivative of a VStream with respect to time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.stuypulse.stuylib.streams.vectors.filters;

import com.stuypulse.stuylib.math.Vector2D;
import com.stuypulse.stuylib.streams.filters.IFilter;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;

/**
* This is the VFilter interface class that gives a definition for how to implement a filter.
Expand Down
Loading

0 comments on commit dc5a588

Please sign in to comment.