Skip to content

Commit

Permalink
Update Configuration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fuddster authored Feb 24, 2024
1 parent 1211d40 commit d4aa1ff
Showing 1 changed file with 20 additions and 27 deletions.
47 changes: 20 additions & 27 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

## Overview

A JSON configuration file controls the elements of the game to track. Create a new configuration file each year for the new game, or tweak it week to week to refine your scouting. No additional coding needed.
A JSON configuration file controls the elements of the game to track. Create a new configuration file each year for the new game, or tweak it week to week to refine your scouting. No additional coding is needed.

Example configurations are located in the <YEAR> directories. For examples, there are configurations for 2021, 2022, and 2023.
Example configurations are located in the <YEAR> directories. For example, there are configurations for 2021, 2022, and 2023.

Technically, this is a javascript file which contains a variable that is a JSON string. For all practical purposes you can ignore the javascript part and treat this as a JSON file.
Technically, this is a javascript file that contains a variable that is a JSON string. For all practical purposes, you can ignore the javascript part and treat this as a JSON file.

The main section of the JSON contains the global attributes and the 5 sections of the game. (FIVE SECTIONS?!? - We consider pre-match and post-match as parts of the game to facilitate the collection of scouting data.)

Expand All @@ -42,7 +42,6 @@ There are only a few global attributes to set up the application:
"title": "Scouting PASS 2023",
"page_title": "Charged Up",
"checkboxAs": "10",
"enable_google_sheets": "true",
<FIVE GAME SECTIONS>
}
```
Expand All @@ -54,7 +53,7 @@ Two data formats are currently supported:<br>
This is the title that will show up in the tab of the window.

### page-title
This will set the title at the top of the each web pages.
This will set the title at the top of each web page.

### checkboxAs
This configuration dictates how checkboxes data will be reported. Default setting is "Y/N".
Expand All @@ -64,11 +63,6 @@ Acceptable values:<br>
"10" - If checked the output of the element will contain a "1". If not checked it will contain a "0".<br>
"TF" - If checked the output of the element will contain a "T". If not checked it will contain a "F".<br>

### google-sheets-enable
To enable the Google Sheets interface, set this field to "true". Default is "false".

If you enable Google Sheets you'll want to also specify "gsCol" attributes on all the fields to allow more descriptive names of the columns in Google Sheets. See the [GoogleSheets.md](GoogleSheets Docs) for more info.

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="game-sections"></div>

Expand All @@ -82,7 +76,7 @@ There are 5 game sections:
* Endgame
* Post-Match

Each sections is defined the same way. Fields are added to each sections to collect data related to that part of the game.
Each section is defined the same way. Fields are added to each section to collect data related to that part of the game.

Each section maps to a separate page on the scouting screen and they progress in the order they are listed above.

Expand Down Expand Up @@ -122,7 +116,7 @@ The JSON is formatted like this:

Pre-Match is where the match details are set up. This is data that can be collected before the match starts.

It includes many key fields, including Team Number, Match Number, Robot Position and Scouter.
It includes many key fields, including Team Number, Match Number, Robot Position, and Scouter.

### Autonomous

Expand Down Expand Up @@ -152,8 +146,7 @@ There are some attributes common to ALL elements:
* name - The text that is displayed on the left side of the screen for the element
* code - The code used to identify this element in the QR code encoding
* type - What type of element this is: text, number, counter, etc...
* tooltip (optional) - text intended to help clarify the meaning or use of the element. It will appear when the mouse is hovered over the "name".
* gsCol (optional) - If you're using Google Sheets, this is the column name in your Google Sheet spreadsheet for this element. (Stay away from spaces or symbols as they have not been fully tested yet)
* tooltip (optional) - text intended to help clarify the meaning or use of the element. It will appear when the mouse hovers over the "name".

The field elements are:

Expand All @@ -171,10 +164,10 @@ The field elements are:
"tooltip": "Put help or more descriptive text here"
}
```
Specific attributes to text are:
Specific attributes of text are:
* size (optional) - the number of characters displayed (default is usually 20)
* maxSize (optional) - the maximum number of characters allowed in this field (default = 524288)
* disabled (optional) - if "true", input to this field will be disabled. It will be read only. (default = false)
* disabled (optional) - if "true", input to this field will be disabled. It will be read-only. (default = false)
* defaultValue (optional) - set the field to start at a certain value

The text element will be set back to the defaultValue value when the Clear Form button is pressed.
Expand All @@ -196,10 +189,10 @@ However, they are required to move past Pre-Match as they are key elements to tr
"tooltip": "Put help or more descriptive text here"
},
```
Specific attributes to number are:
Specific attributes of number are:
* min (optional) - the lowest number allowed in this field
* max (optional) - the largest number allowed in this field
* disabled (optional) - if "true", input to this field will be disabled. It will be read only. (default = false)
* disabled (optional) - if "true", input to this field will be disabled. It will be read-only. (default = false)
* defaultValue (optional) - set the field to start at a certain value

The number element will be set back to the defaultValue value when the Clear Form button is pressed.
Expand All @@ -219,7 +212,7 @@ Special sub-elements of text are "match" and "team". These sub-types will updat
```
The counter is displayed with two buttons labeled "-" and "+" to increase or decrease the counter number.

Specific attributes to counter are:
Specific attributes of counter are:
* defaultValue (optional) - set the field to start at a certain value

