Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion config/2026/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@
"formResetBehavior": "preserve",
"defaultValue": ""
},
{
"title": "Assigned Station",
"description": "The station assigned to the scout (e.g., R1, R2, R3, B1, B2, B3). Use this to automatically assign the team and robot position based on the match number and station.",
"type": "TBA-assigned-station",
"required": false,
"code": "assignedStation",
"formResetBehavior": "preserve"
},
{
"title": "Match Number",
"description": "Select the match number.",
Expand All @@ -90,7 +98,8 @@
"required": true,
"code": "robot",
"formResetBehavior": "preserve",
"defaultValue": null
"defaultValue": null,
"autoAssignFromFieldCode": "assignedStation"
},
{
"title": "Starting Position",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev": "vite",
"build": "tsc && vite build ",
"preview": "vite preview",
"schema": "ts-node src/scripts/generateJsonSchema.ts src/assets/schema.json && cp src/assets/schema.json public/schema.json"
"schema": "npx tsx src/scripts/generateJsonSchema.ts src/assets/schema.json && cp src/assets/schema.json public/schema.json"
},
"dependencies": {
"@headlessui/react": "^1.7.19",
Expand Down
114 changes: 111 additions & 3 deletions public/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"year": {
"type": "number",
"description": "The year this scouting config is relevant for."
"description": "The year this scouting config is relevant for. Defaults to the current year if not provided."
},
"delimiter": {
"type": "string",
Expand Down Expand Up @@ -294,6 +294,45 @@
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"title": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/title"
},
"description": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/description"
},
"type": {
"type": "string",
"const": "multi-counter"
},
"required": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/required"
},
"code": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/code"
},
"disabled": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/disabled"
},
"formResetBehavior": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/formResetBehavior"
},
"defaultValue": {
"type": "number",
"default": 0,
"description": "The default value"
}
},
"required": [
"title",
"type",
"required",
"code"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
Expand Down Expand Up @@ -741,6 +780,10 @@
"timerDuration": {
"type": "number",
"description": "Expected duration in seconds (for UI reference, e.g., 15 for auto, 135 for teleop)"
},
"autoStopSeconds": {
"type": "number",
"description": "Automatically stop the timer after this many seconds. Useful to prevent the timer from running past the match phase duration."
}
},
"required": [
Expand Down Expand Up @@ -786,7 +829,16 @@
"type": "number"
},
"robotPosition": {
"type": "string"
"type": "string",
"enum": [
"R1",
"R2",
"R3",
"B1",
"B2",
"B3"
],
"description": "The robot position in the alliance. R = Red alliance, B = Blue alliance, 1/2/3 = position on the alliance."
}
},
"required": [
Expand All @@ -801,6 +853,10 @@
],
"default": null,
"description": "The default team and robot position"
},
"autoAssignFromFieldCode": {
"type": "string",
"description": "Optional code of another field to auto-assign"
}
},
"required": [
Expand Down Expand Up @@ -857,6 +913,59 @@
"code"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"title": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/title"
},
"description": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/description"
},
"type": {
"type": "string",
"const": "TBA-assigned-station"
},
"required": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/required"
},
"code": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/code"
},
"disabled": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/disabled"
},
"formResetBehavior": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/formResetBehavior"
},
"defaultValue": {
"type": "string",
"default": "",
"description": "If assigning by driver station, the driver station to use for selecting team and robot position across matches"
},
"choices": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"default": {
"R1": "Red 1",
"R2": "Red 2",
"R3": "Red 3",
"B1": "Blue 1",
"B2": "Blue 2",
"B3": "Blue 3"
}
}
},
"required": [
"title",
"type",
"required",
"code"
],
"additionalProperties": false
}
]
}
Expand All @@ -876,7 +985,6 @@
"required": [
"title",
"page_title",
"year",
"delimiter",
"teamNumber",
"sections"
Expand Down
114 changes: 111 additions & 3 deletions src/assets/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"year": {
"type": "number",
"description": "The year this scouting config is relevant for."
"description": "The year this scouting config is relevant for. Defaults to the current year if not provided."
},
"delimiter": {
"type": "string",
Expand Down Expand Up @@ -294,6 +294,45 @@
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"title": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/title"
},
"description": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/description"
},
"type": {
"type": "string",
"const": "multi-counter"
},
"required": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/required"
},
"code": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/code"
},
"disabled": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/disabled"
},
"formResetBehavior": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/formResetBehavior"
},
"defaultValue": {
"type": "number",
"default": 0,
"description": "The default value"
}
},
"required": [
"title",
"type",
"required",
"code"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
Expand Down Expand Up @@ -741,6 +780,10 @@
"timerDuration": {
"type": "number",
"description": "Expected duration in seconds (for UI reference, e.g., 15 for auto, 135 for teleop)"
},
"autoStopSeconds": {
"type": "number",
"description": "Automatically stop the timer after this many seconds. Useful to prevent the timer from running past the match phase duration."
}
},
"required": [
Expand Down Expand Up @@ -786,7 +829,16 @@
"type": "number"
},
"robotPosition": {
"type": "string"
"type": "string",
"enum": [
"R1",
"R2",
"R3",
"B1",
"B2",
"B3"
],
"description": "The robot position in the alliance. R = Red alliance, B = Blue alliance, 1/2/3 = position on the alliance."
}
},
"required": [
Expand All @@ -801,6 +853,10 @@
],
"default": null,
"description": "The default team and robot position"
},
"autoAssignFromFieldCode": {
"type": "string",
"description": "Optional code of another field to auto-assign"
}
},
"required": [
Expand Down Expand Up @@ -857,6 +913,59 @@
"code"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"title": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/title"
},
"description": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/description"
},
"type": {
"type": "string",
"const": "TBA-assigned-station"
},
"required": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/required"
},
"code": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/code"
},
"disabled": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/disabled"
},
"formResetBehavior": {
"$ref": "#/properties/sections/items/properties/fields/items/anyOf/0/properties/formResetBehavior"
},
"defaultValue": {
"type": "string",
"default": "",
"description": "If assigning by driver station, the driver station to use for selecting team and robot position across matches"
},
"choices": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"default": {
"R1": "Red 1",
"R2": "Red 2",
"R3": "Red 3",
"B1": "Blue 1",
"B2": "Blue 2",
"B3": "Blue 3"
}
}
},
"required": [
"title",
"type",
"required",
"code"
],
"additionalProperties": false
}
]
}
Expand All @@ -876,7 +985,6 @@
"required": [
"title",
"page_title",
"year",
"delimiter",
"teamNumber",
"sections"
Expand Down
Loading
Loading