diff --git a/RawData.php b/RawData.php index 5522e0d..c633830 100644 --- a/RawData.php +++ b/RawData.php @@ -66,9 +66,9 @@ function dataToTable(dataObj) { "" + dataObj[i]["teleopcubesbottom"] + "" + "" + dataObj[i]["teleopcubesmiddle"] + "" + "" + dataObj[i]["teleopcubestop"] + "" + - "" + dataObj[i]["pickedupcone"] + "" + - "" + dataObj[i]["pickedupuprightcone"] + "" + - "" + dataObj[i]["pickeduptippedcone"] + "" + + "" + dataObj[i]["pickedupcube"] + "" + + "" + dataObj[i]["pickedupupright"] + "" + + "" + dataObj[i]["pickeduptipped"] + "" + "" + dataObj[i]["endgamechargelevel"] + "" + "" + dataObj[i]["died"] + "" + "" + dataObj[i]["comment"] + "" + diff --git a/dbHandler.php b/dbHandler.php index 6042064..c65710e 100644 --- a/dbHandler.php +++ b/dbHandler.php @@ -68,9 +68,9 @@ function writeRowToTable($data) teleopcubesbottom, teleopcubesmiddle, teleopcubestop, - pickedupcone, - pickedupuprightcone, - pickeduptippedcone, + pickedupcube, + pickedupupright, + pickeduptipped, endgamechargelevel, died, matchnumber, @@ -93,9 +93,9 @@ function writeRowToTable($data) :teleopcubesbottom, :teleopcubesmiddle, :teleopcubestop, - :pickedupcone, - :pickedupuprightcone, - :pickeduptippedcone, + :pickedupcube, + :pickedupupright, + :pickeduptipped, :endgamechargelevel, :died, :matchnumber, @@ -118,7 +118,7 @@ function enforceDataTyping($data) { foreach ($row as $key => $value) { - if ($key == "exitedcommunity" || $key == "autonconesbottom" || $key == "autonconesmiddle" || $key == "autonconestop" || $key == "autoncubesbottom" || $key == "autoncubesmiddle" || $key == "autoncubestop" || $key == "autonchargelevel" ||$key == "teleopconesbottom" || $key == "teleopconesmiddle" || $key == "teleopconestop" || $key == "teleopcubesbottom" || $key == "teleopcubesmiddle" || $key == "teleopcubestop" || $key == "pickedupcone" || $key == "pickedupuprightcone" || $key == "pickeduptippedcone" || $key == "endgamechargelevel" || $key == "died") + if ($key == "exitedcommunity" || $key == "autonconesbottom" || $key == "autonconesmiddle" || $key == "autonconestop" || $key == "autoncubesbottom" || $key == "autoncubesmiddle" || $key == "autoncubestop" || $key == "autonchargelevel" ||$key == "teleopconesbottom" || $key == "teleopconesmiddle" || $key == "teleopconestop" || $key == "teleopcubesbottom" || $key == "teleopcubesmiddle" || $key == "teleopcubestop" || $key == "pickedupcube" || $key == "pickedupupright" || $key == "pickeduptipped" || $key == "endgamechargelevel" || $key == "died") { $row[$key] = $this->enforceInt($value); } @@ -150,9 +150,9 @@ function readAllData($eventCode) teleopcubesbottom, teleopcubesmiddle, teleopcubestop, - pickedupcone, - pickedupuprightcone, - pickeduptippedcone, + pickedupcube, + pickedupupright, + pickeduptipped, endgamechargelevel, died, matchnumber, @@ -183,9 +183,9 @@ function readTeamData($teamNumber, $eventCode) teleopcubesbottom, teleopcubesmiddle, teleopcubestop, - pickedupcone, - pickedupuprightcone, - pickeduptippedcone, + pickedupcube, + pickedupupright, + pickeduptipped, endgamechargelevel, died, matchnumber, @@ -280,9 +280,9 @@ function createDataTable() teleopcubesbottom TINYINT UNSIGNED NOT NULL, teleopcubesmiddle TINYINT UNSIGNED NOT NULL, teleopcubestop TINYINT UNSIGNED NOT NULL, - pickedupcone TINYINT UNSIGNED NOT NULL, - pickedupuprightcone TINYINT UNSIGNED NOT NULL, - pickeduptippedcone TINYINT UNSIGNED NOT NULL, + pickedupcube TINYINT UNSIGNED NOT NULL, + pickedupupright TINYINT UNSIGNED NOT NULL, + pickeduptipped TINYINT UNSIGNED NOT NULL, endgamechargelevel TINYINT UNSIGNED NOT NULL, died TINYINT UNSIGNED NOT NULL, matchnumber VARCHAR(10) NOT NULL, diff --git a/scripts/qrHandler.js b/scripts/qrHandler.js index edcf57a..99a4116 100644 --- a/scripts/qrHandler.js +++ b/scripts/qrHandler.js @@ -48,9 +48,9 @@ function qrListToDict(dataList) { out["teleopcubesbottom"] = dataList[12]; out["teleopcubesmiddle"] = dataList[13]; out["teleopcubestop"] = dataList[14]; - out["pickedupcone"] = dataList[15]; - out["pickedupuprightcone"] = dataList[16]; - out["pickeduptippedcone"] = dataList[17]; + out["pickedupcube"] = dataList[15]; + out["pickedupupright"] = dataList[16]; + out["pickeduptipped"] = dataList[17]; out["endgamechargelevel"] = dataList[18]; out["died"] = dataList[19]; out["matchnumber"] = dataList[20]; diff --git a/teamLookup.php b/teamLookup.php index 7608507..d4274cf 100644 --- a/teamLookup.php +++ b/teamLookup.php @@ -374,22 +374,22 @@ function dataToAutonGraph(matchdata) { datasets.push({ label: "Auton Top Row Items", data: [], - borderColor: 'red' + borderColor: 'Red' }); datasets.push({ label: "Auton Middle Row Items", data: [], - borderColor: 'green' + borderColor: 'Yellow' }); datasets.push({ label: "Auton Bottom Row Items", data: [], - borderColor: 'blue' + borderColor: 'Green' }); datasets.push({ label: "Auton Charge Level", data: [], - borderColor: 'yellow' + borderColor: 'Blue' }); @@ -514,22 +514,22 @@ function dataToTeleopGraph(matchdata) { datasets.push({ label: "Teleop Top Row Items", data: [], - borderColor: 'red' + borderColor: 'MediumOrchid' }); datasets.push({ label: "Teleop Middle Row Items", data: [], - borderColor: 'green' + borderColor: 'MediumSeaGreen' }); datasets.push({ label: "Teleop Bottom Row Items", data: [], - borderColor: 'blue' + borderColor: 'MediumTurquoise' }); datasets.push({ label: "Endgame Charge Level", data: [], - borderColor: 'yellow' + borderColor: 'PaleVioletRed' }); @@ -661,11 +661,8 @@ function processPitData(pitData, matchData) { var pickedupcubevalue = 0; var pickedupuprightvalue = 0; var pickeduptippedvalue = 0; - console.log("matchData.length = "+matchData.length); - /*for (let i = 0; i < matchData.length; i++) { - console.log("matchData[i][pickedupcube] = "+matchData[i]["endgamechargelevel"]); + for (let i = 0; i < matchData.length; i++) { if(matchData[i]["pickedupcube"] == true) { - console.log("HI"); pickedupcubevalue = 1; } else if(matchData[i]["pickedupupright"] == true) { @@ -674,14 +671,14 @@ function processPitData(pitData, matchData) { else if(matchData[i]["pickeduptipped"] == true) { pickeduptippedvalue = 1; } - }*/ - + } + const dictX = { drivemotors: pitData["drivemotors"], preparedness: pitData["preparedness"], - pickedupcone: matchData["pickedupcube"], - pickedupuprightcone: matchData["pickedupupright"], - pickeduptippedcone: matchData["pickeduptipped"]}; + pickedupcube: pickedupcubevalue, + pickedupupright: pickedupuprightvalue, + pickeduptipped: pickeduptippedvalue}; writeTableRow("pitRow2", dictX, ["drivemotors", "preparedness", "pickedupcube", "pickedupupright", "pickeduptipped"]); }