The counter element will be set back to the defaultValue value when the Clear Form button is pressed.
Expand Down Expand Up @@ -253,7 +246,7 @@ The Radio Button element will be set back to the defaultValue value when the Cle

Special sub-elements of the radio button element are "level" and "robot". When updating the robot and level element it will update the team number field and team nickname text if the TBA interface has been enabled. These two fields are required to move past Pre-Match as they are key elements to track scouting data.

### Checkbox - A single on/off or yes/no check box
### Checkbox - A single on/off or yes/no checkbox

```
{ "name": "My Checkbox",
Expand All @@ -279,7 +272,7 @@ You can also use type = "bool" which adds "(checked = Yes)" to the name.
}
```

This element allows timing events. The timer can be started, stopped and reset. Reset will stop the timer and reset the timer to zero. Note - The start button turns into the stop button when the timer is pressed.
This element allows timing events. The timer can be started, stopped, and reset. Reset will stop the timer and reset the timer to zero. Note - The start button turns into the stop button when the timer is pressed.

There are no specific attributes to this element.

Expand All @@ -294,7 +287,7 @@ The sub-type of timer, cycle timer, will be described in the next section.
}
```

The Cycle Timer element is a specialized Timer element. It tracks cycles during the match. When you start the timer, you have several options. You can stop and reset the timer, like the Timer element. In addition, you can click the "New Cycle" button and the current time will be stored in the text box above the timer and the timer is reset to zero and continues running. You can do this as many times as you'd like. If a cycle has been recorded mistakenly, there is an "Undo" button to remove the last cycle time. You can undo as many times as you want until there are no cycle times left to remove.
The Cycle Timer element is a specialized Timer element. It tracks cycles during the match. When you start the timer, you have several options. You can stop and reset the timer, like the Timer element. In addition, you can click the "New Cycle" button and the current time will be stored in the text box above the timer and the timer is reset to zero and continue running. You can do this as many times as you'd like. If a cycle has been recorded mistakenly, there is an "Undo" button to remove the last cycle time. You can undo as many times as you want until there are no cycle times left to remove.

There are no specific attributes to this element.

Expand All @@ -314,11 +307,11 @@ There are no specific attributes to this element.
"cycleTimer": "tct"
}
```
The clickable_image element allows collection of data through images. The first use case was to record a robots starting position on the field. It is also used to record shooting locations of robots. The way it works is the image is turned into a grid of boxes. Each box is numbered. When the image is clicked, the box number corresponding to the X/Y coordinates is recorded. Through the attributes of the element, you can record one or many different clicks/boxes. The number of boxes is configurable as well as the behavior of each click. You have the option of showing a "Flip" button which will flip the image 180 degrees, which is helpful if your scouters are sitting on the opposite side of the field and they see the field from the opposite direction. There is also an "Undo" button which allows scouters to remove the last recorded box from the element. There are also configuration settings for shape, size, color and fill of the shape to mark your click. Finally, this element can be tied into a cycle timer. Every click will start a new cycle. So, if you have an image of a scoring location, you just need to click the image and the program will not only record the scoring location, but the cycle time as well.
The clickable_image element allows the collection of data through images. The first use case was to record a robot's starting position on the field. It is also used to record the shooting locations of robots. The way it works is the image is turned into a grid of boxes. Each box is numbered. When the image is clicked, the box number corresponding to the X/Y coordinates is recorded. Through the attributes of the element, you can record one or many different clicks/boxes. The number of boxes is configurable as well as the behavior of each click. You have the option of showing a "Flip" button which will flip the image 180 degrees, which is helpful if your scouters are sitting on the opposite side of the field and they see the field from the opposite direction. There is also an "Undo" button which allows scouters to remove the last recorded box from the element. There are also configuration settings for shape, size, color, and fill of the shape to mark your click. Finally, this element can be tied into a cycle timer. Every click will start a new cycle. So, if you have an image of a scoring location, you just need to click the image and the program will not only record the scoring location, but the cycle time as well.

Specific attributes to Cycle Timer are:
* filename - the location of the file image that you want to use. It must be local to the web site you are using.
* dimensions (optional) - this controls the number of boxes the image will be divided into. The first value is the number boxes along the x-axis and the second number is the number of boxes along the y-axis. (Default values are "12 6" for 72 boxes)
Specific attributes of Cycle Timer are:
* filename - the location of the file image that you want to use. It must be local to the website you are using.
* dimensions (optional) - this controls the number of boxes the image will be divided into. The first value is the number of boxes along the x-axis and the second number is the number of boxes along the y-axis. (Default values are "12 6" for 72 boxes)
* toggleClick (optional)- if set to "true", if a box has already been clicked, clicking it again will "unclick" that box. It will no longer be stored and reported. (Default value: false)
* clickRestrictions (optional) - this dictates how many clicks are allowed for this element.<br>Acceptable values are:<br>
* none (default) - clicks are unrestricted
Expand All @@ -335,6 +328,6 @@ Specific attributes to Cycle Timer are:
* Note: Use predefined [HTML color names](https://www.w3schools.com/colors/colors_names.asp) only
* cycleTimer (optional) - tie clicks into a cycle timer to start new cycles every time the image is clicked.

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.
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.

<p align="right">(<a href="#top">back to top</a>)</p>

0 comments on commit d4aa1ff

Please sign in to comment.