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

2024 Season Updates #100

Merged
merged 12 commits into from
Jan 8, 2024
189 changes: 189 additions & 0 deletions 2024/crescendo_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
var config_data = `
{
"dataFormat": "tvs",
"title": "Scouting PASS 2024",
"page_title": "Crescendo",
"checkboxAs": "10",
"prematch": [
{ "name": "Scouter Initials",
"code": "s",
"type": "scouter",
"size": 5,
"maxSize": 5,
"required": "true"
},
{ "name": "Event",
"code": "e",
"type": "event",
"defaultValue": "2023tnkn",
"required": "true"
},
{ "name": "Match Level",
"code": "l",
"type": "level",
"choices": {
"qm": "Quals<br>",
"sf": "Semifinals<br>",
"f": "Finals"
},
"defaultValue": "qm",
"required": "true"
},
{ "name": "Match #",
"code": "m",
"type": "match",
"min": 1,
"max": 150,
"required": "true"
},
{ "name": "Robot",
"code": "r",
"type": "robot",
"choices": {
"r1": "Red-1",
"b1": "Blue-1<br>",
"r2": "Red-2",
"b2": "Blue-2<br>",
"r3": "Red-3",
"b3": "Blue-3"
},
"required":"true"
},
{ "name": "Team #",
"code": "t",
"type": "team",
"min": 1,
"max": 99999
},
{ "name": "Auto Start Position",
"code": "as",
"type": "clickable_image",
"filename": "2024/field_image.png",
"clickRestriction": "one",
"allowableResponses": "1 12 13 24 25 36 37 48 49 60 61 72",
"shape": "circle 5 black red true"
}
],
"auton": [
{ "name": "Leave Starting Zone",
"code": "al",
"type": "bool"
},
{ "name": "Amp Scores",
"code": "aas",
"type": "counter"
},
{ "name": "Speaker Scores",
"code": "ass",
"type": "counter"
}
],
"teleop": [
{ "name": "Amp Scores",
"code": "tas",
"type": "counter"
},
{ "name": "Speaker Scores",
"code": "tss",
"type": "counter"
},
{ "name": "Times Amplified",
"code": "tta",
"type": "counter"
},
{ "name": "Pickup From",
"code": "tpu",
"type": "radio",
"choices": {
"s": "Source<br>",
"f": "Floor<br>",
"b": "Both<br>",
"x": "Not Attempted"
},
"defaultValue": "x"
}
],
"endgame": [
{ "name": "Stage Timer",
"code": "dt",
"type": "timer"
},
{ "name": "Final Status",
"code": "fs",
"type":"radio",
"choices": {
"p": "Parked<br>",
"o": "Onstage<br>",
"s": "Onstage (Spotlit)<br>",
"h": "Harmony<br>",
"a": "Attempted but failed<br>",
"x": "Not attempted"
},
"defaultValue": "x"
},
{ "name": "Note in Trap",
"code": "nit",
"type": "bool"
}
],
"postmatch": [
{ "name": "Driver Skill",
"code": "ds",
"type": "radio",
"choices": {
"n": "Not Effective<br>",
"a": "Average<br>",
"v": "Very Effective<br>",
"x": "Not Observed"
},
"defaultValue": "x"
},
{ "name": "Defense Rating",
"code": "dr",
"type": "radio",
"choices": {
"b": "Below Average<br>",
"a": "Average<br>",
"g": "Good<br>",
"e": "Excellent<br>",
"x": "Did not play defense"
},
"defaultValue": "x"
},
{ "name": "Speed Rating",
"code": "sr",
"type": "radio",
"choices": {
"1": "1 (slow)<br>",
"2": "2<br>",
"3": "3<br>",
"4": "4<br>",
"5": "5 (fast)"
},
"defaultValue":"3"
},
{ "name": "Died/Immobilized",
"code": "die",
"type": "bool"
},
{ "name": "Tippy<br>(almost tipped over)",
"code": "tip",
"type": "bool"
},
{ "name": "Dropped Notes (>2)",
"code": "dn",
"type": "bool"
},
{ "name": "Make good<br>alliance partner?",
"tooltip": "Would you want this robot on your alliance in eliminations?",
"code": "all",
"type": "bool"
},
{ "name": "Comments",
"code": "co",
"type": "text",
"size": 15,
"maxSize": 55
}
]
}`;
98 changes: 98 additions & 0 deletions 2024/crescendo_pit_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
var config_data = `
{
"title": "Scouting PASS 2024",
"page_title": "Crescendo",
"pitConfig": "true",
"prematch": [
{ "name": "Team Number",
"code": "t",
"type": "number"
},
{ "name": "Width",
"code": "wid",
"type": "number",
"defaultValue": "0"
},
{ "name": "Weight",
"code": "wei",
"type": "number",
"defaultValue": "0"
},
{ "name": "Drivetrain",
"code": "drv",
"type": "radio",
"choices": {
"s": "Swerve<br>",
"w": "West Coast/Tank<br>",
"b": "Butterfly/Grashopper<br>",
"m": "Mechanum<br>",
"o": "Other"
},
"defaultValue": "o"
},
{ "name": "Other Drivetrain",
"code": "odt",
"type": "text",
"size": 20,
"maxSize": 50
},
{ "name": "Swerve Ratio",
"code": "sr",
"type": "radio",
"choices": {
"1": "L1 (8.14:1)<br>",
"2": "L2 (6.75:1)<br>",
"3": "L3 (6.12:1)<br>",
"4": "L4 (5.14:1)<br>",
"o": "Other ratio (put in comments)<br>",
"x": "Not Swerve"
},
"defaultValue":"x"
},
{ "name": "Drivetrain Motor",
"code": "mot",
"type": "radio",
"choices": {
"n": "Neo<br>",
"f": "Falcon<br>",
"c": "CIM<br>",
"x": "Other<br>"
},
"defaultValue":"x"
},
{ "name": "# of Batteries",
"code": "nob",
"type": "number"
},
{ "name": "Floor pickup Notes",
"code": "fpu",
"type": "bool"
},
{ "name": "Autos",
"code": "aut",
"type": "text",
"size": 20,
"maxSize": 250
},
{ "name": "Scouting Method /<br>Program (ScoutingPASS?)",
"code": "sct",
"type": "text",
"size": 20,
"maxSize": 250
},
{ "name": "Comments",
"code": "co",
"type": "text",
"size": 20,
"maxSize": 250
}
],
"auton": [
],
"teleop": [
],
"endgame": [
],
"postmatch": [
]
}`;
Binary file added 2024/field_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src="resources/js/TBAInterface.js"></script>
<script src="resources/js/googleSheets.js"></script>
<script src="resources/js/scoutingPASS.js"></script>
<script src="2023/CU_config.js"></script>
<script src="2024/crescendo_config.js"></script>
<link rel="stylesheet" href="resources/css/scoutingPASS.css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion pit.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src="resources/js/TBAInterface.js"></script>
<script src="resources/js/googleSheets.js"></script>
<script src="resources/js/scoutingPASS.js"></script>
<script src="2023/CU_Pit_config.js"></script>
<script src="2024/crescendo_pit_config.js"></script>
<link rel="stylesheet" href="resources/css/scoutingPASS.css">
</head>

Expand Down
8 changes: 4 additions & 4 deletions resources/js/scoutingPASS.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,15 +1093,15 @@ function onFieldClick(event) {
let box = ((Math.ceil(event.offsetY / target.height * resY) - 1) * resX) + Math.ceil(event.offsetX / target.width * resX);
let coords = event.offsetX + "," + event.offsetY;

let allowableResponses = document.getElementById("allowableResponses" + base).value.split(',').map(Number);
let allowableResponses = document.getElementById("allowableResponses" + base).value;

if(allowableResponses != "none"){
if (allowableResponses.indexOf(box)==-1){
allowableResponsesList = allowableResponses.split(',').map(Number);
if (allowableResponsesList.indexOf(box)==-1){
return;
}
}


//Cumulating values
let changingXY = document.getElementById("XY" + base);
let changingInput = document.getElementById("input" + base);
Expand Down