generated from Programming-TRIGON/RobotTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
General Update #19
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
Merged
Merged
General Update #19
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
73c962e
started cleaning
Nummun14 48b1fef
added a BUNCH more jDocs. (I'm litterally falling asleep rn)
Nummun14 772ff20
finished adding jDocs
Nummun14 8590e74
grammer sucks
Nummun14 8fd094b
updated libraries and adapted code to it
Nummun14 9641ef3
javadocs are annoying. So is REV. So am I.
Nummun14 3bc9934
"Javadocs are actually quite fun" - Ezra Gryn 2024
Nummun14 f4b54ed
erm actually🤓
Nummun14 d659a54
JAVADOCS!!! and mirroable fix
Nummun14 a31891e
updated wpilib tools
Nummun14 8f37ade
maybe firxed SimpleMotorSimulation? (I know the jdoc isn't good, I'll…
Nummun14 7a119a5
did a bit of the review, will soon finish it
Nummun14 2676093
removed this for ezra (Your welcome, good luck on the math test :))
Nummun14 6fa773d
sim thing
Nummun14 8f0c459
"Explain more"
Nummun14 93ca69c
improve simplemotorsim jdoc
Nummun14 19a0eec
maybe improved spark sim logic
Nummun14 e7cd066
made config better
Nummun14 b56e3a7
jdocs and sim logic
Nummun14 2fcaf24
improve mechanism constructers
Nummun14 602383b
REVSucksConstants
Nummun14 320ebe2
spark sim still isn't working. (but I'm hoOolding on(epic is playing …
Nummun14 230d359
Merge branch 'main' into general-cleanup
Nummun14 f897188
javadocs suck, spit, stop, and setPosition
Nummun14 dd432bf
Removed annoying javadoc warnings
levyishai df2019a
threaded signal javadocs, and sim logic, will keep working on it late…
Nummun14 c398a10
imrproved spark encoder methods, and temporeraly removed mirroable bu…
Nummun14 d921352
added docs for cancoder and gyro, and cleaned up mirrorable
Nummun14 050783a
corrected led naming
Nummun14 8ed0e20
idea for mirrorable fix
Nummun14 c13cbe1
cleaned up mirrorable solution
Nummun14 cdc813e
idea for mirrorable fix
Nummun14 ee01192
🥸🫨🙂↔️🤒🧐mirrorable
Nummun14 3da0f22
updated limelight helpers, fixed led jdocs, reverted to old mirrorabl…
Nummun14 c4fd20a
cleaned up mirrorable, and spark. Still trying to figure out revSim
Nummun14 fc9740a
mirrorable, gyro, cancoder cleanup. SparkSim logic changes
Nummun14 db6344a
removed redundent if statement, and added temporary debugging stuff f…
Nummun14 1937b8b
improved jdocs, and changed some SparkSim logic, still doesn't work t…
Nummun14 a69df8a
jdoc and encoder sim
Nummun14 5a080b6
sim encoder logic stuff. Sim still isn't working
Nummun14 bebb7df
debugging
Nummun14 b9159e9
whitespaces and cleaning
Nummun14 6eb137c
added debugging sout
Nummun14 e656f2c
more souts
Nummun14 6a206a0
logging
Nummun14 c23adcd
id
Nummun14 63af5a5
print
Nummun14 f3eb6b4
sout
Nummun14 4705de9
* 60
Nummun14 ce72ae1
units. Also, Yishai you really never tested the code
Nummun14 5d6ce1d
docs and logs
Nummun14 aa951f6
changed encoder logic stuff
Nummun14 9b34333
camel case, and removed testing
Nummun14 4da3434
cleaned up solution. SIM WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!…
Nummun14 6d6203b
cleaning, and made motor sim get system or rotor depending on the enc…
Nummun14 dd1f31c
cleaned velocity calc
Nummun14 2b78686
no longer ew
Nummun14 f1c8acd
method name
Nummun14 29b2691
javadocs
Nummun14 de9590c
jdocs and "ecnoders
Nummun14 61f30f6
javadocs
Nummun14 422c7c6
docs and sim
Nummun14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,78 @@ | ||
| package org.trigon.hardware; | ||
|
|
||
| /** | ||
| * A class that contains stats about the robot's hardware. | ||
| */ | ||
| public class RobotHardwareStats { | ||
| public static final double SUPPLY_VOLTAGE = 12; | ||
| private static boolean IS_SIMULATION = false; | ||
| private static boolean IS_REPLAY = false; | ||
| private static double PERIODIC_TIME_SECONDS = 0.02; | ||
|
|
||
| /** | ||
| * Sets the current robot stats. This should be called in the robot's init method. | ||
| * If isReal is true both simulation and replay will be false, otherwise they will be set according to the replay type. | ||
| * We use this structure to avoid using static variables in the Robot class. | ||
| * | ||
| * @param isReal whether the robot is real or a simulation. This should be taken from the Robot class | ||
| * @param replayType the type of replay | ||
| */ | ||
| public static void setCurrentRobotStats(boolean isReal, ReplayType replayType) { | ||
| if (isReal || replayType.equals(ReplayType.NONE)) { | ||
| IS_SIMULATION = !isReal; | ||
| IS_REPLAY = false; | ||
| return; | ||
| } | ||
|
|
||
| IS_SIMULATION = replayType.equals(ReplayType.SIMULATION_REPLAY); | ||
| IS_REPLAY = true; | ||
| } | ||
|
|
||
| /** | ||
| * Sets how frequently the simulation is updated. | ||
| * | ||
| * @param periodicTimeSeconds the periodic time in seconds | ||
| */ | ||
| public static void setPeriodicTimeSeconds(double periodicTimeSeconds) { | ||
| PERIODIC_TIME_SECONDS = periodicTimeSeconds; | ||
| } | ||
|
|
||
| /** | ||
| * @return the periodic time in seconds set in {@link #setPeriodicTimeSeconds(double)} | ||
| */ | ||
| public static double getPeriodicTimeSeconds() { | ||
| return PERIODIC_TIME_SECONDS; | ||
| } | ||
|
|
||
| /** | ||
| * @return whether the robot is in replay mode or not | ||
| */ | ||
| public static boolean isReplay() { | ||
| return IS_REPLAY; | ||
| } | ||
|
|
||
| /** | ||
| * @return whether the robot is running in simulation or not | ||
| */ | ||
| public static boolean isSimulation() { | ||
Nummun14 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return IS_SIMULATION; | ||
| } | ||
|
|
||
| /** | ||
| * An enum that represents the type of replay. | ||
| */ | ||
Nummun14 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public enum ReplayType { | ||
| /** | ||
| * The robot is not in replay mode | ||
| */ | ||
| NONE, | ||
| /** | ||
| * The robot is in simulation replay mode | ||
| */ | ||
| SIMULATION_REPLAY, | ||
| /** | ||
| * The robot is in real replay mode | ||
| */ | ||
| REAL_REPLAY | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.