From 4f496e9d0dd6d7e30d98290e2957bfc4dce93717 Mon Sep 17 00:00:00 2001 From: M4RZTI4N <> Date: Mon, 3 Apr 2023 22:47:20 +0000 Subject: [PATCH] added variable initialization --- config/analysis-pipeline.json | 112 ++++----- config/match-scouting.json | 244 +++++++++++++++---- src/scouting/executables/conditionalLayer.js | 2 + src/scouting/executables/hide.js | 1 - src/scouting/public/js/match-scouting.js | 9 + 5 files changed, 267 insertions(+), 101 deletions(-) diff --git a/config/analysis-pipeline.json b/config/analysis-pipeline.json index 3357b97e..db735fd7 100644 --- a/config/analysis-pipeline.json +++ b/config/analysis-pipeline.json @@ -144,34 +144,34 @@ "outputPath":"scores.auto", "options":{ "weightedPaths":{ - "countsAuto.placement31":6, - "countsAuto.placement32":6, - "countsAuto.placement33":6, - "countsAuto.placement34":6, - "countsAuto.placement35":6, - "countsAuto.placement36":6, - "countsAuto.placement37":6, - "countsAuto.placement38":6, - "countsAuto.placement39":6, - "countsAuto.placement21":4, - "countsAuto.placement22":4, - "countsAuto.placement23":4, - "countsAuto.placement24":4, - "countsAuto.placement25":4, - "countsAuto.placement26":4, - "countsAuto.placement27":4, - "countsAuto.placement28":4, - "countsAuto.placement29":4, - "autoCounts.hybrid.conePickupGrid":3, - "autoCounts.hybrid.conePickupCommunity":3, - "autoCounts.hybrid.conePickupFloor":3, - "autoCounts.hybrid.conePickupChute":3, - "autoCounts.hybrid.conePickupPlatform":3, - "autoCounts.hybrid.cubePickupGrid":3, - "autoCounts.hybrid.cubePickupCommunity":3, - "autoCounts.hybrid.cubePickupFloor":3, - "autoCounts.hybrid.cubePickupChute":3, - "autoCounts.hybrid.cubePickupPlatform":3 + "countsAuto.placement31":6+1.666, + "countsAuto.placement32":6+1.666, + "countsAuto.placement33":6+1.666, + "countsAuto.placement34":6+1.666, + "countsAuto.placement35":6+1.666, + "countsAuto.placement36":6+1.666, + "countsAuto.placement37":6+1.666, + "countsAuto.placement38":6+1.666, + "countsAuto.placement39":6+1.666, + "countsAuto.placement21":4+1.666, + "countsAuto.placement22":4+1.666, + "countsAuto.placement23":4+1.666, + "countsAuto.placement24":4+1.666, + "countsAuto.placement25":4+1.666, + "countsAuto.placement26":4+1.666, + "countsAuto.placement27":4+1.666, + "countsAuto.placement28":4+1.666, + "countsAuto.placement29":4+1.666, + "autoCounts.hybrid.conePickupGrid":3+1.666, + "autoCounts.hybrid.conePickupCommunity":3+1.666, + "autoCounts.hybrid.conePickupFloor":3+1.666, + "autoCounts.hybrid.conePickupChute":3+1.666, + "autoCounts.hybrid.conePickupPlatform":3+1.666, + "autoCounts.hybrid.cubePickupGrid":3+1.666, + "autoCounts.hybrid.cubePickupCommunity":3+1.666, + "autoCounts.hybrid.cubePickupFloor":3+1.666, + "autoCounts.hybrid.cubePickupChute":3+1.666, + "autoCounts.hybrid.cubePickupPlatform":3+1.666 } } }, @@ -181,34 +181,34 @@ "outputPath":"scores.teleop", "options":{ "weightedPaths":{ - "countsTeleop.placement31":5, - "countsTeleop.placement32":5, - "countsTeleop.placement33":5, - "countsTeleop.placement34":5, - "countsTeleop.placement35":5, - "countsTeleop.placement36":5, - "countsTeleop.placement37":5, - "countsTeleop.placement38":5, - "countsTeleop.placement39":5, - "countsTeleop.placement21":3, - "countsTeleop.placement22":3, - "countsTeleop.placement23":3, - "countsTeleop.placement24":3, - "countsTeleop.placement25":3, - "countsTeleop.placement26":3, - "countsTeleop.placement27":3, - "countsTeleop.placement28":3, - "countsTeleop.placement29":3, - "teleopCounts.hybrid.conePickupGrid":2, - "teleopCounts.hybrid.conePickupCommunity":2, - "teleopCounts.hybrid.conePickupFloor":2, - "teleopCounts.hybrid.conePickupChute":2, - "teleopCounts.hybrid.conePickupPlatform":2, - "teleopCounts.hybrid.cubePickupGrid":2, - "teleopCounts.hybrid.cubePickupCommunity":2, - "teleopCounts.hybrid.cubePickupFloor":2, - "teleopCounts.hybrid.cubePickupChute":2, - "teleopCounts.hybrid.cubePickupPlatform":2 + "countsTeleop.placement31":5+1.666, + "countsTeleop.placement32":5+1.666, + "countsTeleop.placement33":5+1.666, + "countsTeleop.placement34":5+1.666, + "countsTeleop.placement35":5+1.666, + "countsTeleop.placement36":5+1.666, + "countsTeleop.placement37":5+1.666, + "countsTeleop.placement38":5+1.666, + "countsTeleop.placement39":5+1.666, + "countsTeleop.placement21":3+1.666, + "countsTeleop.placement22":3+1.666, + "countsTeleop.placement23":3+1.666, + "countsTeleop.placement24":3+1.666, + "countsTeleop.placement25":3+1.666, + "countsTeleop.placement26":3+1.666, + "countsTeleop.placement27":3+1.666, + "countsTeleop.placement28":3+1.666, + "countsTeleop.placement29":3+1.666, + "teleopCounts.hybrid.conePickupGrid":2+1.666, + "teleopCounts.hybrid.conePickupCommunity":2+1.666, + "teleopCounts.hybrid.conePickupFloor":2+1.666, + "teleopCounts.hybrid.conePickupChute":2+1.666, + "teleopCounts.hybrid.conePickupPlatform":2+1.666, + "teleopCounts.hybrid.cubePickupGrid":2+1.666, + "teleopCounts.hybrid.cubePickupCommunity":2+1.666, + "teleopCounts.hybrid.cubePickupFloor":2+1.666, + "teleopCounts.hybrid.cubePickupChute":2+1.666, + "teleopCounts.hybrid.cubePickupPlatform":2+1.666 } } }, diff --git a/config/match-scouting.json b/config/match-scouting.json index ba91ff17..e75a286f 100644 --- a/config/match-scouting.json +++ b/config/match-scouting.json @@ -1,8 +1,14 @@ { "timing": { "totalTime": 150000, - "timeTransitions": {} + "timeTransitions": { + + } }, + "variables":{ + "heldPiece":"none", + "leftCommunity":"false" + }, "layout": { "gridRows": 6, "gridColumns": 9, @@ -13,14 +19,18 @@ "gridArea": ["4", "1", "6", "10"], "class": "silver timer", "type": "match-control", - "executables": [{ + "executables": [ + { "type": "conditionalLayer", "args": [0, 1, ["chargingDock", "broken", "startGame", "undo"], { "heldPiece": { "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -127,6 +137,29 @@ "type": "action", "executables": [{"type":"layer","args":[1,3]}] }, + { + "id":"leaveCommunity", + "displayText":"Leave Community", + "gridArea":["2","4","3","7"], + "class":"gray", + "type":"action", + "executables":[{ + "type": "setVariable", + "args": ["leftCommunity", "true"] + }, { + "type": "conditionalLayer", + "args": [1, 1, ["chargingDock", "broken", "startGame", "undo"], { + "heldPiece": { + "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], + "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], + "none": ["conePickup", "cubePickup"] + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } + }] + }] + }, { "id": "dropCone", "displayText": "Drop", @@ -143,7 +176,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -163,7 +199,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -183,7 +222,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -203,7 +245,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -223,7 +268,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -243,7 +291,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -263,7 +314,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -284,7 +338,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -304,7 +361,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -324,7 +384,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -344,7 +407,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -364,7 +430,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -384,7 +453,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -404,7 +476,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -424,7 +499,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -444,7 +522,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -464,7 +545,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -484,7 +568,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -504,7 +591,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -524,7 +614,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -544,7 +637,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -564,7 +660,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -584,7 +683,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -604,7 +706,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -624,7 +729,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -644,7 +752,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -664,7 +775,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -684,7 +798,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -704,7 +821,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] } @@ -750,7 +870,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -770,7 +893,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -790,7 +916,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -810,7 +939,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -830,7 +962,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -850,7 +985,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -870,7 +1008,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -890,7 +1031,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -910,7 +1054,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -930,7 +1077,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] } @@ -981,7 +1131,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] }, @@ -998,7 +1151,10 @@ "cone": ["placement31", "placement33", "placement34", "placement36", "placement37", "placement39", "placement21", "placement23", "placement24", "placement26", "placement27", "placement29", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCone"], "cube": ["placement32", "placement35", "placement38", "placement22", "placement25", "placement28", "placement11", "placement12", "placement13", "placement14", "placement15", "placement16", "placement17", "placement18", "placement19", "dropCube"], "none": ["conePickup", "cubePickup"] - } + }, + "leftCommunity":{ + "false":["leaveCommunity"] + } }] }] } diff --git a/src/scouting/executables/conditionalLayer.js b/src/scouting/executables/conditionalLayer.js index a89a1888..5c69f8b5 100644 --- a/src/scouting/executables/conditionalLayer.js +++ b/src/scouting/executables/conditionalLayer.js @@ -8,6 +8,8 @@ executables["conditionalLayer"] = { for (let button of layers.flat()) { //hide all buttons button.element.style.display = "none" } + console.log("variables"); + console.log(variables) var renderedButtons = [] for (let button of layers[toLayer]) { var targetVariables = []; diff --git a/src/scouting/executables/hide.js b/src/scouting/executables/hide.js index 2665ac17..bb40b5c1 100644 --- a/src/scouting/executables/hide.js +++ b/src/scouting/executables/hide.js @@ -8,7 +8,6 @@ executables["hide"] = { }, reverse(button) { //when the button is undone, do this. This should undo EVERYTHING done by execute - console.log(button) button.element.style.display = "flex" } } \ No newline at end of file diff --git a/src/scouting/public/js/match-scouting.js b/src/scouting/public/js/match-scouting.js index 618ec9db..1322da30 100644 --- a/src/scouting/public/js/match-scouting.js +++ b/src/scouting/public/js/match-scouting.js @@ -10,6 +10,15 @@ var previousLayers = []; //initiate timing let time = matchScoutingConfig.timing.totalTime; let timerActive = false; + + //intialize variables + let varNames = Object.keys(matchScoutingConfig.variables) + for(let key of varNames){ + variables[key] = { + "current":matchScoutingConfig.variables[key], + "previous":[] + } + } //create grid const grid = document.querySelector("#match-scouting .button-grid"); grid.style.gridTemplateColumns = `repeat(${matchScoutingConfig.layout.gridColumns}, 1fr)`;