diff --git a/app/common/track/seq/PMVALoadShootSeqPage.tsx b/app/common/track/seq/PMVALoadShootSeqPage.tsx new file mode 100644 index 00000000..a36ad575 --- /dev/null +++ b/app/common/track/seq/PMVALoadShootSeqPage.tsx @@ -0,0 +1,93 @@ +import type {TrackScreenProps} from "~/routes/track/track-home-page.tsx"; +import TrackNav from "~/common/track/TrackNav.tsx"; +import {useState} from "react"; + +const PMVALoadShootSeqPage = ({}: TrackScreenProps) => { + const [hopperFilled, setHopperFilled] = useState(undefined); + const [loadNotes, setLoadNotes] = useState(undefined); + const [scoreCount, setScoreCount] = useState(0); + const [missCount, setMissCount] = useState(0); + const [unloadSeconds, setUnloadSeconds] = useState(-1); + const [stuckFuelCount, setStuckFuelCount] = useState(-1); + const [unloadComments, setUnloadComments] = useState(undefined); + + enum ShootPosition { close, mid, far }; + const [shootPosition, setShootPosition] = useState(undefined); + const [movingWhileShooting, setMovingWhileShooting] = useState(undefined); + const [shootingWhileIntaking, setShootingWhileIntaking] = useState(undefined); + + const isIncomplete: () => boolean = () => { + if (hopperFilled === undefined) return true; + if (unloadSeconds === -1) return true; + if (stuckFuelCount === -1) return true; + if (shootPosition === undefined) return true; + if (movingWhileShooting === undefined) return true; + if (shootingWhileIntaking === undefined) return true; + return false + } + + const handleSubmit = (e: React.MouseEvent) => { + e.preventDefault(); + // hopper filled --> stores pmva-hopper-full / pmva-hopper-not-full + // loadNotes --> stores pmva-load-comments + // pmva-unload-comments + } + return
+
+ +

Post-Match Video Analysis - Pickup, Score & Shoot Sequence

+

Was the hopper filled? + + +

+

+ Anything noteworthy about this load? + +

+

Click on the buttons below to add to the count for this sequence. Play the video back slowly and get an + accurate count for the sequence. The count is shown so that you can verify the amout if you're not sure + what you saw.

+ + ({scoreCount}) + ({missCount}) + ({Math.round(100 * scoreCount / Math.max(1, scoreCount + missCount))}%) +

How long did it take to unload (rewind the video and play the sequence back. Use + either the video time or a stopwatch) + setUnloadSeconds(Number((e.target as HTMLInputElement).value))}/> seconds. +

+

How much fuel was stuck after the end of the sequence? + setStuckFuelCount(Number((e.target as HTMLInputElement).value))}/> pieces. +

+

Anything noteworthy about this shooting session? + +

+

Where was the robot while shooting? (select one) + + + +

+

Was the robot moving while shooting? + + +

+

Was the robot shooting while intaking during this sequence? + + +

+ +
+
+ +} + +export default PMVALoadShootSeqPage; \ No newline at end of file diff --git a/app/common/track/strat-area/AreaPage.tsx b/app/common/track/strat-area/AreaPage.tsx index 72de72b1..d17159dc 100644 --- a/app/common/track/strat-area/AreaPage.tsx +++ b/app/common/track/strat-area/AreaPage.tsx @@ -71,7 +71,7 @@ const AreaPage = ({ areaCode }: TrackScreenProps) => { function startSequence(seq: SequenceType) { console.log("Starting sequence "+seq.name); - const firstSeqEvent = seq.events[0]; + const firstSeqEvent = seq.events && seq.events[0]; if (firstSeqEvent) { const firstEvent = firstSeqEvent.eventtype; recordEvent(firstEvent.eventtype, 0, "") diff --git a/app/common/track/trackPageRegistry.ts b/app/common/track/trackPageRegistry.ts index 44910159..09b4312f 100644 --- a/app/common/track/trackPageRegistry.ts +++ b/app/common/track/trackPageRegistry.ts @@ -12,6 +12,7 @@ import MatchForm from "~/common/track/MatchForm.tsx"; import CompTeams from "~/common/track/CompTeams.tsx"; import SequencePage from "~/common/track/seq/SequencePage.tsx"; import AreaPage from "~/common/track/strat-area/AreaPage.tsx"; +import PMVALoadShootSeqPage from "~/common/track/seq/PMVALoadShootSeqPage.tsx"; /** * Maps navigation strings to custom components. This is effectively @@ -42,6 +43,7 @@ const trackPageRegistry: Record> = { // sequence pages "seq:default": SequencePage, + "seq:pmva-score": PMVALoadShootSeqPage, // custom sequence pages // "seq:auto": AutoPage, // "seq:defense": DefensePage, diff --git a/app/routes/report/report-home-page.tsx b/app/routes/report/report-home-page.tsx index 0b12e825..586c283a 100644 --- a/app/routes/report/report-home-page.tsx +++ b/app/routes/report/report-home-page.tsx @@ -26,22 +26,11 @@ const ReportHomePage = () => {

Standard Reports

    -
  • - - Tournament Report - - formerly Team Schedule -
  • Team Summary Report
  • -
  • - - Post-Match Video Analysis (PMVA) Report - -
  • Mega Report @@ -52,6 +41,17 @@ const ReportHomePage = () => { Chronological Event Report
  • +
  • + + Tournament Report + + formerly Team Schedule +
  • +
  • + + Post-Match Video Analysis (PMVA) Report + +