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

Reef Align AutoScore #14

Open
wants to merge 167 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
2204eec
Create README.md
EdzmLeGoat Jan 7, 2025
b568235
Add files via upload
EdzmLeGoat Jan 7, 2025
81edc8e
added processor images
s-zhdanova Jan 7, 2025
1555d92
new processor animation
s-zhdanova Jan 8, 2025
8d9d41b
file organization, page layout change, and other stuff
EdzmLeGoat Jan 8, 2025
bf1e290
fixes added net did stuff
EdzmLeGoat Jan 9, 2025
ca77c16
included coral intake, bettered css, file organization
EdzmLeGoat Jan 9, 2025
7ec4cc9
working on website some more, mostly done, about to start on comands
EdzmLeGoat Jan 10, 2025
ca1dbbd
working on website, about to start on commands
EdzmLeGoat Jan 10, 2025
caff9c5
workign on commands
EdzmLeGoat Jan 10, 2025
4db739c
creation of constants file
EdzmLeGoat Jan 10, 2025
130c3da
Added outlines for AutoScoreCommands functions
Acrenos Jan 10, 2025
743cde7
Added L and K in reefLocation values. Refactored reefLocation enum to…
Acrenos Jan 10, 2025
e6a5b01
made all autoscore commands, still need to get translation and rotati…
EdzmLeGoat Jan 11, 2025
5d42209
all reef translation 2ds and rotations added
EdzmLeGoat Jan 11, 2025
78c9d41
all autoscore commands are done
EdzmLeGoat Jan 11, 2025
6b19b25
fixed commands (errors bc of the way drivealliance was used)
s-zhdanova Jan 11, 2025
df86ba0
fix ktlint
s-zhdanova Jan 11, 2025
676e341
Changed moveToProcessorCommandBlue/Red
Acrenos Jan 12, 2025
2486ef2
-Added MagnetizePIDPoseAlign
Acrenos Jan 12, 2025
f23eae6
reverted autoscore commands back to the version that was not split, e…
EdzmLeGoat Jan 12, 2025
97bd875
added nt4, haven't published anything yet
s-zhdanova Jan 13, 2025
0077de0
ktlint
s-zhdanova Jan 13, 2025
beed8dd
add java files as script file
s-zhdanova Jan 13, 2025
32ea561
deleted all the backend jaunt, finalized webpage, connect connect usi…
EdzmLeGoat Jan 13, 2025
13678c7
fixed a random bug from residual backend code
EdzmLeGoat Jan 13, 2025
b3a3a79
erm
EdzmLeGoat Jan 13, 2025
239e934
got the nt4 class into the code
EdzmLeGoat Jan 14, 2025
89ef415
setting up communication with the robot
EdzmLeGoat Jan 14, 2025
f057606
put magnetize back in, put bindings in controllerbindings instead of …
s-zhdanova Jan 14, 2025
e95cd17
one of the commands was still on mech controller, fixed that
EdzmLeGoat Jan 14, 2025
d82b074
format ktlint, changed test bindings back to mechcontroller (bindings…
s-zhdanova Jan 14, 2025
53b4099
format ktlint, changed test bindings back to mechcontroller (bindings…
s-zhdanova Jan 14, 2025
1327455
made webpage smaller and better
EdzmLeGoat Jan 14, 2025
289ba21
Merge branch 'autoscore' of https://github.com/blair-robot-project/ro…
EdzmLeGoat Jan 14, 2025
91e738d
-Updated Magnetization Function
Acrenos Jan 16, 2025
be7cd97
Removed Unused Variables
Acrenos Jan 16, 2025
7a7f870
Removed Debug Print Statements
Acrenos Jan 16, 2025
097c903
Driver control over magnetization gets weaker as the robot gets close…
Acrenos Jan 16, 2025
44cad4e
Format MagnetizePIDPoseAlign
Acrenos Jan 16, 2025
c97fdee
da jaunt + aghh
EdzmLeGoat Jan 17, 2025
95a39e4
da jaunt gon jaunt soon
EdzmLeGoat Jan 17, 2025
9e5ed5b
networktables
s-zhdanova Jan 17, 2025
a5b39b3
fixed stuff, js nt isn't done yet
s-zhdanova Jan 17, 2025
6dc70ca
added getting last value of subscriber in js and other nt stuff still…
s-zhdanova Jan 17, 2025
9eaac8d
Merge branch 'main' into autoscore
theKnightedBird Jan 18, 2025
390a18b
webapp is connected
EdzmLeGoat Jan 18, 2025
676a3c9
Merge remote-tracking branch 'origin/autoscore' into autoscore
EdzmLeGoat Jan 18, 2025
f1a6b77
configured autobuilder
s-zhdanova Jan 20, 2025
1486e90
commented out unused bindings to fix error
s-zhdanova Jan 20, 2025
4180545
added elevator commands, fixed error
s-zhdanova Jan 21, 2025
64bfaeb
pathfinding commands in but don't work
s-zhdanova Jan 23, 2025
6c1fbaa
working on maple sim
EdzmLeGoat Jan 23, 2025
2b2c8f5
pathfinding still not working
s-zhdanova Jan 24, 2025
6b9cd57
translation2ds for modules were wrong
s-zhdanova Jan 24, 2025
3182ee5
a tiny change
EdzmLeGoat Jan 24, 2025
6fb510a
trying to fix pathfinding
s-zhdanova Jan 24, 2025
38b62e5
a
s-zhdanova Jan 24, 2025
7a61826
pathfind
s-zhdanova Jan 25, 2025
0d6da6e
moved bindings to controllerbindings
s-zhdanova Jan 25, 2025
0639032
a
s-zhdanova Jan 25, 2025
9c03f36
use pathplanner gui settings for robot config
jpothen8 Jan 26, 2025
f96df87
pathfinding works, put in map
s-zhdanova Jan 26, 2025
4b9f916
a tiny tiny tiny change that i made cuz i felt like it
EdzmLeGoat Jan 28, 2025
1b20ac5
pathfind + magnetize
s-zhdanova Jan 28, 2025
ac2418c
Pathfinding and Magnetize
Acrenos Jan 28, 2025
84d518a
Improved values for pathfinding and magnetize
Acrenos Jan 28, 2025
631b2bf
edited positions on webapp to match reefscape and tested positions
EdzmLeGoat Jan 30, 2025
36af32f
pathfinding halfway done
s-zhdanova Jan 30, 2025
14c635a
pathfind except it doesn't work
s-zhdanova Jan 30, 2025
74f5b09
cleaned up autoscore commands a bunch, worked on a new version of pa…
EdzmLeGoat Jan 31, 2025
0f30e77
more work on pathmag
EdzmLeGoat Jan 31, 2025
7720215
even more work on path mag
EdzmLeGoat Jan 31, 2025
016e1d5
path mag function in pose subsystem almost works
EdzmLeGoat Feb 1, 2025
487b759
work on webapp, more work on random path mag function separate from a…
EdzmLeGoat Feb 1, 2025
51a4da0
my path mag is almost doneeeeeee
EdzmLeGoat Feb 2, 2025
fd3164e
one more issue to fix and then my path mag will be done
EdzmLeGoat Feb 2, 2025
9a7f19d
almost done with path mag, just need to figure out why it doesn't pat…
EdzmLeGoat Feb 2, 2025
74eb20e
cancel command is fixed, path mag is done except for when it stops pa…
EdzmLeGoat Feb 2, 2025
52e24bd
updated robot loop webapp to match new pathmag changes
EdzmLeGoat Feb 2, 2025
2586be9
removed unnecessary logging
EdzmLeGoat Feb 2, 2025
182b241
played with constants to make it a much smoother experience for the d…
EdzmLeGoat Feb 3, 2025
fa22062
working on fixing ktlint
EdzmLeGoat Feb 3, 2025
617946f
ktlint actually opping
EdzmLeGoat Feb 3, 2025
d1a6b01
ktlint stuff
EdzmLeGoat Feb 3, 2025
cefc081
Revert "ktlint stuff"
EdzmLeGoat Feb 3, 2025
d6e8e65
Revert "ktlint actually opping"
EdzmLeGoat Feb 3, 2025
4e2ffe4
Revert "working on fixing ktlint"
EdzmLeGoat Feb 3, 2025
2ed9797
testing some more autoscore changes
EdzmLeGoat Feb 4, 2025
d809de7
Merge remote-tracking branch 'origin/main' into autoscore
EdzmLeGoat Feb 4, 2025
9283faf
jeffrey readded monologue cuz we dont have maple sim or smth
EdzmLeGoat Feb 5, 2025
44dea99
ok NOW we're all good, monologue is removed and now I can add in the …
EdzmLeGoat Feb 6, 2025
af6174f
pathmag except autobuilder decided it would be funny to break
EdzmLeGoat Feb 6, 2025
0cdcfd7
added back navgrid but now there's bad delay like before
EdzmLeGoat Feb 6, 2025
88964a6
fixed delay on pathmag
EdzmLeGoat Feb 6, 2025
ef1f1f2
ktlint is a bum and i changed pathmag to optimize driver input if sim…
EdzmLeGoat Feb 8, 2025
efa42fa
put pathfinding in autoscore branch, worked on combining speeds
s-zhdanova Feb 9, 2025
8a6635e
fixed some adstar things, tried ktlint
s-zhdanova Feb 9, 2025
0e35631
adstar
s-zhdanova Feb 10, 2025
497dd3c
capitalize >:(
s-zhdanova Feb 10, 2025
fb0012e
made a calc function in pid pose align
EdzmLeGoat Feb 10, 2025
3b3ec10
zoinks, scoob! calculate function in pidposealign and a sekwet file...!
EdzmLeGoat Feb 10, 2025
a01a1c9
refactored path mag to a better name as there are no longer two of th…
EdzmLeGoat Feb 10, 2025
fa4c157
made adstar less jank, worked on fixing resetting path
s-zhdanova Feb 12, 2025
fb7f126
new speed + set command for adstar
s-zhdanova Feb 13, 2025
17e5592
it works (kinda)
s-zhdanova Feb 13, 2025
3d349cf
it works?
s-zhdanova Feb 13, 2025
078bb47
never mind it does not work
s-zhdanova Feb 13, 2025
105437e
cooked :P
s-zhdanova Feb 14, 2025
8ec112d
not cooked? (changed a single line T-T)
s-zhdanova Feb 14, 2025
e7c4ce1
not cooked??
s-zhdanova Feb 14, 2025
73e81b4
added drive requirements, deleted weird set call
s-zhdanova Feb 15, 2025
b0d5026
rotation issue fixed
s-zhdanova Feb 15, 2025
8ea5c27
more rotation problems
s-zhdanova Feb 15, 2025
89a4ca4
rotation pid added, doesn't work
s-zhdanova Feb 16, 2025
e7f8686
pid stuff
s-zhdanova Feb 16, 2025
26a3a78
more pid
s-zhdanova Feb 16, 2025
795da09
Merge remote-tracking branch 'origin/main' into autoscore
EdzmLeGoat Feb 17, 2025
761df34
main merge into autoscore
EdzmLeGoat Feb 17, 2025
b777c10
working on compact ui for autoscore as well as making size more scree…
EdzmLeGoat Feb 18, 2025
5e804b6
pid rotation, speeds robot rel for some reason
s-zhdanova Feb 18, 2025
74db332
field relative yay
s-zhdanova Feb 18, 2025
51f6e19
made more compact
EdzmLeGoat Feb 20, 2025
36cfeeb
adstar rot doesn't work lol
s-zhdanova Feb 20, 2025
cd4883b
design is pretty good rn
EdzmLeGoat Feb 20, 2025
ea93248
ui finish
EdzmLeGoat Feb 20, 2025
149c73f
more rot and my brain is rotting
s-zhdanova Feb 20, 2025
b15bc73
more rot and my brain is rotting
s-zhdanova Feb 20, 2025
4a7bb2e
mb
s-zhdanova Feb 20, 2025
6bd9895
working on making driver control smoother
EdzmLeGoat Feb 21, 2025
628cac1
super precise poses for autoscore now as well as more work on pathmag…
EdzmLeGoat Feb 22, 2025
7c60881
goated rotation fix, still some bugs
EdzmLeGoat Feb 22, 2025
6a6677b
Merge remote-tracking branch 'refs/remotes/origin/main' into autoscore
EdzmLeGoat Feb 22, 2025
c72a5c3
fixing merge from main, rotation works but currently working on fixin…
EdzmLeGoat Feb 22, 2025
094b079
Merge remote-tracking branch 'origin/ascompact' into autoscore
EdzmLeGoat Feb 22, 2025
be6015f
rotation problems fixed
s-zhdanova Feb 22, 2025
2e7b982
controller + pid rotation combination
s-zhdanova Feb 22, 2025
ccddf39
fix keep rotating
s-zhdanova Feb 22, 2025
5c07198
fixed consec button and other things, driver input cooked
EdzmLeGoat Feb 22, 2025
a9c942e
Merge remote-tracking branch 'origin/autoscore' into autoscore
EdzmLeGoat Feb 22, 2025
3dd2a67
rotation driver input
s-zhdanova Feb 23, 2025
2919915
keeps rotating if not at setpoint
s-zhdanova Feb 23, 2025
1b2cdc1
end with speed
s-zhdanova Feb 23, 2025
4b80607
added pid speed to trajectory speed
s-zhdanova Feb 23, 2025
69d61a2
fix angle correction
s-zhdanova Feb 23, 2025
03fda50
get rid of reef align, fix order of rotation
s-zhdanova Feb 23, 2025
3cc0c31
fixed consec button and other things, driver input cooked
EdzmLeGoat Feb 24, 2025
08a6e21
Merge remote-tracking branch 'origin/autoscore' into autoscore
EdzmLeGoat Feb 24, 2025
c55d1f6
fixed an issue, bind webapp and then we should be good to go
EdzmLeGoat Feb 24, 2025
fdb5132
Merge remote-tracking branch 'refs/remotes/origin/main' into autoscore
EdzmLeGoat Feb 24, 2025
a83045d
webcom connection, some bugs but overall almost done
EdzmLeGoat Feb 24, 2025
4b59f80
if i dont finish i'm washed
EdzmLeGoat Feb 25, 2025
8ca9127
washed coding
EdzmLeGoat Feb 25, 2025
6a502b7
not washed coding
EdzmLeGoat Feb 26, 2025
fa195a1
slide, staying around 0.06 on average :(
EdzmLeGoat Feb 26, 2025
e4219d2
works no rotation
EdzmLeGoat Feb 26, 2025
7d6ce7d
fixed rotation
EdzmLeGoat Feb 26, 2025
6c0ffec
rot fixed
EdzmLeGoat Feb 26, 2025
482141b
drive limits, improved feel, tested jaunt, improved poses, tried ktli…
EdzmLeGoat Feb 27, 2025
cff70ea
delete useless files and fix stuff
EdzmLeGoat Feb 27, 2025
226f22d
Revert "delete useless files and fix stuff"
EdzmLeGoat Feb 27, 2025
45320ba
redo commit mb i had one bad line
EdzmLeGoat Feb 27, 2025
9b741ed
characterization of sorts
EdzmLeGoat Feb 27, 2025
2147de2
rot jaunt and webcom changes
EdzmLeGoat Feb 27, 2025
25bcfb1
adjustment of command structure and speed combination. fixed a small …
EdzmLeGoat Mar 2, 2025
abdf468
changes at competition
EdzmLeGoat Mar 3, 2025
6386fa8
merge w/ main and stuff
EdzmLeGoat Mar 4, 2025
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
1 change: 1 addition & 0 deletions src/main/deploy/autoscore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# autoscore things
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/main/deploy/autoscore/coralIntake.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let coralIntakeClickable = true;

const coralIntakeTop = document.getElementById("coralIntakeTop");
const coralIntakeBottom = document.getElementById("coralIntakeBottom");

[coralIntakeTop, coralIntakeBottom].map(button => {
button.onclick = async () => {
if(coralIntakeClickable) {
coralIntakeClickable = false;
button.innerText = "Intaking...";
await intakeCoral(button.id == "coralIntakeTop");
button.innerText = `Intaking Coral ${button.id == "coralIntakeTop" ? " Top" : " Bottom"}`;
coralIntakeClickable = true;
}
}
})
77 changes: 77 additions & 0 deletions src/main/deploy/autoscore/coralLevel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const levelOne = document.getElementById("L1");
const levelTwo = document.getElementById("L2");
const levelThree = document.getElementById("L3");
const levelFour = document.getElementById("L4");

const levelList = [levelOne, levelTwo, levelThree, levelFour];

const coralText = document.getElementById("coralText");
const coralImage = document.getElementById("coral");
coralLevel = -1;
let prevCoralLevel = -1;

const setCoralImg = (level) => {
coralImage.src = `coralLevelImages/coral${level}.png`;
}

["mousemove", "touchmove"].forEach(_ => coralImage.addEventListener(_, (event) => {
//this is radius not actual width
const coralImgPos = coralImage.getBoundingClientRect();
const coralHeight = (coralImgPos.bottom-coralImgPos.top) / 2;
const coralY = coralImgPos.top + coralHeight;
let mouseY = event.clientY;
let ydiff = coralY - mouseY;
if(_ == "touchmove") {
mouseY = event.changedTouches[0].clientY;
ydiff = coralY - mouseY;
}
if(!coralSelected) {
if(ydiff > coralHeight * 0.4) {
setCoralImg("L4");
prevCoralLevel = 4;
} else if (ydiff > coralHeight * 0.1) {
setCoralImg("L3");
prevCoralLevel = 3;
} else if (ydiff > -coralHeight * 0.4) {
setCoralImg("L2");
prevCoralLevel = 2;
} else {
setCoralImg("L1");
prevCoralLevel = 1;
}
}
}));


["mouseleave", "touchend"].forEach(_ => coralImage.addEventListener(_, () => {
if(coralSelected) {
if(coralLevel == 1) {
setCoralImg("L1");
} else if (coralLevel == 2) {
setCoralImg("L2");
} else if (coralLevel == 3) {
setCoralImg("L3");
} else if (coralLevel == 4) {
setCoralImg("L4");
}
} else {
setCoralImg("None");
}
}));

coralImage.onclick = () => {
coralSelected = !coralSelected;
if(coralSelected) {
coralLevel = prevCoralLevel;
coralImage.src = `coralLevelImages/coralL${coralLevel}.png`;
coralText.innerText = `Coral Level: ${coralLevel}`;
if(areaSelected) {
confirmReefButton.innerText = `Score at Level ${coralLevel} and Area ${numberToLetter[11-(reefArea+4)%12]}`;
}
} else {
setCoralImg("None");
coralLevel = -1;
coralText.innerText = "Coral Level: None";
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions src/main/deploy/autoscore/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Robotics Stuff</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap" rel="stylesheet">
</head>

<body>
<div class="scoringContainer" style="display: none;">
<div class="reefContainer" style="display: none;">
<!-- <div class="levelContainer">
<div class="Level" id="L4">
Level 4 Score
</div>
<div class="Level" id="L3">
Level 3 Score
</div>
<div class="Level" id="L2">
Level 2 Score
</div>
<div class="Level" id="L1">
Level 1 Score
</div>
</div> -->
<div class="coralLevelImage">
<img src="coralLevelImages/coralNone.png" alt="" id="coral">
</div>
<div class="locationContainer">
<div class="locationImageContainer">
<img src="locationSelectorImages/locationSelectorNone.png" alt="" id="locationSelect">
</div>
<h1 id="areaSelectionText" width="100%">Click the area you want to go to.</h1>
</div>
<div class="confirmChoice">
<h1 class="reefText" id="coralText">Coral Level: None</h1>
<h1 class="reefText" id="areaText">Reef Area: None</h1>
<div class="Button" id="confirmReefButton">
Choose Robot Alignment
</div>
</div>
</div>
<div class="processorContainer" style="display: none;">
<div class="buttonContainer">
<div class="Button" id="processorScore">
Score Processor
</div>
</div>
</div>
<div class="netContainer" style="display: none;">
<div class="buttonContainer">
<div class="Button" id="netScoreRed">
Score Net on Red Side
</div>
<div class="Button" id="netScoreBlue">
Score Net on Blue Side
</div>
</div>
</div>
<div class="coralIntakeContainer" style="display: none;">
<div class="buttonContainer">
<div class="Button" id="coralIntakeTop">
Intake Coral Top
</div>
<div class="Button" id="coralIntakeBottom">
Intake Coral Bottom
</div>
</div>
</div>
<div class="manualContainer" style="display: none;">
<div>
<h1 id="manualText">
Scoring on Area _ and Level _
</h1>
</div>
<div>
<div class="Button" id="cancel">
Cancel Command
</div>
</div>
<div>
<div class="Button" id="score">
Score!
</div>
</div>
<div class="pivotContainer">
<div class="Button" id="pivotForward">
Move Pivot Forward
</div>
<div class="Button" id="pivotBack">
Move Pivot Backwards
</div>
</div>
<div class="elevatorContainer">
<div class="Button" id="elevatorUp">
Move Elevator Up
</div>
<div class="Button" id="elevatorDown">
Move Elevator Down
</div>
</div>
<div class="wristContainer">
<div class="Button" id="wristForward">
Move Wrist Forward
</div>
<div class="Button" id="wristBack">
Move Wrist Backwards
</div>
</div>
</div>
</div>
<div class="messageContainer" style="display: none;">
<h1 id="messageDisplay">NO ROBOT CONNECTION</h1>
</div>
<script src="ntsetup.js"></script>
<script src="robotCommunication.js"></script>
<script src="processor.js"></script>
<script src="net.js"></script>
<script src="reefPlacement.js"></script>
<script src="coralLevel.js"></script>
<script src="coralIntake.js"></script>

</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/main/deploy/autoscore/net.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const netButtonRed = document.getElementById("netScoreRed");
const netButtonBlue = document.getElementById("netScoreBlue");

let netClickable = true;
[netButtonRed, netButtonBlue].map(button => {
button.onclick = async () => {
if(netClickable) {
netClickable = false;
button.innerText = "Scoring...";
await scoreNet(button.id == "netScoreRed");
button.innerText = `Score Net ${button.id == "netScoreRed" ? " on Red Side" : " on Blue Side"}`;
netClickable = true;
}
}
})
Loading
Loading