Skip to content

Commit 2605334

Browse files
authored
Add additional increment/decrement counter buttons and other fixes (#136)
* Add additional increment/decrement buttons to the counter * Add altInc1 & altInc2 property to scoring configurations * Disable double-click zoom when clicking buttons * Update docs with new features * Update README for 2026 changes * Fix typos in TBAInterface.js comments * Change typo - Level 2 to Level 3 in radio choices
1 parent 6360c49 commit 2605334

7 files changed

Lines changed: 161 additions & 64 deletions

File tree

2026/rebuilt_config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,15 @@ var config_data = `
7878
{ "name": "Fuel Scored",
7979
"code": "afs",
8080
"expectedMax": 32,
81+
"altInc1": 10,
82+
"altInc2": 5,
8183
"type": "counter"
8284
},
8385
{ "name": "Pass from Neutral Zone",
8486
"code": "apn",
8587
"expectedMax": 60,
88+
"altInc1": 10,
89+
"altInc2": 5,
8690
"type": "counter"
8791
},
8892
{ "name": "Climb (L1)",
@@ -121,16 +125,22 @@ var config_data = `
121125
{ "name": "Fuel Scored",
122126
"code": "tfs",
123127
"expectedMax": 150,
128+
"altInc1": 10,
129+
"altInc2": 5,
124130
"type": "counter"
125131
},
126132
{ "name": "Pass from Neutral Zone",
127133
"code": "pnz",
128134
"expectedMax": 250,
135+
"altInc1": 10,
136+
"altInc2": 5,
129137
"type": "counter"
130138
},
131139
{ "name": "Pass from Opp<br>Alliance Zone",
132140
"code": "poa",
133141
"expectedMax": 250,
142+
"altInc1": 10,
143+
"altInc2": 5,
134144
"type": "counter"
135145
},
136146
{ "name": "Pickup from Depot",
@@ -153,7 +163,7 @@ var config_data = `
153163
"choices": {
154164
"1": "Level 1<br>",
155165
"2": "Level 2<br>",
156-
"3": "Level 2<br>",
166+
"3": "Level 3<br>",
157167
"a": "Attempted<br>",
158168
"x": "Not Attempted"
159169
},

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Scouting P.A.S.S.
44

5-
#### A scouting system for FIRST FRC competitions developed by [PWNAGE - Team #2451](https://pwnagerobotics.org).
5+
#### A scouting system for FIRST FRC competitions developed by [PWNAGE - Team #2451](https://pwnagerobotics.org)
66

77
<a href="https://PWNAGERobotics.github.io/ScoutingPASS">Live Demo</a> . <a href="https://PWNAGERobotics.github.io/ScoutingPASS/pit.html">Pit Scouting</a> . <a href="#getting-started">Getting Started</a> . <a href="#faq">FAQ</a>
88

@@ -77,7 +77,7 @@ User defined fields can be of several different types:
7777
* Cycle Timer - Start the timer and with 1 click track cycle times of robots.
7878
* Field Image - Using an image of the field, select positions on the field. (Use to record starting point or shooting locations)
7979

80-
These should cover most of your scouting team's data collection needs. PWNAGE's 2020 Infinite Recharge configuration file is included as an example. The import of the configuration file is in index.html and would need to be updated to import a different configuration file. Only import one configuration file.
80+
These should cover most of your scouting team's data collection needs. The REBUIT (2026) configuration file is included as an example. The import of the configuration file is in index.html and would need to be updated to import a different configuration file. Only import one configuration file.
8181

8282
Since this is an HTML/JavaScript web page, scouters can use almost any device that has a web browser. If the device has a touchscreen the screen can be used to swipe back and forth between pages and interact with the data elements. The webpage only needs to be loaded once. Once loaded the functionality and data is stored locally in the webpage and doesn't need to be reloaded. The QR code generation and clear button only resets the form and does not cause the page to reload. This means that a cellular or WiFi connection is not needed at the competition as long as the webpage is loaded before the event.
8383

@@ -108,7 +108,7 @@ Note: For this to work, the schedule has to be posted to The Blue Alliance. Tha
108108

109109
## Pit Scouting:
110110

111-
ScountingPASS now supports Pit Scouting
111+
ScoutingPASS now supports Pit Scouting
112112

113113
To access the pit scouting page, add '/pit.html' to the end of your URL. (i.e. http://pwnagerobotics.github.io/ScoutingPASS/pit.html)
114114

@@ -218,6 +218,7 @@ Distributed under the GNU GPL v3.0 License. See `LICENSE` for more information.
218218
<summary>2026 Season Updates</summary>
219219
<ul>
220220
<li>New configurations added for match and pit scouting as well as the new field image</li>
221+
<li>Add alternate increment/decrement configurations for the counter element</li>
221222
</ul>
222223
</details>
223224

docs/Configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,19 @@ Special sub-elements of text are "match" and "team". These sub-types will updat
207207
"code": "mc",
208208
"type": "counter",
209209
"defaultValue": 0,
210+
"altInc1": 10,
211+
"altInc2": 5,
212+
"expectedMax": 99,
210213
"tooltip": "Put help or more descriptive text here"
211214
}
212215
```
213216
The counter is displayed with two buttons labeled "-" and "+" to increase or decrease the counter number.
214217

215218
Specific attributes of counter are:
216219
* defaultValue (optional) - set the field to start at a certain value
220+
* altInc1 (optional) - Add an additional button to increment/decrement the counter by the specified amount
221+
* altInc2 (optional) - Add a 2nd additional button to increment/decrement the counter by the specified amount
222+
* expectedMax (optional) - used by the data generation program to generate reasonable expected values
217223

218224
The counter element will be set back to the defaultValue value when the Clear Form button is pressed.
219225
If there is no defaultValue it will be reset to zero.
@@ -304,6 +310,7 @@ There are no specific attributes to this element.
304310
"showFlip": "false",
305311
"showUndo": "false",
306312
"shape": "circle 12 black red true",
313+
"expectedMax": 20,
307314
"cycleTimer": "tct"
308315
}
309316
```
@@ -326,6 +333,7 @@ Specific attributes of Cycle Timer are:
326333
* fillColor - color to fill in the shape (Default value: none)
327334
* fill - if true, fill in the shape with the fillColor, otherwise do not fill in the shape
328335
* Note: Use predefined [HTML color names](https://www.w3schools.com/colors/colors_names.asp) only
336+
* expectedMax (optional) - used by the data generation program to generate reasonable expected values
329337
* cycleTimer (optional) - tie clicks into a cycle timer to start new cycles every time the image is clicked.
330338

331339
The element field_image has been deprecated in favor of the new more flexible clickable_image. It is currently still supported but may be removed from future releases.

index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<form id="scoutingForm" onsubmit="return false" name="scoutingForm">
1818
<div id="main-panel-holder">
1919
<div id="prematch" class="main-panel" style="background-color: black;">
20-
<h1 id="prematchHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">N</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2026</h1>
20+
<h1 id="prematchHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">N</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
2121
<h2 id="prematchHeader2">pre-match</h2>
2222
<p class="match-label"><input type="button" value="Next" id="nextButton1" onclick="swipePage(1)"></p>
2323
<table id="prematch_table" style="font: Roboto">
@@ -27,7 +27,7 @@ <h2 id="prematchHeader2">pre-match</h2>
2727
</div>
2828

2929
<div id="auton" class="main-panel" style="background-color: rgb(123, 168, 184);">
30-
<h1 id="autonHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2026</h1>
30+
<h1 id="autonHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
3131
<h2 id="autonHeader2">Auton</h2>
3232
<p class="match-label"><input type="button" value="Prev" id="prevButton1" onclick="swipePage(-1)"><input type="button" value="Next" id="nextButton3" onclick="swipePage(1)"></p>
3333
<table id="auton_table">
@@ -37,7 +37,7 @@ <h2 id="autonHeader2">Auton</h2>
3737
</div>
3838

3939
<div id="teleop" class="main-panel" style="background-color: rgb(175, 207, 163);">
40-
<h1 id="teleopHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2026</h1>
40+
<h1 id="teleopHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
4141
<h2 id="teleopHeader2" >Teleop</h2>
4242
<p class="match-label"><input type="button" value="Prev" id="prevButton3" onclick="swipePage(-1)"><input type="button" value="Next" id="nextButton5" onclick="swipePage(1)"></p>
4343
<table id="teleop_table">
@@ -47,7 +47,7 @@ <h2 id="teleopHeader2" >Teleop</h2>
4747
</div>
4848

4949
<div id="endgame" class="main-panel" style="background-color: rgb(198, 186, 222);">
50-
<h1 id="endgameHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2026</h1>
50+
<h1 id="endgameHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
5151
<h2 id="endgameHeader2">Endgame</h2>
5252
<p class="match-label"><input type="button" value="Prev" id="prevButton5" onclick="swipePage(-1)"><input type="button" value="Next" id="nextButton7" onclick="swipePage(1)"></p>
5353
<table id="endgame_table">
@@ -57,7 +57,7 @@ <h2 id="endgameHeader2">Endgame</h2>
5757
</div>
5858

5959
<div id="post-match" class="main-panel" style="background-color: rgb(89, 134, 168);">
60-
<h1 id="postmatchHeader" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2026</h1>
60+
<h1 id="postmatchHeader" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
6161
<h2>Miscellaneous</h2>
6262
<p class="match-label"><input type="button" value="Prev" id="prevButton7" onclick="swipePage(-1)"><input type="button" value="Next" id="nextButton9" onclick="swipePage(1)"></p>
6363
<table id="postmatch_table">
@@ -106,3 +106,4 @@ <h2 id="qrHeader2">Generate QR Code</h2>
106106

107107

108108

109+

pit.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<form id="scoutingForm" onsubmit="return false">
1818
<div id="main-panel-holder">
1919
<div id="prematch" class="main-panel" style="background-color: black;">
20-
<h1 id="prematchHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">N</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2020</h1>
20+
<h1 id="prematchHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">N</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
2121
<h2 id="prematchHeader2">Pit Scouting</h2>
2222
<p class="match-label"><input type="button" value="Next" id="nextButton1" onclick="swipePage(1)"></p>
2323
<table id="prematch_table" style="font: Roboto">
@@ -27,7 +27,7 @@ <h2 id="prematchHeader2">Pit Scouting</h2>
2727
</div>
2828

2929
<div id="qr-code" class="main-panel" style="background-color: white;">
30-
<h1 id="qrHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting 2020</h1>
30+
<h1 id="qrHeader1" class="page_title"><span class="odd">P</span><span class="even">W</span><span class="odd">n</span><span class="even">A</span><span class="odd">G</span><span class="even">E</span><br>Scouting PASS</h1>
3131
<h2 id="qrHeader2">Generate QR Code</h2>
3232
<p class="match-label"><input type="button" value="Prev" id="prevButton9" onclick="swipePage(-1)"></p>
3333
<p id="qr-info"><span id="display_qr-info" style="border: none; text-align: center;"></span></p>
@@ -60,3 +60,4 @@ <h2 id="qrHeader2">Generate QR Code</h2>
6060
</form>
6161
</html>
6262

63+

resources/js/TBAInterface.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TBAInterface funcitons to pull data from TheBlueAlliance.com
1+
// TBAInterface functions to pull data from TheBlueAlliance.com
22
var teams = null;
33
var schedule = null;
44
var authKey = "uTHeEfPigDp9huQCpLNkWK7FBQIb01Qrzvt4MAjh9z2WQDkrsvNE77ch6bOPvPb6";
@@ -25,7 +25,7 @@ function getTeams(eventCode) {
2525
}
2626

2727
/**
28-
* Get schefule for event
28+
* Get schedule for event
2929
*
3030
* @param {eventCode} eventCode the event code (i.e. 2020caln) to pull the team list
3131
*/

0 commit comments

Comments
 (0)