Skip to content

Commit

Permalink
update config and fix line break issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Situs84 committed Mar 15, 2024
1 parent 234ca73 commit b8dea11
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/4096/2024/2-29-2024.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../schema.json",
"$schema": "../../schema.json",
"title": "4096 Scout",
"page_title": "Crescendo",
"sections": [
Expand Down
180 changes: 180 additions & 0 deletions config/4096/2024/3-14-2024.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"$schema": "../../schema.json",
"title": "4096 Scout",
"page_title": "Crescendo",
"sections": [
{
"name": "Prematch",
"fields": [
{
"title": "Scouter Name",
"type": "text",
"required": true,
"code": "scouter"
},
{
"title": "Match Number",
"type": "number",
"required": true,
"code": "matchNumber"
},
{
"title": "Driver Station",
"type": "select",
"required": true,
"code": "robot",
"choices": {
"R1": "Red 1",
"R2": "Red 2",
"R3": "Red 3",
"B1": "Blue 1",
"B2": "Blue 2",
"B3": "Blue 3"
},
"defaultValue": "R1"
},
{
"title": "Team Number",
"type": "number",
"required": true,
"code": "teamNumber"
},
{
"title": "Starting Location",
"type": "select",
"required": true,
"code": "Starting Location",
"choices": {
"1": "By Amp (Amp Side)",
"2": "Aligned with Speaker (Middle)",
"3": "Center of Field (Opposite Amp Side)",
"0": "SELECT"
},
"defaultValue": "0"
}
]
},
{
"name": "Autonomous",
"fields": [
{
"title": "Mobility?",
"type": "boolean",
"defaultValue": false,
"required": false,
"code": "Mved"
},
{
"code": "auamp",
"title": "Amp Scored",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "auampm",
"title": "Amp Missed",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "ausc",
"title": "Speaker Scored",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "auskpm",
"title": "Speaker Missed",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
}
]
},
{
"name": "Teleop",
"fields": [
{
"code": "tamps",
"title": "Amp Scored",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "tampm",
"title": "Amp Missed",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "tsc",
"title": "Speaker Scored",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"code": "tsm",
"title": "Speaker Missed",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
}
]
},
{
"name": "Endgame",
"fields": [
{
"title": "End Position",
"type": "select",
"required": true,
"code": "epo",
"choices": {
"0": "No Climb",
"1": "Parked",
"2": "Onstage"
},
"defaultValue": "0"
},
{
"code": "cn",
"title": "Notes in Trap",
"type": "counter",
"defaultValue": 0,
"min": 0,
"required": false
},
{
"title": "Harmony?",
"type": "boolean",
"defaultValue": false,
"required": false,
"code": "Mved"
},
{
"code": "co",
"title": "Additional Observations",
"type": "text",
"min": 0,
"max": 50,
"defaultValue": "",
"required": false
}
]
}
]
}
2 changes: 1 addition & 1 deletion src/components/QRModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function QRModal(props: QRModalProps) {
<dialog id="DataModal" class="modal">
<div class="modal-box bg-white w-fit flex flex-col items-center text-base-300">
<h1 className="text-4xl">{props.title.toUpperCase()}</h1>
<QRCode className="m-2 my-4" size={256} value={props.data} />
<QRCode className="m-2 my-4" size={256} value={props.data + (props.data.slice(-2) != '\n' && '\n')} />
<div className="flex w-full flex-row items-center justify-center gap-4">
<div class="btn"
onClick={() =>
Expand Down
2 changes: 1 addition & 1 deletion src/store/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { produce } from 'immer';
import { ChangeEvent } from 'react';
import configJson from '../../config/4096/2024/2-29-2024.json';
import configJson from '../../config/4096/2024/3-14-2024.json';
import { Config } from '../inputs/BaseInputProps';
import { createStore } from './createStore';

Expand Down

0 comments on commit b8dea11

Please sign in to comment.